Purchasing Engine Licenses
First, each of us purchased an ImpactJS license for $100 and we were emailed the download links to the engine with different example games for reference.Familiarity with the Engine Directory
The engine download did not come with an installer. Rather, it was a simple zip file containing the source code for a simple game test example, the engine source code, and the level editor source code.- lib/
- game/ <-- game code (with "hello world" currently)
- impact/ <-- engine code
- weltmeister/ <-- level editor code
- media/ <-- game asset files
- tools/ <-- "bake" tool that compresses the game code for distribution
- index.html <-- runs the game
- weltmeister.html <-- runs the level editor
Creating a workflow to run the game
Both the game and the level editor are web applications, meaning they are run in the web browser rather than as native executables. We could run the test game by just opening "index.html" in a browser, but the level editor "weltmeister.html" did not work. This is because the directory needs to be presented by a web server with PHP enabled, since the level editor is doing dynamic server side things like polling for and saving files to our directory.Thanks to this post in the Impact forum, we learned that we didn't have to install a full LAMP web server stack for our workflow. So, on the Windows side, we downloaded PHP 5.4, extracted it to some folder, added that location to the PATH variable, and created a "runserver.bat" script with the following line:
php -S localhost:8000
Whenever we want to start work on the game, we just open "runserver.bat" and go to "http://localhost:8000" to run our game, and "http://localhost:8000/weltmeister.html" to run the level editor.
On Mac, I just ran "port install php54" and created a "runserver.sh" script to execute the command "php54 -S localhost:8000".
No comments:
Post a Comment