StarBright Posted February 17, 2016 Share Posted February 17, 2016 So I finally have a working alpha version of my game (yay!) and I want to make a build to send to testers. What do I need to do? I've been developing in VisualStudio. Link to comment Share on other sites More sharing options...
StarBright Posted February 18, 2016 Author Share Posted February 18, 2016 More details: I'm in VisualStudio because I've been using TypeScript. The project works when I run it as debug, but not as release; then I just get a white browser screen with "TypeScript HTML App" at the top. Link to comment Share on other sites More sharing options...
clark Posted February 19, 2016 Share Posted February 19, 2016 So if you press debug, you see your game launching in the browser? In terms of release, I have always used grunt or gulp to compile the final release directory. Chances are you want to eventually minify and stuff for release. I am not sure how to do it with VS alone Link to comment Share on other sites More sharing options...
StarBright Posted February 19, 2016 Author Share Posted February 19, 2016 Yes, debug launches it in browser. So I need to install another piece of software to make a release build? Link to comment Share on other sites More sharing options...
Tom Atom Posted February 19, 2016 Share Posted February 19, 2016 Hi, I am sure there is no need to install anything else. I am using VS + Typescript for both Debug and Release builds. First, in properties I have to set build parameters for both Debug and Release - for example I am keeping comments in Debug,... On screenshot below you can see, that you can produce one .js file from all sources, etc. Do not forget to do setup for both Debug and Release (switch on top - "Configuration:" ...): I am also running all my minimization tasks and other tasks from project Properties - set Build Events and configure it. Build events are common for Debug and Release, so you need to "code" command line for it it - see example below Whole my builds are one-click made. Link to comment Share on other sites More sharing options...
StarBright Posted February 22, 2016 Author Share Posted February 22, 2016 OK, getting configuration settings right has gotten the release version to run--thanks for that--but I don't understand the part about build events. Link to comment Share on other sites More sharing options...
Tom Atom Posted February 22, 2016 Share Posted February 22, 2016 Quote ... but I don't understand the part about build events. VS can merge output into one file, but it cannot for example to minimize it. For minification or any other further processing you have to run other external tools. If you want to do all this from VS, you can set commands into post-build events. For example take VS output and pass it into minification program (uglify in screenshot). While settings for output can be different for Debug and Release and setting is separated, there are no separate build events for Debug and Release. Your build commands are applied to both Debug and Release ... which may be thing you do not want - for example you want to minimize only Release build, but not Debug. So, you have to write your build events so it runs some command only in Debug and some other only in Release. In this case you have to refer to internal VS variables like "ConfigurationName" to find whether build event was called during Debug or Release build... Link to comment Share on other sites More sharing options...
StarBright Posted February 22, 2016 Author Share Posted February 22, 2016 OK, setting aside minimization, etc. How do I export a playable version to send to other people? Or do I just need to send them some subset of the files? Link to comment Share on other sites More sharing options...
Tom Atom Posted February 23, 2016 Share Posted February 23, 2016 All I do is just copy index.html + directories that contain assets, js and css in file explorer outside VS - but it depends on your project structure. Link to comment Share on other sites More sharing options...
StarBright Posted February 23, 2016 Author Share Posted February 23, 2016 Huh. That sounds easy enough, but when I click index.html in the file explorer it doesn't run the game; I just get a black rectangle the size of the game window. Is that a file paths thing? As far as I can tell the files should be in the right locations relative to index.html. Link to comment Share on other sites More sharing options...
Tom Atom Posted February 23, 2016 Share Posted February 23, 2016 Running game locally does not always work because you need server to run it (mostly for security reasons). When you run it in VS it is run from MS IIS server which is launched in background. Firefox browser can run it without server. Or you can set/install another local server - I am using NPM http-server (https://www.npmjs.com/package/http-server) All I need to do is to go into folder with index.html and type http-server at commandline. Then I can open any browser and put 192.168.0.11:8080 into address bar. Link to comment Share on other sites More sharing options...
StarBright Posted February 23, 2016 Author Share Posted February 23, 2016 Firefox did the trick, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts