Friday, May 9, 2008

Is an Object-Oriented Game Engine necessary? (1)

What is the validity of the class-hierarchy that makes GameObject class and specialize those for downward classes? In this case that each object passes a message to each other, the only task of the object list is telling a signal. Specialization like down-cast is done within each object. Nor there may be more strange code to do specialization.


A rule of game (game-design) defines the situation that each object send a message to each other, from the top-view. Loosely-coupled like plug-in is not good solution for game. It requires a perfect description. If a new kind of game objects is added to code, all existing game object classes have to define response to the new class. In this jigsaw puzzle, a kind of piece has to define "joints" to all of other piece.

[The validity of managing Game Object without generalization - Worklog]

I understand his struggle, because I have ever tried to handle game-engine and graphics systematically with researching middle-ware, engine and scene-graph for several years now. But, in my project at my office, I can not live up to it. A video game programing that is real-time application requests performance always and many programers are assigned to a project, so a systematic architecture that makes a sacrifice of both performance and the early stage of projects is not useful.

High-level languages like C++ tempt us to change our programing style. Amazon and book stores display books that teach how to write object-oriented programming. We read these books and begin to plan to handle game object classes with object-oriented programming. It's sure that there are enough discussions about object-oriented architecture of large scale systems design. But, there are not enough discussions for video game application design, especially in Japan.

In America and Europe, developers discuss game object design. But, most of them develops FPS and RTS. These genres are a good match to object-oriented design. But all of games is not FPS and RTS. So many Japanese developers don't discuss game object class design. In other genre, it's necessary that a game core controls game totally. And, the most important thing of video game development is tuning and tweaking. In our world, an ideal architecture collects entertainment control panels to one place for easy to tune and tweak. Video game developers have to put entertainment feeling before the fixed spec documentation.

If we write source code with books that teach large scale system design, the game application feed programers' vanity. But the application is bad as video game program. Our ideal program design might be different from the large scale system. And, a video game object-oriented design might be different from a large scale system object-oriented design. So the books don't teach all thing to us. We have to find an answer ourselves. Japanese, American and European don't find the answer, yet.

No comments: