C
CrosisBH
Guest
I have a simple measure for ensuring that the game doesn't lag. I just deactivate the objects I can't see. My plan was to simulate the actions done by the object as they are activated.
Say something is rotating 1 degree a second, and It deactivates for 10 seconds. When reactivated, I want it to have 10 degrees added to it.
If I wasn't using Game Maker (I am because I am incapable of making a good game engine in Java), all nonplayer objects would be the child of a nonplayerobject abstract parent. This is doable in Game Maker of course, but what I would do is create an method, something like this in the parent object (Java)
And simply when it's reactivated I would call this method, inputting the amount of time that it was spend inactive. I can calculate this by setting a timer on each object that ticks for how long the object is active.
And this would be called on anyone who is a child of the parent object, and do it's own separate ticking. Some would move, some would rotate, some would regen hp, etc. So I want a abstract way to invoke the step event for a certain amount of ticks. Is Game Maker just not for me in this situation, or is there a way to do this?
Say something is rotating 1 degree a second, and It deactivates for 10 seconds. When reactivated, I want it to have 10 degrees added to it.
If I wasn't using Game Maker (I am because I am incapable of making a good game engine in Java), all nonplayer objects would be the child of a nonplayerobject abstract parent. This is doable in Game Maker of course, but what I would do is create an method, something like this in the parent object (Java)
Code:
public void forceUpdate(int ticks){
for(int i = 0; i<ticks; i++)
update();
}
And this would be called on anyone who is a child of the parent object, and do it's own separate ticking. Some would move, some would rotate, some would regen hp, etc. So I want a abstract way to invoke the step event for a certain amount of ticks. Is Game Maker just not for me in this situation, or is there a way to do this?