G
Greg5000
Guest
Okay, so I have recently got my game to a point where it is near completion and have been in the process of testing it on weaker computers to get a flavour of how it will perform. On my i7 laptop with a GTX960 graphics card it runs at a solid 200-300 FPS, this is good. However on other computers I notice it varies greatly with some noticeable lag.
As such I think a bit of delta_time is in order to make sure users don't get a terrible laggy experience. I have integrated delta_time successfully into all movement and character animations, however I have a lot of alarms to configure.
As alarms count down at a rate of -1 per step I added some code to the step event as follows:
if alarm[0] != -1
{
alarm[0] ++;
alarm[0] -= global.delta;
}
The above makes perfect sense in my head.. each step the alarm depreciates by 1, this 1 is then added back on (effectively pausing the alarm) and then the alarm subtracts 1 multiplied by my delta variable (which works a treat for movement so I know I have coded this correctly). However in practice the alarm simply seems to be paused.
Can anyone think why the above would not be working? I've read that when using delta_time you have to use a custom alarm system.. but I don't see why my work-around falls flat?
Thanks.
As such I think a bit of delta_time is in order to make sure users don't get a terrible laggy experience. I have integrated delta_time successfully into all movement and character animations, however I have a lot of alarms to configure.
As alarms count down at a rate of -1 per step I added some code to the step event as follows:
if alarm[0] != -1
{
alarm[0] ++;
alarm[0] -= global.delta;
}
The above makes perfect sense in my head.. each step the alarm depreciates by 1, this 1 is then added back on (effectively pausing the alarm) and then the alarm subtracts 1 multiplied by my delta variable (which works a treat for movement so I know I have coded this correctly). However in practice the alarm simply seems to be paused.
Can anyone think why the above would not be working? I've read that when using delta_time you have to use a custom alarm system.. but I don't see why my work-around falls flat?
Thanks.