Slashdot Mirror


Graphics for Beginners (Using SDL)

Jari Komppa writes "Looking at how learning programming these days is much harder than when I was starting, I decided to write a tutorial on how to make graphics at pixel level. The aim for the tutorial is to show that programming can actually be fun."

10 of 51 comments (clear)

  1. SDL Rocks!! by trompete · · Score: 4, Interesting

    I used it for a game I wrote. It makes Threading, CDRoms, Joysticks, Keyboards, and graphics sooooo easy.

    If you're using SDL for games, you should also look into:
    NET2 - Fast Networking for SDLNet for multiplayer game programming. It basically has a separate thread that polls for Network traffic on your sockets and pushes events to your event queue. He even extends SDL events to be thread safe and FASTER.
    SDL rocks.

  2. Also... by eviltypeguy · · Score: 4, Informative

    Another great tutorial is the book called:

    http://www.nostarch.com/frameset.php?startat=plg

    One of the few programming books I've purchased that I didn't feel like I got ripped off in purchasing.

    Written by an Ex-Loki associated person John R. Hall

    1. Re:Also... by Krunch · · Score: 4, Informative

      Here it is. However it seems down for now but you can still grab it from archive.org.

      --
      No GNU has been Hurd during the making of this comment.
    2. Re:Also... by duckie13 · · Score: 3, Informative

      If you're looking for the actual text, I found it here:

      http://www.tux.org/pub/tux/plg/

      --
      "My days are less enjoyable because of people." ~ Johnny the Homicidal Maniac
  3. Back in my day... by Phatboy · · Score: 4, Funny
    We had to walk 500 miles uphill to get water than another 500 uphill back. We had to grind the flour with our hands, while it snowed. And it was proper snow then - so thick that you could hide cars in it most days, and that was in Summer. Now take programming, we had to write 500 lines of code to add two numbers together. And we liked it.

    And now you tell me programming was easier in my day? You, with your fancy SDL and OpenGL? I'd like to see you code once you've ploughed 300 fields in one day with your bare hands.

  4. There are a couple of Ruby/SDL games... by tcopeland · · Score: 3, Informative

    ...on RubyForge, including Magic Maze (which was inspired by Gauntlet) and Tadpoles.

  5. SDL == DirectX without the MS millstone by leonbrooks · · Score: 4, Informative
    OpenGL == Direct3D, SDL fills in the rest.

    It's an approximation, and there's some things which each set of software does markedly better than the other, but SDL+OpenGL is considerably easier to extend (e.g. the NET2 library mentioned above) so I'd expect to see it get better faster (cheaper :-).

    The big advantages are:
    • you're not tied to one platform, one manufacturer or a handful of languages; and
    • You can find out exactly what each function and parameter does; and
    • You can easily modify or extend anything (and no DMCA worries); and
    • You don't have to give away any rights before you start using it.

    These advantages are usually enough to handsomely compensate for any peripheral shortcomings (e.g. no force-feedback API, slightly smaller texturing envelope).

    --
    Got time? Spend some of it coding or testing
  6. Looks awesome! by breon.halling · · Score: 3, Interesting

    I've taken a quick glance at the tutorial, and it looks pretty good! As a Flash programmer, I've long been meaning to branch off into something more, um, sophisticated, and maybe this is the simple introduction that I've been waiting for!

    Many thanks, Jari Komppa!

    --
    "Yeah, well, Dracula called and he's coming over tonight for you and I said okay."
  7. SDL is overrated by Junks+Jerzey · · Score: 4, Insightful

    SDL has a couple of things going in its favor:

    1. It works.
    2. It's cross-platform.
    3. It's not trying to do too much.

    That said, SDL isn't particularly well-designed otherwise. It's awkward. There's too much underlying info exposed to the user. The "surface" abstraction is muddy, in that you can accidentally run without hardware acceleration too easily, and you do easily do other things that hurt performance simply because you didn't pay attention to barely documented flags.

  8. HTML, anyone? by magefile · · Score: 3, Interesting

    I had a friend who did 2-player "TANKS" in HTML, Javascript and CSS, simply by having tons of 1 pixel divs. Quite impressive ...