Skip to content

pandrews11/test-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Turbulenz Game

To set up Turbulenz Environment

  1. Follow instructions here and make sure local server starts.
  2. 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.
  1. 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);
};
  1. Use following command to creating runnable game:
  • makehtml --mode canvas-debug -t . myfirstapp.js -o myfirstapp.canvas.debug.html
  1. Refresh http://localhost:8070/ and navigate back to game, and click play.
  • There should be a runnable file there called myfirstapp.canvas.debug.html

About

Simple test game using Turbulenz

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published