Click here to Skip to main content
15,913,854 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionRunge Kutta Pin
Noharyiasa19-Jun-07 0:05
Noharyiasa19-Jun-07 0:05 
AnswerRe: Runge Kutta Pin
Paul Conrad4-Nov-07 7:08
professionalPaul Conrad4-Nov-07 7:08 
QuestionNeuronic Computation Pin
Noharyiasa19-Jun-07 0:04
Noharyiasa19-Jun-07 0:04 
AnswerRe: Neuronic Computation Pin
Dave Kreskowiak19-Jun-07 12:49
mveDave Kreskowiak19-Jun-07 12:49 
Questionadvantage of functional dependency Pin
kindd17-Jun-07 20:55
kindd17-Jun-07 20:55 
AnswerRe: advantage of functional dependency Pin
Pete O'Hanlon17-Jun-07 22:58
mvePete O'Hanlon17-Jun-07 22:58 
GeneralRe: advantage of functional dependency Pin
mimransarwar18-Jun-07 20:58
mimransarwar18-Jun-07 20:58 
QuestionMini-Game Design Pin
Ri Qen-Sin15-Jun-07 16:26
Ri Qen-Sin15-Jun-07 16:26 
This is probably the first game I've ever worked on. I want to use it as a testing platform for concepts which will be used in another much larger project. To give you an idea of what "this game" is, I will describe it to you below:
It is a game with one or more characters, and some artificial intelligence opponents. It is a 3rd-person shooting game. The game is somewhat 3-dimensional, and uses Windows Presentation Foundation to draw the 3D scenery, but the maps are flat and tile-based (however, movement resolution is finer than a tile—They can have different positions/locations within the tile). Most calculations will be using two dimensions. The game has 3 major parts: the terrain, the terrain objects, and characters which move on the terrain and interact with other characters and objects on it. They are all contain in a level/stage/map.

The terrain is tile-based. A tile can accomodate any number of terrain object, and one character. Each tile is customizable by the designer (the image painted onto its surface). The entire collection of tiles may or may not form a rectangular terrain. The tiles are static and do not change during runtime.

Terrain objects are in-game objects which the characters can interact with. They may be walls, bushes, a roof over the head, explosive barrels, etc. Terrain objects have some properties: whether a character can walk through it, whether it is indestructible, how high it it from the tile it is on, etc. Several terrain objects can be on a tile. They can be placed on the terrain during design time or dynamically during runtime (such as setting explosives by a character, and detonating by another).

Characters are in-game entities that are mobile on the terrain. They are basically there to eliminate other [non-friendly/neutral] entities. Characters are also the most dynamic of them all. They can have any appearance. Their appearance changes when they are damaged, dead, or switching weapons. They can rotate anywhere from 1 to 360 degrees in very fine intervals. (The character on screen always faces forward. The camera is swung around the character to keep it that way.) Although character movements are not restricted to individual tiles (meaning they can move left a quarter of a tile rather than having to move to an entirely new tile) each tile can contain only one character. A character is a tile wide, which makes it impossible for two characters to be on the same tile. When a character uses a weapon (like a grenade, a gun, or setting mines) it always throws/shoots straight ahead towards whatever it is facing or in case of setting mines it drops it on the tile it is currently on.

With the above points in mind, I designed my game like this: (also keeping in mind it has to be easily extendable)

  • Map data consists of a folder. The folder has an xml file describing the terrain, what objects are set on it, and and custom characters (or it can link to predefines ones). All images are external files link to in the xml file.
  • When the map is chosen and the game begins loading, it loads the xml file first. The file is checked against a schema.
  • The data is read and converted to in-game data structures. Any dependencies are loaded (like images)
  • The data is passed to an instance of the "terrain management" class. The terrain management class creates an instance of a terrain object class for each terrain object and a character class for each instance of a character. (Those classes will be derived from for specific kinds of objects and characters.) The terrain manager simply acts as the communication medium which delivers status notificatiosn to all the proper instances. If an instance of a TripMine class will not be affected by a character moving from one tile to another, then it will not be notified of the event.
    Example:

    • TerrainObject

      • Wall
      • Mine

        • ProximityMine
        • TripMine

      • Bush

    • Character

      • AutonomousCharacter (Uses artificial intelligence)
      • MainCharacter (Only one instance allowed, controlled using the keyboard and mouse)
      • ExternalCharacter (Controlled via some other influence like over a network for multiplayer scenarios)


  • Each character class may have a separate thread which controls its actions.


I would like some feedback on my preliminary design decisions, and any alternative designs that you may have come up with that will meet my requirements. (It has taken me a few nights to think it over.)

ROFLOLMFAO

AnswerRe: Mini-Game Design Pin
Paul Conrad4-Nov-07 7:09
professionalPaul Conrad4-Nov-07 7:09 
QuestionTo MACRO or not to MACRO Pin
BadKarma14-Jun-07 22:33
BadKarma14-Jun-07 22:33 
AnswerRe: To MACRO or not to MACRO Pin
Rob Graham15-Jun-07 2:19
Rob Graham15-Jun-07 2:19 
GeneralRe: To MACRO or not to MACRO Pin
Pete O'Hanlon15-Jun-07 8:42
mvePete O'Hanlon15-Jun-07 8:42 
GeneralRe: To MACRO or not to MACRO Pin
CPallini15-Jun-07 11:48
mveCPallini15-Jun-07 11:48 
GeneralRe: To MACRO or not to MACRO Pin
alex.barylski22-Jun-07 20:01
alex.barylski22-Jun-07 20:01 
AnswerRe: To MACRO or not to MACRO Pin
Ed.Poore18-Jun-07 1:16
Ed.Poore18-Jun-07 1:16 
AnswerRe: To MACRO or not to MACRO Pin
Stephen Hewitt20-Jun-07 22:30
Stephen Hewitt20-Jun-07 22:30 
AnswerRe: To MACRO or not to MACRO Pin
alex.barylski22-Jun-07 19:59
alex.barylski22-Jun-07 19:59 
AnswerRe: To MACRO or not to MACRO Pin
sonofdelphi25-Jun-07 22:46
sonofdelphi25-Jun-07 22:46 
AnswerRe: To MACRO or not to MACRO Pin
me_stargazer6-Jul-07 1:58
me_stargazer6-Jul-07 1:58 
QuestionAnalyst Qyery Pin
monas_2914-Jun-07 3:59
monas_2914-Jun-07 3:59 
AnswerRe: Analyst Qyery Pin
Paul Conrad4-Nov-07 7:10
professionalPaul Conrad4-Nov-07 7:10 
QuestionClass Design Pin
Akbar Ali Hussain13-Jun-07 1:21
Akbar Ali Hussain13-Jun-07 1:21 
AnswerRe: Class Design Pin
Dave Kreskowiak13-Jun-07 4:32
mveDave Kreskowiak13-Jun-07 4:32 
GeneralRe: Class Design Pin
Akbar Ali Hussain18-Jun-07 0:42
Akbar Ali Hussain18-Jun-07 0:42 
GeneralRe: Class Design Pin
Dave Kreskowiak18-Jun-07 2:27
mveDave Kreskowiak18-Jun-07 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.