SDL / linked lists

Discussion in 'Mac Programming' started by Muncher, Oct 25, 2009.

  1. Muncher macrumors 65816


    Apr 19, 2007
    Recently I've been getting back into programming. I've always wanted to try to make a simple platform game with SDL. I've searched around for an SDL library that handles sprites and other functions, because SDL is quite primitive in terms of drawing support. Can anyone recommend me a simple library that I can use to help with the game?

    Alternatively, I was thinking of ways I could implement it myself. I generally prefer using procedural programming practices over OOP; I write code much quicker that way and it confuses me much less. But I'm doing an iPhone programming class now so I realized I might as well try some objective c as I'd be doing it anyway later. To handle sprites and drawing in general, I thought I'd use linked lists, where I could append objects to be drawn onto a list and then have the list draw itself starting from the first object downward. I wrote some code that seems to work, but I want to keep the linked list class "pure" and reusable which I'm finding hard. Right now I have character/other sprite classes inherit the linked list class and implement a protocol that ensures they can be drawn if asked to. Instead of using the linked list class as an abstract class, should I make list objects and give them pointers to different objects?

    If I've made some terrible mistakes here (in terminology or code practices or something) please tell me. I'm really just getting into object oriented programming for real for the first time.

    Thanks for your help,

Share This Page