[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Announcement: SDL Game Contest



I'm bummed I missed the meeting where SDL was  discussed. :(

I just picked up "Programming Linux Games" by Loki Software inc (with
John R. Hall).  I've read the first 140 pages so far (out of 413).
Overall, I like the book.  It's pretty straight-forward, and seems to be
a good introduction to SDL.  It doesn't assume that you know a whole
lot.  It begins with a discussion of development tools from editors
(such as vi, emacs, etc.) to gcc and makefiles, to debuggers such as
gdb.  It doesn't spend any time at all on teaching you to use vi or
anything like that. It discusses editors only briefly to compare them in
terms of using them to edit code.  It's coverage of makefiles is a good
review.  It discusses creating and using shared libraries in Linux,
which is a topic that I needed to understand better, so that was nice.
It has a really nice explanation of gdb along with examples of how to
use it to find errors in your code.  It even discusses remote debugging,
which is nice if you are writing a game.  It gives a great tutorial on
CVS.  It also explains how to create patches.  Each of these topics is
covered with an emphasis on how to use the information.  I can't rave
enough about the usefulness of the first 30-60 pages of the book to
anyone who want's to write C under Linux.  Then, the book goes on to
cover the SDL (Simple DirectMedia Layer) which is a cross platform
multimedia library (which is used by a lot of the software Loki Games
puts out.)

The SDL framework seems pretty cool, with a few rough spots.  The great
thing about SDL is that it is cross-platform.  That means it makes
porting your games from Linux to Windows and MacOS easy. :)  SDL has
API's for sound and graphics.  You can integrate it with OpenGL too, if
you want to do 3D graphics.  (The book doesn't cover OpenGL though.
OpenGL is a bit complicated, and really does deserve its own book.) 

The rough spots you ask?  Well, I can see two potential rough spots.
The first is threads.  The SDL has its own thread library that is
supposed to work well on any platform.  I say "supposed to" because of
my experience with threads in Java.  Some platforms (like Macs, for
example) use cooperative multitasking.  I once wrote a simple Connect-4
game in Java.  On the Mac, the thread that refreshed the display would
lock-up whenever another thread was calculating the next move.  The
problem was that the other thread was not "coperatively" yeilding the
processor so that the other thread could update the display.  The
solution was to put in a bunch of "Thread.yeild()" calls to force the
thread to let other threads do their things.  But that was a really ugly
solution.  In any case, I wonder how well the threads in the SDL really
work on different platforms.  

The second rough spot is sound.  The sound API, at least as it is
covered in the book, could use some work.  It seems to support WAV
files, but apparently lacks support for many other formats.  The book
quips, "are you interested in writing one for us?"  My only other
problem with the sound API will probably be cleared up when I read the
rest of the book.  The example program that they use to demonstrate
sound seems pretty complicated.  I'm hoping that it is complex because
they wanted to demonstrate every possible feature of the sound API.  If
not, then there is a great oppurtunity to contribute to the SDL project
by writing a simpler way to play sounds.  In case some of you have
experimented with sound under SDL, is it really necessary to write your
own callback to do mixing?  Or is that an optional thing that you can
do, but do not have to do?

Oh yeah, one more thing.  Looking at SDL makes me miss Java.  Though I'm
sure C  is much faster for game programming.  

In any case, using the SDLlooks like a lot of fun and I wish I had more
free time to play with it.  
                          
         
By the way, Nathan, what does your game do?

Randy
           

      




-----Original Message-----
From: yawn@emacinc.com [mailto:yawn@emacinc.com]
Sent: Saturday, September 15, 2001 8:12 PM
To: silug-discuss@silug.org
Subject: Re: Announcement: SDL Game Contest





No Starch Press, publishers of PROGRAMMING LINUX GAMES, is pleased to
announce an
SDL GAME DEVELOPMENT CONTEST, open to entries from game developers
worldwide.

Create a complete SDL-based computer game under 1 megabyte, and send it
to
games@nostarch.com by DECEMBER 1, 2001 and you could win the entire Loki
Software
game library, books from No Starch Press, a subscription to Linux
Journal magazine,
and more!

Contest details: www.nostarch.com/?games
Questions: games@nostarch.com
--------------------------------------------------

	This is the same graphics/gaming library that I gave talks on at
two SILUG
meetings.  My game is a bit large to qualify, and not nearly impressive
enough. ;) 
But if anybody has any questions about it, I might be able to help...


Nathan Yawn

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.