An anonymous reader tells us:

If you have this fantastic book from John R. Hall/Loki (Pub: NoStarch, ISBN 1-886411-492), you will have no doubt have downloaded the source code from NoStarch's website.

Unfortunately, for a modern distro, the code will just not compile out of the box.

I've now gone through all of the code and fixed it so that you can just dearchive out of the box and make the examples (except for the Chapter 4 SDL examples - I must have forgotten to put them in!).

It will now work out of the box with libsndfile, OpenAL and SDL with quite a number of corrections to the code and makefiles. All of the code is licenced under the GPL.

I have offered the updated code to NoStarch, but as yet have not had a reply. Should they reply and ask for the code to be removed, it of course shall.

If you don't have the book, shame on you! Go out and buy it, then download the amended source code.

http://www.all-the-johnsons.co.uk/linux/plg.html

Comments

Programming Linux Games is available for free download http://www.overcode.net/~overcode/writing/plg/
I own this book and it was a lot less useful to me when none of the code worked. Glad it's been updated.
Re: Sweet! posted by TheNodmaster on Aug 7 2004 1:51 AM
It's only the code which has been updated - I've not done anything with the text as that is far more problematic legally
Re: Sweet! posted by chizu on Aug 7 2004 12:33 PM

Yeah, but I generally get a lot more from the code than the text in these sorts of books. Seeing examples and tearing them to pieces making something new is my favorite way of figuring out how to code new things. The examples failing made the book a lot less useful to me, I read the text but didn't have working code to put it with. So, thank you for your work, it has improved the usefulness of this book immensly for me.

Another thing, you use absolute symbolic links in the package, this makes it necessary to relink all the media files when you unpack the tarball. It would be much more convienient if you used relative symbolic links.

Re: Sweet! posted by anonymous on Aug 7 2004 1:55 PM
The symlink problems (and lack of makefiles for the SDL stuff) will be fixed at some point over the next 24 hours.

I'm playing with some network code to enable Scribus (http://www.scribus.net) to be able to have multiple people to be able to edit the same document, so it may be Monday...

Re: Sweet! posted by TheNodmaster on Aug 8 2004 9:10 AM

I'm now uploading the fixes to the archive - should be done in the next 10 mins.

Changes :

  • Makefiles added to the SDL directory
  • Symlinks fixed
  • Slight bug fix to the final application (hardly anything really!)
Available NOW!
Hi, thanx for updating the examples :o) One thing I noticed while unpacking the Archive Programming_Linux_Games.tar.bz2 is, that there are many absolut symbolic links instead of files in it (bmps for example),all linking to /home/paul/...
or 11@ebay.
is that so? ;-)
Re: "forgotten to put them in!" posted by TheNodmaster on Aug 8 2004 9:11 AM
It happens to the best of us ;-)
Isn't it great, that the whole GNU/Linux OS is so compatible between versions. Windows could really learn from this! Oh wait.... nevermind :)

"Required quite a few changes." And people wonder why there are so few good games for GNU/Linux. I'm a programmer with too much time on my hands, so I can live with the whole "libsomething 1.1.2 breaks compatibility with libsomething 1.1.1." People that do this for a living, being able to choose between Windows and GNU/Linux, would be out of their minds to support GNU/Linux in it's current state.

Now, I'm not sure how old the book is... And if it was made for RedHat 4.0, then I can understand. But fact is, compatability is very fragile in GNU/Linux land.

Re: Compatibility posted by ldog on Aug 9 2004 7:11 AM
You're a programmer?

The problem you mentioned is not specific linux. API's changing over the years can affect programs written in any language for any operating system. The SDL code in the book is over 3 years old. SDL has changed a lot since then.

If you are publishing a game in binary only format, it may be wise to include the third party libraries with it. Many of the commercial linux ports of game do just this. Take a look where it installed. If it is using SDL, there's likely and sdl.so file in the game's directory. That compiled version of the library won't change.
Re: Compatibility posted by TheNodmaster on Aug 9 2004 12:45 PM

This is why I decided to remove the binaries from the source releases - as it stands, I run Fedora Core 3 test 1 which means that libraries change frequently, but if you're using (say) RedHat 8, the version of the SDL dynamic libs are more than likely not going to be the same as the version I run

Personally, I take it as great testament to the speed of development of GNU/Linux that to keep things going, it's better to release source than binaries, but also that even though the code in PLG is 3 years old, with the exception of the network and sound code, the rest compiled and a perfectly playable game was available

For those interested, the Linux Game Programming code fixes and errata lists are coming along slowly as there are sooooo many problems with it! Don't expect anything soon!

Re: Compatibility posted by anonymous on Aug 9 2004 5:54 PM
Give the damn thing a break. Among some of the breakage, this book used pre-1.0 OpenAL, which is obviously broken now because the API wasn't mature yet by the time the book was written, but OpenAL is pretty stable for a while now, hell it was used in many commercial projects over the past two years (including the Unreal 2.0 engine).
I really appreciate your effort in updating these examples. The book is slowly on the way out (can't find it in many bookstores these days), but there are a lot of copies out there, and hopefully it will continue to be a useful reference.

If you don't get a reply from No Starch, let me know and I'll make sure the new archive makes it to their website.

-John Hall
author, Programming Linux Games
overcode at overcode dot net

Log in or register to post a comment.