Friday 21 March 2014

Out of the Box

So the next step is to "get out of the box" and implement us some scrolling. This implies a camera too, yay!

Basically what we have here is a map of repeating tiles, with the camera deciding exactly which portion of that tile map to render to the screen.

We also had to add the functionality for rendering the sprites in world space - that means offset depending on the position of the camera. Finally, we can tell the camera to "follow" any renderable object, thus keeping it in the center of the screen. More on that later.

The camera is a bit like the spoon. It doesn't really exist. It's just a bunch of cleverly organized and updated numbers. Pretty nifty.

The first go looks something like this:

No comments:

Post a Comment