Graphics for Beginners (Using SDL) 51
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."
SDL Rocks!! (Score:5, Interesting)
If you're using SDL for games, you should also look into:
NET2 - Fast Networking for SDLNet [gameprogrammer.com] 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.
Re:SDL Rocks!! (Score:1)
PyGame is where the Python and SDL integration really got me interested though - I was concerned about performance but I never ran into a problem with that, PyGame is a fast as you'll need.
Playaholics - Free online games, scoretables and a whole host player stats [playaholics.com]
Re:Programming... harder?! (Score:2, Funny)
I wrote it in FORTRAN, though, not assembly.
A friend of mine enhanced it to do flip-card animation, but the animation was pretty bad, due to the fact that (IBM) punch-card holes are pretty spaced out.
Also... (Score:5, Informative)
http://www.nostarch.com/frameset.php?startat=pl
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
Re:Also... (Score:5, Informative)
Re:Also... (Score:3, Informative)
http://www.tux.org/pub/tux/plg/ [tux.org]
Back in my day... (Score:4, Funny)
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.
There are a couple of Ruby/SDL games... (Score:4, Informative)
Mod me down, eh? (Score:2)
Do you actually do any work on Ruby or do you just spend your time trolling message boards and mailing lists?
PS, I know where you live and work. Ever been to the theatre at Worldgate? I bet you have. You don't want some albino storming into your life and fucking up your shit.
Re:Mod me down, eh? (Score:2)
Do you actually do any work on Ruby or do you just spend your time trolling message boards and mailing lists?"
The sad part is that I know you are serious as well as telling the truth.
I think the same thing virtually everytime I see him post.
Re:Mod me down, eh? (Score:2)
Do you actually do any work on Ruby or do you just spend your time trolling message boards and mailing lists?"
The sad part is that I know you are serious as well as telling the truth.
I think the same thing virtually everytime I see him post.
I call BS. I checked his post history...and he mentions Ruby infrequently.
Re:Mod me down, eh? (Score:1)
Yup, I use it at work for various things, and I wrote a little SQL analysis thingy in it.
> I know where you live and work
Hm, yup, not hard to find...
> Ever been to the theatre at Worldgate?
Nope. Most of the time I work down in Arlington on a client site.
> You don't want some albino storming
> into your life and fucking up your shit.
Hm. Why would you do that?
Re:What the fuck? (Score:1)
Don't know... just seemed appropriate in this case...
Re:There are a couple of Ruby/SDL games... (Score:2)
Re:There are a couple of Ruby/SDL games... (Score:2)
thats, like, SOO great
I never would've thought anyone would actually use SDL...
let alone from RUBY.....
Don't tell me the perlmongers, pythons and/or javastics did it as well?
WOW, they did????
thats, like, SOO great
I never wou.....
Ad infinitum, ad nauseam
</SARCASM>
SDL == DirectX without the MS millstone (Score:5, Informative)
It's an approximation, and there's some things which each set of software does markedly better than the other [slashdot.org], 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:
These advantages are usually enough to handsomely compensate for any peripheral shortcomings (e.g. no force-feedback API, slightly smaller texturing envelope).
Looks awesome! (Score:4, 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!
SDL is overrated (Score:5, Insightful)
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.
Re:SDL is overrated (Score:3, Informative)
Other than that, I doubt anyone uses SDL directly. I wrote a high level framework on top of SDL, at a level of abstraction similar to Flash. It's quite good for doing that, precisely for being so low level and not forcing you to do things in a certain way. For the results, see my sig.
Re:SDL is overrated (Score:2)
I wouldn't call it a low-level API, just that it has tight focus on what it's supposed to do. As such, it doesn't need to be messy; that's just poor design.
For a dead-simple graphics API, check out TinyPTC [gaffer.org], which is unfortunately Windows-only. But the design is absolutely beautiful.
Re:SDL is overrated (Score:3, Interesting)
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 tha
Re:SDL is overrated (Score:2)
No. I can't find any information on real code for such a thing.
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.
TinyPTC gives you a fixed format frame buffer and a call to convert and copy it to the screen. That's all. So if you want to do software blitting (which is what the ori
Re:SDL is overrated (Score:2)
Re:SDL is overrated (Score:2)
Re:SDL is overrated (Score:2)
What ever happened to 2-D graphics? (Score:2)
CreateDIBSection() allows blitting a raster to the screen. I call a raster a memory array of pixels where you can control all of the pixel values. OK, CreateDIBSecti
Re:What ever happened to 2-D graphics? (Score:2)
HTML, anyone? (Score:4, Interesting)
Re:HTML, anyone? (Score:2)
Re:HTML, anyone? (Score:2)
And javascript is at least a better first language than BASIC!
Oh, I see this is the funny part.
the 5k compo (Score:3, Informative)
Check out some of the winners from the last 5k compo [the5k.org]. Really cool stuff.
Re:HTML, anyone? (Score:2)
Re:HTML, anyone? (Score:1)
Heh. Off-topic, but this phrase caught my eye, because just minutes ago I was pounding (well, more like tapping) nails with a pair of needlenose pliers. Why? Because it was a tight spot, a repair job of re-sinking nails that had been pulled loose, in a space where no hammer would fit.
For initial construction, there's usually a specific right tool designed for the job; but things can break in so many different and interesting ways that often crea
SOL! (Score:2)
SDL is good, but not the holy grail (Score:1)
Allegro (Score:1)
http://www.talula.demon.co.uk/allegro/
also see http://www.allegro.cc/