Slashdot Mirror


Open Source Game Development

Boudewijn Rempt writes "Amazon's recommendation system recommended me "Open Source Game Development: Qt Games for KDE, PDA's and Windows" when I was looking for an introduction to OpenGL. While it does contain two chapters on OpenGL, there's much, much more. It's not just an introduction to writing open source games, it's a complete introduction to participating in open source projects like KDE." Read the rest of Boudewijn's review. Open Source Game Development: Qt Games for KDE, PDAs and Windows author Martin Heni, Andreas Beckermann pages 554 publisher Charles River Media rating 8 reviewer Boudewijn Rempt ISBN 1-58450-406-4 summary Complete guide on writing small to medium games for Linux, Windows and PDA's using Qt.

As maintainer of Krita, the KOffice paint application, I need to know about graphics. Unfortunately, the four months of retraining from sinologist to Oracle Forms developer that launched me into a life of coding didn't include anything on graphics, and certainly not on OpenGL. Which is very much where Krita 2.0 is going.

So... I was looking for an easy introduction to OpenGL to kind of ease my way into the Red and Orange books. And Amazon's weird recommendations system recommended Open Source Game Development: Qt Games for KDE, PDAs, and Windows by Martin Heni and Andreas Beckermann to me. Intrigued, I ordered the volume forthwith. Turns out that that was a good move: this is an excellent book.

In the first place, the text is very clear and concise, but never dry. Forget about the ho-ho-I'm-funny chatty style that's prevalent in many technical books. This book comes to the point immediately. Then, the information is carefully ordered and the presentation very neat and clear. Those would be good points for any book.

But what makes Open Source Game Development: Qt Games for KDE, PDAs, and Windows even more interesting is that it's much more than its title indicates. It is squarely intended at the hobby coder who wants to work on what the book calls "desktop games" -- not the multi-million dollar multimedia productions that demand a new graphics card every half year, but the games that you play while thinking out a knotty problem or that have some educational value for your kids. The kind of project a single coder, or a small team can complete and maintain while still staying sane. And, of course, that kind of game, defender or zaxxon-type games, maze games or tetris-style games work are perfectly suited for pda's and mobile phones, too,

Actually, this book is the perfect introduction to joining a big Open Source project I've seen. Of course, the focus is on Qt and KDE, which means that if you always had this itch to join KDE development but didn't have the necessary skills, this book will help you get there in a very pleasant way.

One way this is done, is by always first giving a general introduction to a topic, and then more detailed discussion in the next chapter. So, first we've got a very good "Qt Primer", and three chapters "KDE Game Development", "Qt Game Development Using Microsoft Windows" and "Game Development and PDA's". And there's a chapter on "OpenGL" in general, and then a chapter on "OpenGL with Qt".

The first part of the book deals with this type of introductory material. The second part discusses "Artificial Intelligence", "Pathfinding" (this chapter was a revelation to me -- I never understood how that worked. If only I had this information while trying to write games for my ZX Spectrum!), "Particle Effects" and "Math and Physics in Desktop Games". The material in these chapters is foreshadowed by the very first chapter "Introduction to Desktop Gaming", which deals with game balancing, architecture and the ins and outs of developing free software. Armed with these chapters, you can add enough game play to your games to make them satisfying to play.

The next three chapters discussion the Qt network classes and how to use them in your games, the KGame library (free software, of course), that contains a lot of boring groundwork that's the same for most games -- players, input devices, network stuff. For me personally, the "XML" chapter wasn't that useful, but then, I'm a corporate cubby-hole programmer by day, and XML is my bread and butter. It's amazing how many billable hours XML can add to a business application project.

A very important chapter, "Open Source and Intellectual Property Rights" makes it very clear what's allowed and what not. The summary chapter, "A Practical Summary" is a novel idea -- at least, I hadn't come across something like this before -- and it works quite well, tying all strands together. There are plenty of references to earlier chapters, so if works like a kind of hands-on index. Not that the actual index isn't top-notch, too.

I should make clear that this book is not just about coding for KDE. That's what most interesting to me, but if you want to code a game for Windows, for a Qtopia or Qt/Embedded environment, then this is the right book. After all, with the release of Qt4 under GPL for Windows (Qt was already released under GPL for X11 and OS X, as was Qtopia), Qt is a good choice for Windows hobby programmers. You get a high quality toolkit that really helps with the boring ground work, and excellent documentation. Coupled with the clear text in this book, there's nothing to hold you back.

