I am making a game/simulator where I want the game to, upon command, run as fast as the computer can handle, that is to say, if the game can run at 60 fps, don't run at 30 fps.

What should I do to make the game do that and would this even make sense?

(Note: when I looked at the built-in variable fps, I often see the value to be higher than the room speed I set, so I thought that maybe I can allow the game to run faster than the room speed initially set.)

  • \$\begingroup\$ I have almost no knowledge of Game-Maker, but in general, if a game is simple enough, the monitor will be the limit on effective frame rate for the display. A computer can still process frames faster (if it can), but the screen won't be able to show them all. \$\endgroup\$ – Dronz Nov 1 '16 at 5:31
  • \$\begingroup\$ What if I turn off the draw event for the game, would that help? Or are we talking about different things? \$\endgroup\$ – user289661 Nov 1 '16 at 5:41
  • \$\begingroup\$ According to the answer below, that's not an option for Game Maker. But in general, in another programming environment, you could of course run the game simulation faster than the display, or ignore the display if you wanted to test the game engine without worrying about the display, or resolve some action without showing it for whatever reason. I'm not sure what you're trying to do. \$\endgroup\$ – Dronz Nov 1 '16 at 15:16
  • \$\begingroup\$ Turn off drawing and set the room fps to the highest possible value? Still, if you want maximum speed, fixed timestep is not the best solution, as pointed before. \$\endgroup\$ – rcpinto Nov 2 '16 at 11:04

No, Game Maker runs at a fixed timestep.

fps will show how many steps the computer is able to handle up to the room's speed. fps_real is measured in CPU cycles.

What you want to have is a semi fixed timestep, which Game Maker doesn't support. (You know how much the variables needs to be changed per second, but don't care how many times your loop runs in a second)

Reference: fps and fps_real

  • \$\begingroup\$ One example of a semi fixed timestep engine is Unity, for reference, where the default is to have the delta of the time between frames. \$\endgroup\$ – DH. Nov 1 '16 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.