Friday, 21 March 2014

Getting Something on The Screen

This isn't supposed to be an overly technical blog, so I'll get the basics out of the way quickly. I've gone with SDL2 for its hardware acceleration and cross platform support. Everything is gonna work on Wiondows, Mac and GNU Linux. W00t!

So, building on top of SDL, we knock up a basic Renderable class and then derive a Sprite class from that. Ahhh sprites... graphics is one of the many things that I just can't do for shit. So for now I'll be begging, borrowing and stealing whatever the hell I can get my hands on.

Eventually, I'm gonna outsource and get some sweet graphics custom made but for now, a shout out to the folks at Yoda Soccer for making theirs available.

So, with some graphics and some code for getting them to the screen, we knock up a simple physics and math library and we code a ball with that nifty optical illusion, an input handler and we come up with something like this:

No comments:

Post a Comment