Andreas Beckermann is the author of Boson, an OpenGL real-time strategy game based on Qt and KDE. His experience in working on Boson really is apparent in this book. Martin Heni has written a couple of games that that are in KDE's games pack, and has won a prize for his QTopia game Zauralign.

Oh, and the chapters on OpenGL and OpenGL with Qt were enough to make me understand the OpenGL Krita already has and did prepare me quite adequately for the big Red and Orange books. And I've got the itch to write a little game now..."

You can purchase Open Source Game Development: Qt Games for KDE, PDAs and Windows from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 147 comments (clear)

  1. I like CrystalSpace by CrazyJim1 · · Score: 3, Informative

    CrystalSpace requires good C++ and 3d skills, but its a very nice open source 3d coding system.

    1. Re:I like CrystalSpace by Malawar · · Score: 3, Informative

      Ogre3D is a very nice LGPL 3D Graphics library. It does have precompiled libraries for Windows available for download, but compiling from SVN is a snap as well. While it doesn't have the other parts of a game engine (sound, networking, physics, etc), there's always other libraries that work well with it, such as: The Open Dynamics Engine for physics, OpenAL for sound and SDL for crossplatform network and input. Ogre's visual quality can easily compete with a lot of top game engines today, as well.

  2. Re:Small is good by xtracto · · Score: 4, Informative

    there are hundreds or thousands of GPL game projects on SourceForge, and most of them are dead
    There are 22141 games listed in SourceForge.
    Of those, 575 (2.59%) are INACTIVE,
    7637(34.5%) are in PLANNING.
    6022(27.1%) are in PRE-ALPHA.
    4302(19.43%) are in ALPHA
    4453(20.1%) are in BETA
    3592(16.2%) are in PRODUCTION-STABLE
    460 (2.0%) are in MATURE.

    Which does not add to 100% because some games have more than two states, however it seems there is a really high trend towards "Unfinished" games. Or as I read from some game developing book, EVERYBODY can have a good game idea, but it takes some hard effort to actually implement it, and it takes really hard nuts to finish it.

    And as you said, a game is in fact FINISHED, not like said, OpenOffice, which will never be "finished", with games you can only make bugfixes, but a new game version is something completely different.

    --
    Ubuntu is an African word meaning 'I can't configure Debian'
  3. SDL rocks for cross platform game developement by Anonymous Coward · · Score: 1, Informative
    We managed to effectively rewrite xpilot in SDL/OpenGL and porting across platforms then became trivial.

    XPilotNG (5 stars on Tux games)

    http://sourceforge.net/project/showfiles.php?group _id=13411&package_id=15770

    Works on just about everything , but there are packages for Linux / Windows and Mac OSX.

  4. ISBN is incorrect by Anonymous Coward · · Score: 0, Informative

    The ISBN mentioned in the article (1-58450-406-4) is incorrect. It identifies the book "GNU/Linux Application Programming" by M. Tim Jones. The correct ISBN is 1584504064.

  5. Re:3d engine resources by nexusone · · Score: 2, Informative

    some good general sites:
    http://www.xmission.com/~nate/tutors.html basic's
    http://www.gamedev.net/ Game programming
    http://nehe.gamedev.net/ OpenGL programming/game site

    --
    Wise men speak because they have something to say, Fools because they have to say something!!!!
  6. Re:Linux Games (SDL, OpenGL) by omeomi · · Score: 2, Informative

    but please tell any decent designer, sound fx creator or graphics drawer to give away their time just "for fun" and you wont get really a lot.

    Actually, it's not at all uncommon for these folks to work on indie games for free, especially when they're just starting out...the game industry is generally pretty difficult to get into without having at least a few games under your belt, and one of the most popular ways to do that is to do work for free. Many of the people doing this are, in fact, quite talented, but have yet to really prove themselves.

  7. Re:Linux Games (SDL, OpenGL) by Excors · · Score: 2, Informative
    one of the big goals of a lot of open source games is to be able to run on older hardware. This isn't necessarily a bad thing, but it does mean that it limits the quality of the artwork. Many commercial games are released when even a top-of-the-line gaming rig can barely get top performance, while many open source games tend to be written to run on any machine built in the last 5 or 6 years.

    Five years ago saw the GeForce 3 (although admittedly as the high end, not "any machine"), which is perfectly capable of making good-looking games as long as you rely on decent art rather than just adding HDR and bloom and bump-mapping and specular highlights and hoping it'll look good - we've had some reasonable success using none of those features. Currently the only pixel shader in the game is for high-end water, and we have an equivalent effect for GF3/4s; pretty much everything else is just a plain texture map. You can even run modern games like Oblivion on a GeForce 3 and it looks good (though it doesn't run quite so smoothly).

    It is a bit harder if you want to support the common integrated graphics chips with limited memory and processing power - but I'd tend to blame ugly games on bad art instead of a bad graphics engine. Anyone can download OGRE and set up a rendering system with modern features, but artists are much harder to find - contributions from people like you can make a big difference (at least when the programmers are happy to accept it)!

  8. Re:Does it answer a really important question? by swillden · · Score: 2, Informative

    you wont be doing andy "reverse engineering" thus not breaking the law.

    Just a clarification: Reverse engineering is not illegal. If you've agreed to some contract that prevents you from performing reverse engineering, that's contract violation, and if the reverse engineering you do is to work around copy protection designed to prevent copying of copyrighted works, then distributing a tool that bypasses the copy protection system is illegal. Finally, if you reverse engineer something so precisely that your reversed implementation appears to be a duplicate of the original, then you may be accused of copying, which could land you in court. The notion of "clean room" reverse engineering was invented to ensure that the copyright owner had no prayer of claiming that the code was copied -- not because clean room reverse engineering is actually necessary, but because it's safer than the alternative.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  9. Re:Linux Games (SDL, OpenGL) by Mant · · Score: 2, Informative

    Just look at all the free mods for popular games and you will see plenty of people are prepared to give free content, including modeling, skinning and animation.

    The problem is, I think, people who do content want to see it in the game. You can get them to do it for a mod for an existing and popular game, but its going to be hard to get anyone to add content to you half complete, always being changed open source engine.

    An engine without content though isn't going to interest anyone, so it's something of a catch-22.

  10. Re:3d engine resources by Faraday's+Sloth · · Score: 2, Informative

    Well, this comment is kinda lateral (as in 'not related to opengl and games'), but I think you'd appreciate flipping through a few basic computer graphics books and related maths --- after all, opengl is just an implementation of the few of the most basic concepts and the red&blue books are mostly 'just' technical reference manuals. getting a handle of the basic concepts also probably clarifies what you actually want to do with the code.

    Graphics:

    watt&watt: Advanced Animation and Rendering Techniques - not a very recent book but the material is still relevant and the presentation of different concepts is relly good
    Hearn & Baker: Computer graphics (c or opengl version depending on your preferences). Basic computer graphics. Pretty good. The opengl version eschews some of the more basic code samples from the c version, which is a bit shame really.
    Moller & Haines: Real-Time Rendering - relevant for real time applications and contains great references to computer graphics resources in general

    Geometry & linear algebra:
    Philip Schneider & David Eberly: geometric tools for computer graphics (contains recipes for eg. checking collisions, raytracing, clipping...). Might be not best book of this type(?) but it's ok.

    Freely available online material:
    comp.graphics.algorithm faq:
    http://www.faqs.org/faqs/graphics/algorithms-faq/

    The physical modeling course of David Baraff available online is quite nice:
    http://www.cs.cmu.edu/~baraff/sigcourse/index.html

    Graphics gem's codes:

    http://www.acm.org/pubs/tog/GraphicsGems/

    The book's themselves are also excllent recipe repositories, but really useful only after you know the basic concepts from basic textbooks etc. ...and, if you have the access then the http://portal.acm.org/ stuff is really good. (search for 'siggraph "course notes" for starters') You can find details to most of the stuff Pixar, Alias etc. do from there...

    If you have the time and resouces, then the Moller & Haines book is a decent roadmap to the field ("Oh, what's this...let's see the referred book/article has to say.. oh, that's interesting!") from the grass roots of z-buffers up to modern fps engine concepts.