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.
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.
I was looking for a book easyng me into Qtopia, and it seems to fit the bill.
Thanks for an useful review.
How exactly do you make money on open source games? They are a different beast entirely from regular apps. If someone is paying for support for a game, then there's something very wrong going on. I mean, I'm all for open source software, but I've never been able to figure out how to code them, and still put food on the table. As a result, most of my games have been proprietary.
CrystalSpace requires good C++ and 3d skills, but its a very nice open source 3d coding system.
God spoke to me.
A large amount of Linux Game programmers make incompotent descions.
Take Boson for example.
There is no reason why Boson should be tied to KDE the way it is.
Some game programs don't utilize automake or autoconf at all.
Another problem is that some Linux game Programmers program are Windows programs who put in a minimum effort nessessary to build a Linux version.
The fact is that we need people to work on better Linux games and Engine Source ports.
Well, I understand this book must be an "introduction" but, I am sure there are several better books on OpenGL, personally I have read the "Beggining OpenGL game programming [Premmier Press]" which I think is quite a nice book if you are new to OpenGL.
I mean, besides of the OpenGL-QT bindings you will have to do (mostly just to create a GL window to render if it is similar to SDL) there is nothing magical in the GL-QT combination. I would recommend to get a nice KDE book AND a nice OpenGL book also, as the author said, besides the blue and red books (which I personally use just for reference . Another great book for OpenGl is the OpenGL Super Bible [Sams], and you can find a bunch of KDE books including the KDE Bible.
Of course if you want to go the "student" way, there is, as I have found, PLENTY of information on all of these topics. Just get into Gamedev.net, the Nehes tutorials are one of the best in my opinion.
Now, if looking for game development I would personally incline to SDL, which will provide you with almost everything you need like input support (joystick, mouse, etc), audio and also OpenGL.
As a last comment, could I ask the SlashDot editors do to their job and check (at least) the book reviews grammar/spelling. My native tongue is not English but it kind of hurted my eyes to read the review (which was quite nice anyway).
Ubuntu is an African word meaning 'I can't configure Debian'
That seems like pretty sensible advice - the phrase "game development" immediately brings to mind the big successful commercial games, but that's not the area in which open source seems capable of competing, and it is much more productive to realise that simple games can be more worthwhile to make.
As for why open source game development has problems when trying to emulate commercial game development, there was some discussion a while back; shamelessly reposting my comment from there:
On the topic of game development and OpenGL, can anyone recommend any books/websites/resources good for building OpenGL rendering engines from scratch?
I've recently took an intro course to GL and for a project written an MD3 (quake3 mesh animated model) renderer in Qt (bindings are easy and well documented with "Qt Assistant"). I've wanted to increase my knowledge of GL over the summer by building a relatively primitive rendering engine in C++, and perhaps evolving it over the course of the next few years. I'm considering starting with an importer for Quake3 maps (BSP trees). Ultimately I'd like to build something similar to (of course I'm sure much less advanced) that of the Irrlicht engine.
I've read through the Red Book and have already bought the Superbible. Has anyone any other resources which might help me design and build such a system?
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.
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.
...then please please PLEASE first take a look at the hundreds of other OSS games out there and consider building on (read: contributing to) one of those.
It's sad looking at the large number of games that have shown promise but for one reason or another have been abandoned or development has slowed or forked. We really don't need another nethack clone, MMORPG or 3D engine. We have all of those in abundance. What we need now is to build on these, both with shader code and good content. It's often easy to tell the OSS games from the commercial ones from a single screenshot because the commercial studios have good artists and the OSS devs don't (I am being overly broad here and there are exceptions such as Frozen Bubble, but these are rare).
One not-quite example: I am a fan of the excellent OSS flight simulator FlightGear. The latest version 0.9.10 has some nice ground textures and real-world data that makes for a truly beautiful view when flying at 30,000 feet. But the planes themselves look like crap. The model detail and decals are average but what really lets it down is the way the plane interacts with light. The engine is badly need of work to take advantage of OpenGL shaders. And the sky looks completely wrong. As you ascend beyond 50,000 feet you should see the sky darken to a very deep blue with some stars becoming visible but the engine doesn't allow for this (you're basically inside a big solid-blue sphere). Not vital properties for learning to fly a 747 I know, but still important polish for a realistic flying experience.
If you have a truly original idea then by all means start from scratch if nothing existing fits the bill, but don't just fire up a text editor and start another MMORPG from scratch. The OSS gaming community don't need it.
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
Anyone here have experience with a good isometric game engine in C, C++ or Java on Linux?
I'm not into sidescrollers or FPS, but I love isometric RPG and adventure games (even wrote one back in the day, and always itching to do so again).
Nothing is inexplicable; only unexplained -Tom Baker, Doctor Who
If your game depends on a load of exotic libraries, then you should jolly well provide them in their correct versions below the game itself on the downloads page.
Please don't support the dual license nightmare :
http://www.galatea.com/economics.html
The Book is published by No Starch Press, and is available from them for USD ~39 or one can be purchased at the bargain bin for USD ~5 or from eBay for USD 0.99. Covers all topics from modern Video and Sound and Network libraries in application development, and applied to entertainment purposes (which we all know is just a bend from business programming).
The author died recently (9th Month of 2005), and his page is still heldhttp://overcode.yak.net/. To summarize his death, a new and unusual Mole formed on his shoulder and within a Year it spread cancer throughout his body and lymphnodes. He was dead in a Year! He was a great man that I participated with in the forums at LINUXGAMES.COM. His book is a good reference, but is since depricated by the slowling changing APIs. John is an ex-employee of when LOKI was in business.
Those doctors made his last Year of life a living hell with all the medication they gave him. Remember folks: Vitamin-C suffocates cancer; therefore, avoid the consumption foods and drinks known to deplete Vitam-C such as Alcohol-tainted water and animal-flesh and most medication (like Aspirin).
without prejudice
It's clearly a Slashvertisement. But it teaches people how to contribute to open source projects.
Slashdot, help! How do I feel about this?
Weaselmancer
rediculous.
I know what you're going to say, you're a programmer, you can't make content. Lies! No, I'm not seriously suggesting you break out Blender or even 3d Studio. What I'm suggesting is that you, as a programmer, develop new and exciting tools for content creations. For example, how many open source tree generators are there available that are suitable for use with open source graphics engines? Zilch. Another example, can you write an algorithm that can turn a description of an animal's skeleton and how much weight there is on various points of that skeleton into a walking animation? How about a running animation? How about fighting animations? Can you write an algorithm that turns that same input into a fleshed out 3d model? You can? Great, we're half way to making all the content we could ever want.
"Programmer art" should not be a derogatory term for content whipped up by non-professionals.
How we know is more important than what we know.
Some Open Source Games
If you are talking about programming, it's all tools. A game engine is just as much a tool as photoshop, it just fits in a different spot in the pipeline.
I like to keep the actual software the player uses (the engine) absolutely as compact as possible, which means I spend a lot of time writing software that gets used in production only. For example: our tool chain supports all kinds of image formats for asset creation, but the data actually used by the engine is always in platform specific formats, and the engine never needs to support anything else.
It's pretty much common sense to do as much as possible offline, so I think you should avoid drawing an arbitrary line between 'tools' and 'game', and just enjoy doing any work that contributes to the end product.
Pick sensible project names that give at least a slight clue as to what the application does.
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.
That's fine and dandy for computer programs. But an open source computer game consists of more than a computer program; it also contains graphics and music. If I am composing the soundtrack for an open source computer game, how can I make sure that I do not inadvertently copy from an existing copyrighted musical work? What is the equivalent to "clean room reverse engineering" for open source computer game soundtracks and other music?
....we can have it reward us with porn if we blow up a 3-eyed-monster.
Table-ized A.I.
Volume.
Or in Pravda. Or from the mouth of our president when he insists the "insurgency" is collapsing from within.
Please get a clue.
Bonsai Kitten: TNG
... you should consider to improve/finish an existing game.
IMHO, the cooperation between game developers is less effective than the cooperation between other developers. Additionally there is a non-OSS scene which trys to develop games. I have seen a lot of (non commercial) game projects which try to stay proprietory (and stall with good intermediate results without releasing the source).
Writing games is not my main focus, but as a side effect (writing test programs) I have created some games: Panic, Shisen, Memory, Tetris, Sudoku, Startrek, Hamurabi, Wumpus and more.
Greetings Thomas Mertes
Homepage: http://seed7.sourceforge.net/
Project page: http://sourceforge.net/projects/seed7
To be honest, I also did the source compile on windows, but mainly because I'm crazy.
So what?, my dick is bigger than yours.
(note: the previous comment meant to be a joke...)
Ubuntu is an African word meaning 'I can't configure Debian'
You might start with www.wesnoth.org : "The Battle for Wesnoth"...
Who knows, maybe you won't have to write any code!
Why should games ever become "finished"? If there is a first-person or platform game, can't additional levels always be added to it? Can't new, exciting enemies and weapons also be added in newer versions? Can't the graphics get better and better, as newer hardware comes out?
The only reason why games are ever "finished" is because proprietary software companies want to put them into a box and release them, but even in the proprietary games industry, you still see companies releasing mission packs, which are essentially just version updates (new levels, new monsters, maybe some new gameplay, etc) for the original game.
The time for free culture is coming, because a lot of the software necessary for digital freedom has been created. It's now time to start thinking about free culture, which includes games, movies, music, comics, novels, artwork, and probably other things that don't come to my mind at the moment.
That means little or no interest from gamers. That could also be translated as "little o no money" as well.
Maybe Computers will never be as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]
> Remember folks: Vitamin-C suffocates cancer
Capitalizing on a man's death to spread your crank message. How nice.
Before you start calling me a lazy a-hole, take the analogy of the GUI. GUIs are what made computers of ANY kind a tool usable by anyone. Prior to GUI, idiots like me struggled with command-line interfaces, and creating something like King's Quest was completely beyond imagining. Obviously you can argue that it takes some artistry out of the equation, and that's valid, but the tradeoff of accessibility has a huge upside to it. It's like painting. A few centuries ago if you wanted to paint at all you had to make your own paints, canvas, brushes, frames, thinners - everything. I happen to know how to do all those things, but far more often I buy ready-made tools for the task so I can devote as much of my (little) free time to the creative expression of painting as possible. Obviously painting is a lot more accessible to people now than it was 500 years ago.
Fast-forward to today, and I like to think we're seeing the beginning of a similar development stage for gaming. Today, many of the most popular games have cutting-edge technology - that is usually a big part of their appeal: better graphics. But we may one day hit the wall of photorealism with graphics, just as we've hit a wall with 7-channel surround sound: when new games come out now, they do not ALL have unique proprietary audio engines - a musician records the music and sounds, and they simply get dropped into wherever they need to go.
Maybe one day it will be the same for graphics, networking, and other code. Maybe one day there will be engines and editors freely available that will let anyone sit down and just get creative, without having to be a programmer in order to use the tools needed to express that creativity.
For me, I see this as a philosophy underlying ALL tools: ultimately, a tool should be an effortless extension of human will, no different than your arms or legs or fingers and toes. Tools that unleash the human imagination with the least possible resistance are, in my opinion, an ideal towards which we should strive. Indeed we are striving towards that, even if it is not always consciously. Again, the personal computer - thanks to GUIs - is the best example I can think of.
To get back to a more relevant example, I used the mission editor of Operation Flashpoint several years ago, which is a GUI. To get things to actually work sometimes required editing the scripts by hand, but for the most part it worked really well. Since then I've often wondered how long it would be before we got to the point of having not just a mission editor for one game, but a game editor. Obviously the progression of technology is the wrench in the works, as I mentioned, which is why "Shoot-Em-Up Construction Kit" for the C64 was short-lived. But the idea was there. Maybe when we get to photo-realistic graphics just as we've long since gotten to totally 'realistic' sound, these sorts of toolkits will finally emerge - and maybe even open source and free for everyone.
A-Bomb
I just wanted to throw in a quick voucher for 'Sam's OpenGL SuperBible' as I picked it up this last weekend (3 days at the inlaws (-8). It's excellent. Being a 4-5 kilo book, it has both breadth and depth on the subject of OpenGL. As a math person, I wish that it touched a bit more on the linear algebra side of things but the fact that it keeps things within the mathematical grasp of about any reader while still being useful is probably a better decistion.
And while I'm posting (this doesn't happen often), I'd like to throw my two cents into the fountain of this Indie games debate. Good for you if you want to write a game, however... Do something new, do something creative, do something that you and your friends and family members and immediate contributors can realistically accomplish. And for the love of sanity, DO IT FOR FUN! If you're in it for money and it's not your full-time job, then don't bother.
Also, if you're a good programmer and find your game lacking content, consider procedural content. It really depends on the kind of game you're writing. The downside is that it can remove the beautiful, personal touch of human-generated content, and it is also very hard to do. The upshot is that if you really enjoy programming and are making your game for you own personal enjoyment, the challenge can be very exciting and entertaining. The second upshot is that procedural content when done well and applied to the right kind of game, can greatly add to replayability. This is the path that I've chosen for the game I'm writing right now (In-depth pausable real-time tactical starship combat). I'm having a blast!
1.) Don't start out open source. Id has only two games out lately -- Doom 3 and Quake 4 -- to which they haven't released the source, but they always wait till they really have no further use for the game.
2.) Open source it from the start, but sell the content under a different license. Id has also (technically) done this with all of their open source games -- I'm still legally required to buy the Quake 3 game if I want the Quake 3 maps and models, though technically I could redo all that and still use the engine.
Don't thank God, thank a doctor!
I think the problem of the content would be solved with some kind of Will Wright's Spore content editor put on a "WikiContent" website. An easy-to-learn 3d editor with prefabs and other stuff made by the people and share them (lik GoogleSketch for example) would probably make the content flourish.
Now specific examples that may or may not work. Well any MMUG could conceivably be run on an open source project much like JBOSS is an application server. So you get a market leading Game server and look after it for the creative talent who want you to hack some neat feature just for them. - It might work, and it is just one example
I suspect there are other business models that might offer a living to the best solution. Who'd have thought someone could get rich selling you phone numbers (OK generic contact) to the people you didn't really like or know from school. It happened.
One way that an open source game might work is if people who play can add bits to it. Having implemented the core of a massive multiplayer game, users who had programming skills might add new weapons, or new buildings or whatever. Unskilled users could still play the game online.