Practical Application         Wanting to learn how to create an Ogre application from scratch?

Table of contents

Introduction

About the Original Author
Xavier

Why This Article
There is no one single place someone can go to learn from someone else's mistakes and experience in developing a practical gaming or simulation application. Sure, there are literally dozens of VERY good Wiki articles and forum posts that can answer just about any question (assuming (a) you can find them, or (b) you know what search terms to use), and I will be sure to reference them all during the course of this series. But for someone who has more than just an excellent grasp of object-oriented languages and development, but almost zero experience in developing a 3-D simulation/game, it's really a daunting task to try to find out what you actually need to know to get started and create something practical.

The intended audience of this series is the experienced programmer who wants to learn game programming but has no idea where to start. Well, this is where you start. :-) I will cover the major tasks and broad subject areas of what to do and how to do it using the libraries mentioned below (including, of course, Ogre3D). When specifics are warranted, I either will cover them (and you can assume it's because I figured out how to do something) or point to the relevant Wiki article that covers the topic (if it is sufficient; if not, I will add explanation either to that article or to this one).

However, I am not going to teach you C or C++ (or C# or ...). You have to come here with at least some practical experience with object-oriented programming and of C++, or you are wasting your time with Ogre (and most libraries). Without any experience with C++, you are also wasting the time of typically eager-to-help community members who quickly tire of, and grow frustrated with, frankly rank newbies who don't even know how to fire up Visual Studio, run ./configure, or what a pointer is. You need to learn that on your own; this is (as is any game or large application) a very complex system, and I think the developers of the Ogre Demo apps, while well-intended, do a disservice to newbies to game programming by providing a single, simple "run()" method in an ExampleFramework, the nature and workings of which those newbs have no hope of understanding. So, furthermore, if all you want to do is load up an animated model in Ogre and watch it run around the screen, this series also is not for you: stick with the demo apps, as they do all of the work for you (at least all of the work you'll need).

I should add that while it sounds that I am bashing the ExampleApplication framework, I'm not. It uses a standard object-oriented design pattern, and it works well for the situations where it is ideal: Ogre demo applications, small games with limited input requirements, visualization applications, and so on. What I will discuss in this series is beyond that — you want to eliminate the config dialog, load your own settings, control resource initialization, etc., run the main loop manually, etc. If your scope matches this, then read on.

That said...it became obvious to me early on that Ogre was the only real library to use for our 3D rendering: it was cross-platform, the most mature, had the most features, and was under the most active development. In fact, it's apparent that there really are only one or two viable open-source choices for each subsystem in a game...Ogre for rendering (though some like Irrlicht); OpenAL for audio (though some like fmod); ODE for physical simulation (though some like <insert your favorite physics lib here>), and so on. Whatever your project is, you probably have already made the choice for each library you are going to use. That is not important for the purposes of this series of articles. Just keep in mind that your library choices ought to be made for the same reasons we made ours: maturity, featureset, and level of development activity (because the developers of those libraries are, in essence, part of your own application's development team).

This series is written from the perspective of a project that uses Ogre3D for video, pjcast's OIS for input, CEGUI for 2D GUI management, RakNet for networking, OpenAL for audio, and Gangsta as a physics abstraction layer.


Practical Application - Organization - Plan ahead for deployment and installation concerns.
Practical Application - Foundation - Beyond the ExampleApplication.
Practical Application - Initialization - Fire up Ogre and her sisters.
Practical Application - GUI - CEGUI and Ogre and how they get along.
Practical Application - Let's Get Started - Beginner Tutorial #1 WITHOUT the ExampleApplication framework.
Practical Application - Something With A Bit More Meat - A full working example of CEGUI with Ogre.


Alias: Practical_Application