Message-ID: <1327440226.m2f.31653 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”
Hi there
Sorry for posting this here, but the Game Development forum sees much less
traffic.
I’ve turned my game development project into my bachelor thesis and I’ve
been looking for good books that dig further than the game loop.
Unfortunately, most books are either “Learn C++”, “Learn DirectX” or “Learn
OpenGL” books in disguise. So far I haven’t been able to find a single book
on how a game is structured.
I’m looking for answers to questions like: “How many state machines are
used?”, “How does the game transition between levels?”, “How is message
passing implemented, if at all?”, “What’s a common class hierarchy?”, etc.
I don’t have any book recommendations, but the last time I looked at
it the FreeCiv code was pretty simple, and easily understood, so you
might look there for a reference.
As for those related questions, I believe the answer is pretty
reliably “it depends”.
If you’re going to have a normal starting screen, then you’ll probably
want a state machine for that, and another for the actual game; but
you might decide to just jump directly into the gameplay with an
auto-generated map. Conversely, you might decide to have a state
machine for your units, in which case you could have a dozen or more
IMPLEMENTATIONS of state machines. Thus, I think you should choose
some guideline to make this less generic, if you decide you have the
thesis space/time you can always expand the coverage.
Level transitions will vary greatly, I believe that some FPS games
even try to hide the change, except for perhaps a 'level entrance’
message. And then you have WoW and other RPGs, where it’s really
nothing but a stats improvement. Once again, “it varies”, so you
should probably typify the games that you’re looking at.
Message passing is a bit vague, are you talking about between game
entities, players, what? Though really, I think that the biggest
differences here will probably be “is it distributed?”.
I don’t know for certain about class hierarchies, but I suspect that a
common portion of game class hierarchies is the equivalent of:
class GuiEntity { /* Stuff here. */ };
class GameEntity { GuiEntity appearence; / Other stuff here. */ };
As I best recall, FreeCiv uses this basic style, and only requires two
classes to implement all it’s units (actually structures since it’s
written in C, but still…) despite the fact that it has many units.> Date: Tue, 24 Jan 2012 13:23:47 -0800
From: “BenoitRen”
To: sdl at lists.libsdl.org
Subject: [SDL] Good Game Programming Books?