Thursday, June 14, 2012

Go Big or Magnify It

In my research about lighting and different ways to go about dynamic lighting, I came upon something that I hadn't self taught myself about - Render Targets.  They solve a huge issue with my game, and I have not built my game on them, so I'm about to start a (hopefully not so huge) overhaul of the game code.

Basically I've been writing my code to work in two forms.  One that is twice as big and pixelated (the way I want it to look) and regular size, so that it may be possible to play with things small, but looking sharper. I did this by setting a 'scale' variable to work at x1 and x2 and had everything viewed in the game shift that much.

With Render Targets, I can take a snapshot of the entire screen (in my case, the screen would be small), and blow it up twice as big, or any size really for any screen, any resolution. It seems so easy. It solves all the pain-in-the-rear math of moving things twice a distance with larger sprites, and makes it easier to create multiple screen sizes.

Time to overhaul. *sigh*

No comments:

Post a Comment