01-25-2010, 04:31 PM
I found the reason why the game is so laggy. When I started playing it, I got little over 1 frame per second. The reason is because of your method called world.always.
Once I disabled this from the event menu, the game jumped up to about 10 frames per second I would say. Much more playable also. Then, once I disabled the world.stabilize event in the events menu, I got about 15 frames per second.
The reason why is because you are using way too many infinite loops in the program. While the program is running, it is constantly being told to look for a certain thing to happen, and you have probably 20 infinite loops in that one method. Thats why the game is so laggy. If you could just take out those infinite loops and put in some other code that does the same thing without being run all the time, then the game would be a lot faster. I actually enjoyed the flying once I disabled that method, because it ran fast enough for me to actually play.
Check out my best projects so far and please comment:
Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
Last edited by Dameria; 01-26-2010 at 03:42 PM.
|