View Single Post
Old 02-08-2013, 01:52 PM   PM User | #7
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,659
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Okay, so lets look at what you are doing here.
In the main, you issue a game.start() which creates a new thread of this and issues a start command on the thread. The main thread is now returned to the main as the game thread issues a run.
In this run, it's job is to loop while !running, but perform no actions. Since the game is running, this immediately stops this thread's run. This thread is now terminated. Complete control is now just the main thread, which is sitting idle on the main. The application is complete awaiting input for the gui.

So if you are looking to make this do something, you'll need to write what it needs to do in the run method. You'll also likely need to write the entire paint method for the canvas.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote