Downoad free java making software for mobile
Posted On at by milan
develop your own mobile games from java
Posted On at by milanGame loop of HardDriveCanvas.java
public void start()
{
gameRunning = true;
Thread gameThread = new Thread(this);
gameThread.start();
}
... ... ... ...
... ... ... ...
public void run()
{
Graphics g = getGraphics();
//... ... ...some code
while (gameRunning) //The game loop
{
tick();
input();
render(g);
//... ... ...some code
try
{
Thread.sleep(timeStep );
//... ... ... ...some code
}
catch (InterruptedException ie) { stop(); }
}
