• entries
686
1952
• views
387964

# Age of da Grub (too much Gears of War)

65 views

Well, I completed everything on that list that I posted last time.

I added the ability for entities to be deleted in the level editor. This wasn't so much for my sake, but I want this game to be easy to create levels for when it is finished. So yeah, it works. It required me to use a linked list to store all editor entities(it was painful), but it works.

Second, I now use a timer to handle frames rather than SDL_delay. The function I use is:
bool NextFrame(int t){	static Uint32 cur_time = SDL_GetTicks();	if((SDL_GetTicks() - cur_time) > t)	{	   cur_time = SDL_GetTicks();	   return true;	}	return false;}

And then:
if(NextFrame(12)){   // do stuff}

So now what is happening is that the program is still running in between frames, rather than being forced to wait until the next frame. I didn't know if this would make a difference, but I always thought using SDL_Delay was just not a good idea. The game now feels, noticeably smoother. I might just be imagining things, but to me the game seems to run slicker. I guess I'll let you all be the judge when you play the next demo.

There are no comments to display.

## Create an account

Register a new account