Saturday, December 1, 2012

A bunch of boring stuff

What you'd be missing if you skipped this post: nothing. Game development isn't always exciting, there's definitely boring stuff mixed in with the fun. I'm choosing to tackle some of those issues early, since I'm sure they're not fun near the end of a development cycle when you're all stressed out anyway.

So, a couple of minor technical things:

  • Switched from the manual filling of a dynamic vertex buffer (and subsequently calling DrawPrimitives) to just calling DrawUserPrimitives every frame. I fill my vertex buffer every frame since I don't really have any static content (tiles may seem static, but the programming model allows me to manipulate every sprite for every frame). Performance is about the same, as expected.
  • Since everything is a quad right now, it made sense to use DrawUserIndexedPrimitives instead. Slight performance boost.
  • And here's the stuff I really hate doing: handling 'lost device' exceptions (from ctrl+alt+del, for example), properly releasing and re-allocating all device-dependent resources, etc. Anyway, it works now, so that's out of the way. Full screen alt+tab is still a little messed up, but I'll save that one for another night.
Next up is some really fun stuff that I'm looking forward to implementing: scripting.



No comments:

Post a Comment