I moved to a new URL! Check it out!

Dev Log: Game Loops

Dev Log: Game Loops
I pretty much spent the whole day learning that certain video cards, or hardware configurations, seem to really hate rendering large textures.

Image


I've been messing around with some early versions of the background for my new game. I'm composing it from a number of images -- there's the ground, a couple of gradients for water and haze, and a couple of cloud layers. All of my desktop machines seem to have no issue running this (the render time is 1 to 2 ms) but my laptop seems to get very upset about this with a render time of nearly 15ms.

I also discovered that using the SetFramerateLimit() function in SFML is bad news, at least in C# land. I sent my current build to a friend who ran it on his Macbook (running parallels to boot into Windows) and it ran at about 30 frames per second (short of the desired 60.) His Macbook has no problem playing any other Windows games, so this was a bit odd. After messing around in the game for about 5 minutes the framerate jumped to 60 for no reason that we could see. Super weird.

After these weird results I went back to my code and ripped out the SetFramerateLimit() in favor for my own timing code that would limit the framerate. Not only does this seem to just work better than SetFramerateLimit(), but it also fixed the framerate on my friend's Macbook.

Image


Eventually I will be releasing the full source of my framework for people to laugh at, or possibly use and contribute to. I haven't yet reached the point where I think I can do that comfortably, but I would imagine that sometime this month I'll be ready to show it off. It's very similar to Flashpunk, and is basically a big mash up of a lot of the engines and frameworks I've seen or used. In the mean time, you can also check out #Punk by Jacob Albano which is more of a faithful port of Flashpunk to C# using SFML as the core.

Comments

Jacob Albano
Jacob Albano
Thanks for the shoutout! Just wanted to say that #Punk is super broken a lot of the time right now, so it's not for the faint of heart.

Also, I'm still working on the new Glide API, but I've been sick the past few days so progress hasn't been great. Shouldn't be too much longer hopefully. :)
Posted July 2nd 2013 12:33 PM
new comment!

Post your comment!

Name
Email
Comment