acidemic
Member
In my game I am using delta_time variable. I have a persistent "obj_delta_control" object which has following code in the "Begin Step" event:
global.delta = 60 / 1000000 * delta_time;
Then I multiply "global.delta" variable to all speed, movement, delay, alarm... variables in the game.
The problem begins when the game runs in a window and when I start to drag the window around the screen (or just click the mouse on the window title bar) the Draw event in the game freezes and is not being updated. During this "delta_time" and my global.delta variables increase.... a lot. So it affects the movement of the game objects which rely on the "global.delta" variable. Their speed increase up to x100 or x200 times and more...(depends on how long I keep mouse pressed on the window title bar).
The game is being developed for the Android, but I want it to work consistently on the Windows as well. Is there any way to avoid this?
Another thing I should mentionis that "delta_time" is much higher (up to 8 times) in the first step after the "Room Start", but I managed to get round that.
global.delta = 60 / 1000000 * delta_time;
Then I multiply "global.delta" variable to all speed, movement, delay, alarm... variables in the game.
The problem begins when the game runs in a window and when I start to drag the window around the screen (or just click the mouse on the window title bar) the Draw event in the game freezes and is not being updated. During this "delta_time" and my global.delta variables increase.... a lot. So it affects the movement of the game objects which rely on the "global.delta" variable. Their speed increase up to x100 or x200 times and more...(depends on how long I keep mouse pressed on the window title bar).
The game is being developed for the Android, but I want it to work consistently on the Windows as well. Is there any way to avoid this?
Another thing I should mentionis that "delta_time" is much higher (up to 8 times) in the first step after the "Room Start", but I managed to get round that.