New member

Hi. I’m a SDL newbie. I’m looking around for a programming platform to
write simple educational programs for children. I need graphics, animation,
sound, text rendering, and reaction to mouse/keyboard. I just wrote a
purposeless program that covered all those bases, and it seemed straightforward
enough. Apart from a weird segfault when using TTF_RenderSolidText(), where
I’m not sure what I did to fix it (but it works now).

I’m writing in C presently, though I have fiddled with pygame.

One thing that would be nice, but I don’t know how to do it in SDL is:
In Java/Swing I can load an animated gif, draw it into a panel, and it
plays back the animation with no further effort on my part. Is this
possible in SDL?

Cheers,

Ross-c-----
Ross Clement (Dr)
Senior Lecturer,
Department of Artificial Intelligence and Interactive Multimedia,
Harrow School of Computer Science,
University of Westminster,
Northwick Park,
Harrow,
Middlesex,
UK HA1 3TP.

+44-20-7911-5000 ext. 4159

clemenr at wmin.ac.uk

Not directly, that I know of. I think it might be simple enough to use
SDL to set a timer, and then have a small event handler in your code that
updates any animated elements, as needed.

Someone sent me a nice piece of code for this that we use in Tux Paint
(a kid’s paint program, BTW :wink: http://www.newbreedsoftware.com/tuxpaint/ )
to handle the blinking “|” cursor in text mode.

Good luck!

-bill!
bill at newbreedsoftware.com "Hey Shatner, ya remember that episode of
http://newbreedsoftware.com/bill/ Space Trek where your show got cancelled?"On Thu, Feb 05, 2004 at 12:08:39AM +0000, Ross Clement wrote:

One thing that would be nice, but I don’t know how to do it in SDL is:
In Java/Swing I can load an animated gif, draw it into a panel, and it
plays back the animation with no further effort on my part. Is this
possible in SDL?

Ross Clement wrote:

One thing that would be nice, but I don’t know how to do it in SDL is:
In Java/Swing I can load an animated gif, draw it into a panel, and it
plays back the animation with no further effort on my part. Is this
possible in SDL?

Hi,

AFAIK, SDL currently doesn’t do such a thing. It’s a pretty low-level
API, so you’d have to load each frame of the GIF to its own surface and
blit them yourself.
There probably is an extension library that does something like that,
you could have a look in the list at libsdl.org.
For easily loading non-animated images (don’t know if it does animated
GIFs) have a look at the SDL_image library.

CU
Sebastian