Thursday, May 5, 2011

SDL, now what?

Ok, so I want to go from quick and dirty tech demo I copy/pasted from a website to something I understand. The website I got it from has several tutorials that actually spell out the data types pertinent to manipulating pixels. That's cool, but I wonder if SDL has primitives (boxes, circles, triangles, etc) so that not everything is so manual. Actually it would be slick to make my own functions for primitives.

Here are the next steps as I see them.
1) Get a screen up (640 x 480) that is a solid color.
2) Get a screen up that alternates from red to blue to green and back (every X milliseconds or by keypress or something).
3) Figure out how coordinates work and make half the screen red and half the screen green.
4) Make a tiled pattern (this is working towards the Wumpus graphics output) and figure out how to address the screen on a tile by tile basis - like tell it that tile x:3 y:5 should be blue - the function should figure out which pixels that tile is and just change that one tile.
5) By this point it should be a matter of taking the code that can address a grid of tiles and then be able to define what those tiles are (a solid color or picture) and call it the game board.

No comments:

Post a Comment