Open attic-stuff opened 2 months ago
Not sure why this is happening yet, but simply "moving a borderless window causes it to go to 0" is not true even in your sample project. If you comment out the two lines in your Step event which change the gamespeed, then no bug occurs.
Okay, so it's nothing to do with borderless either ;)
This is very simply that your two calls to game_set_speed() have the two arguments the wrong way around and so this gives you 0 each time - e.g, you have game_set_speed(gamespeed_fps, 60);
instead of game_set_speed(60, gamespeed_fps);
.
We should change the function to not allow setting a gamespeed_fps that equals 0 (or any negative number, etc.). Probably with at least a debug message that this was disallowed, if not a full code error.
Edited the report now
Okay, so negative numbers are already caught and a code error shown:
So this is just to determine if 0 should be allowed still or made into a code error this same way.
lol good catch!
We should change the function to not allow setting a gamespeed_fps that equals 0 (or any negative number, etc.). Probably with at least a debug message that this was disallowed, if not a full code error.
I'd like to just see a debug message rather than a full crash, if only because there is still expected behavior when setting the game speed to 0. Technically, it does have use cases, i.e. a "meta" game that freezes until the player manually restarts it.
it does have use cases, i.e. a "meta" game that freezes until the player manually restarts it.
this will also tell operating systems that the process has froze and then close the program, which is a good way to have people thinkin your game is broken or unsafe. heads up!
Description
if you [accidentally get the arguments for game_set_speed() the wrong way around], it sets gamespeed to 0 but runs the game at plaid.
Expected Change
it shouldn't do that >:[
Steps To Reproduce
How reliably can you recreate this issue using your steps above?
Always
Which version of GameMaker are you reporting this issue for?
2024.8.1 (Monthly)
Which platform(s) are you seeing the problem on?
Windows
Sample Package Attached?
Sample Project Added?