- Follow instructions here and make sure local server starts.
- When local server starts, navigate to
http://localhost:8070/
and create a new game directory.
- Doesn't matter where it is can specify path when creating game.
- Create a sample JavaScript file
myfirstapp.js
and place in game directory.
TurbulenzEngine.onload = function onloadFn()
{
var intervalID;
var gd = TurbulenzEngine.createGraphicsDevice({});
function tick()
{
if (gd.beginFrame())
{
gd.clear([1.0, 1.0, 1.0, 1.0], 1.0, 0.0);
gd.endFrame();
}
}
intervalID = TurbulenzEngine.setInterval(tick, 1000/60);
};
- Use following command to creating runnable game:
makehtml --mode canvas-debug -t . myfirstapp.js -o myfirstapp.canvas.debug.html
- Refresh
http://localhost:8070/
and navigate back to game, and click play.
- There should be a runnable file there called
myfirstapp.canvas.debug.html