Computer Science Canada Help - The speed at which my game runs on different computers |
Author: | plato [ Sun Jun 08, 2014 11:04 pm ] | ||
Post subject: | Help - The speed at which my game runs on different computers | ||
What is it you are trying to achieve? For my comp sci summative project, I made a game in which the user controls a car on a 3-lane road, where other cars come from the top of the screen and the user has to dodge the cars to stay alive. What is the problem you are having? When working at school, the game seems to run fine and the controls seem good and the speed at which the cars move is good. However at home on my much more powerful computer, the program runs much quicker, making the enemy cars as well as the user's car move so quick it is impossible to control it. Describe what you have tried to solve this problem I've tried to use delays and changing the values to find some middle-ground, however I've had no luck. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) This is a bare bones version of the program.
Please specify what version of Turing you are using <4.1.1> |
Author: | Tony [ Mon Jun 09, 2014 12:46 am ] | ||
Post subject: | RE:Help - The speed at which my game runs on different computers | ||
The posted code doesn't show your delay attempt. From the wording, I will guess that it was just a delay for a static amount, but try to reason through this:
What you want is different delay amount for different machines. |
Author: | amz_best [ Sun Sep 07, 2014 6:57 pm ] |
Post subject: | RE:Help - The speed at which my game runs on different computers |
Time.DelaySinceLast (1000 div 60) the number 60 is the fps, put this after cls but before end loop and it should slow down ur game just right |