Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 5 made on Saturday August 18, 2007 at 02:42
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
Andre,

You can write a tight loop but then the remote would just sit there and loop, never updating the screen, etc... Philips expected that programmers might do such a thing and provided a GUI.updateScreen() or something like that method as well as a System.delay() method.

Activity.scheduleAfter(timeinms, function,parameters) is intended to allow you to write code that is interleaved, allowing buttons to be pressed during execution, etc...

The scheduler in Pong simply moves paddles up or down, moves the ball a certain number of pixels, and checks for collision. The game speed is intended to determine the timeinms above that the next check needs to occur.

I've got your game code and will likely have a look over the next couple of weeks time permitting to see if it can be pared down to run faster. I'll keep you posted.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse