Creating a Game Engine Independant of External Libraries

Started by
8 comments, last by Coconut 24 years, 2 months ago
I am currently creating a 2D tile based game engine for use in a strategy game I am creating. It will be my first game and am trying greatly to make the engine independant of the game because I will probably create many more such games in the future. I have all the base knowledge to create the game engine, such as how to use direct draw as an interface for the graphics and a fairly good understanding of the Win32 API. The goals for my engine are: 1)It will have a base class with a high level of abstraction aka CGObject 2)It will encapsulate the direct draw interface objects into my own classes so I can change that later if needed 3)Everything will be classes to enhance modifiability 4)Classes will be built with a "Every man for himself" philosophy. What I mean by that is none of the classes should need to know about the other classes with the possble exception of the utility classes such as CGBitmap and CGPosition and classes where this is almost imposible to work around(CGRenderer). This is an uncomplete list because I am still just designing it. The reason for this posting is that I need sugestions and criticism on whether such an ambitious project is ludicrous. Please email me with coments and sugestions at OneHotCoconut@cs.com or post them here. Thank you. : )
"The computer programmer is a creator of universes for which he alone is the lawgiver...No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute athority to arrange a stage or a field of battle and to command such unswervingly dutiful actors or troops." - Joseph Weizenbaum-Brent Robinson
Advertisement
Creating a 2D tile engine isn''t ludicrous, especially if you are creating it for your own projects.

The trick is to not get so enamoured of the engine that it''s all you work on and you never get around to actually using it in a game.

DavidRM
Samu Games
I might suggest you have a clear idea of the game in mind first. Document how the game is like, and then write out possible features the game needs from the engine. Write it as generic as possible, but not beyond features needed in this game.
The build as you go along concept is fairly good to use in this case
I am trying to currently design as genericaly as posible because of the fact that the person I am currently making the game with is still working on the design document. You see, we are developing at seperate locations and the way we are determining how the game will work is that he makes the initial design document with his idea of the way he wants the game to turn out. Then, he sends it to me and I edit it with the changes I think would be important or maybe to better fit my idea for the game. This way, we keep a record of what the game should be and still developing at an even pace. However, he currently working on it, as I am currently working on the engine.
Thank you Greatly,
Brent Robinson
"The computer programmer is a creator of universes for which he alone is the lawgiver...No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute athority to arrange a stage or a field of battle and to command such unswervingly dutiful actors or troops." - Joseph Weizenbaum-Brent Robinson
Heres some cool things to do. First off all the engine needs to do is look at the data and render it. Anything like map loading shouldnt be part of the engine. For example for my engine I have the tiles stored as a vector of vectors in stl, and I have all my characters in a list. I give my engine the pointers to those 2. Now thats going to make it pretty generic. Now you can do your map loading, incrimental map loading for huge worlds, and other stuff like line of sight like in some rpgs and its all indepedent of your engine code. In other words your engine is like a black box.

Edited by - brad8383 on 1/29/00 8:57:20 PM
Your idea is very good and it should be somewhat easy to do. Just design the classes and how they interact. I suggest playing alot of 2D strategy games and look at what is happening. That way you''ll be able to figure out what the programmers did. Write down all the different things you want to do. Do you want a base map that has only the terrain and buildings, props, trees, etc can be linked to do tiles? Consider multiple ways to do everything.

Domini
Thank you all! Since this seems to be read alot more than my other posting, the project that this renderer is for is going to be freeware and currently has 2 people working on it. Anyone who would like to contribute to this project, whether it be ideas, artwork, sound effects, code, or even design, feel free to email me at OneHotCoconut@cs.com. Thank you again. : )
"The computer programmer is a creator of universes for which he alone is the lawgiver...No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute athority to arrange a stage or a field of battle and to command such unswervingly dutiful actors or troops." - Joseph Weizenbaum-Brent Robinson
You could also check out the articles in programming->game programming->general-code on the cob, on this site. He goes into detail about containing code, code reuse, portability..etc..etc..
William Reiach - Human Extrodinaire

Marlene and Me


Thanks All!

Brent Robinson
"What if this is as good as it gets?"
"The computer programmer is a creator of universes for which he alone is the lawgiver...No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute athority to arrange a stage or a field of battle and to command such unswervingly dutiful actors or troops." - Joseph Weizenbaum-Brent Robinson
Thanks All!

Brent Robinson
"What if this is as good as it gets?"
"The computer programmer is a creator of universes for which he alone is the lawgiver...No playwright, no stage director, no emperor, however powerful, has ever exercised such absolute athority to arrange a stage or a field of battle and to command such unswervingly dutiful actors or troops." - Joseph Weizenbaum-Brent Robinson

This topic is closed to new replies.

Advertisement