View Single Post
Onag

JCF Member

Joined: Feb 2002

Posts: 165

Onag is doing well so far

May 16, 2005, 08:04 PM
Onag is offline
Reply With Quote
This is a great start! I made few adjustments and (hopefully) clarifications. I'm assuming we use some kind of Singleton class, but I haven't yet figured out a clean way to do this with C#.

class Application : Singleton
Purpose:Holds everything for the program
Contents:Main program entry point
Game object
Menus collection
Form object
Render Device


class Game : Singleton
Purpose:For everything in the actual game (as in part of the gameplay), and nothing else.
Contents:Level object
Player collection


class Level : Singleton
Purpose:For everything in a single level.
Contents:Tileset collection
Layer collection
Object collection


class Player : IControllableObject
Purpose:Everything related to the player in the game


class Layer
Purpose:Contains the arrangement of tiles that make up the level.
ContentsTile collection


class Tile
Purpose:Represents a single tile on a single layer
Contents:Tileset index
Tile index


class Tileset
Purpose:Contains a full tileset.
Contents:Tile collection


interface IGameObject
Purpose:Abstract base class for all dynamic objects in the game.


interface IRenderableObject
Purpose:An object that can be rendered
Contents:Reference to a Graphic Resource through the Resource Manager


class ResourceManager : Singleton
Purpose:Stores, loads, and otherwise manages all resources.


interface IResource
Purpose:Abstract base class for all resources (such as graphics, sounds, etc.).


class GraphicResource : IResource
Purpose:Contains a graphical resource


class Menus
Purpose:For a system of menus.
Contents:Menu collection


class Menu
Purpose:The stuff for a single menu screen.


class GameForm : Windows.Form
Purpose:Just the standard empty form there to be used for drawing. Doesn't really contain anything. May be able to just use System.Form directly.


class RenderDevice
Purpose:Interfaces with the graphics library for all the rendering.
Contents:All stuff needed for the graphics library
Reference to the form to draw to