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."

4 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. 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."
  3. Re:SDL is overrated by voodoo1man · · Score: 2, Interesting
    For a dead-simple graphics API, check out TinyPTC, which is unfortunately Windows-only. But the design is absolutely beautiful.
    Are you referring to the GPU shader-accelerated version of TinyPTC? The webpage itself states that the current version uses software blitting (and runs on a bunch of platforms) with optional MMX optimizations, which would make TinyPTC as fast as worst-case blitting in SDL. If you want to do hardware accelerated blitting with masking/alpha, I really can't see a better interface than what SDL provides - if you care about performance, call SDL_GetVideoInfo and use whatever mode the video card has acceleration for, and if not just use whatever you want and SDL will handle it in software with MMX optimizations like TinyPTC does in all cases. Sure, there are a few functions in SDL that I never use, but I wouldn't exactly call that poor design. I really am wondering why you think that graphics in SDL are so bad. If you said that about sound, I'd be inclined to agree with you, but when it comes to graphics I think SDL is really well designed, especially considering the alternatives.
    --

    In the great CONS chain of life, you can either be the CAR or be in the CDR.

  4. 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 ...