Prototype - lide128/xPMOG GitHub Wiki
A proof of concept in Java to test out ideas
Code Organization
- Main
- Player
- Envrionment
- GenerateMap
- GameMap
- Tile
- Tile Cover
- System
- GameConstants
- GameObject
- GameObjectList
- GameElement
Game Mechanics
The Game Map
- The basic component of the map is the Tile
- The playable area can be determined by the user
Coordinate System
- Origin (0, 0) is in the lower right hand corner
- x is the horizontal axis, and y is the vertical axis
Tile
- A square element of playable space that can be occupied with 0..n GameObjects
- Only one player can occupy a Tile at a time.
Attributes:
- GameObjectList gameObjects - a list of what GameObjects are currently on the tile
- TileCover cover - the TileCover that currently resides on top of this tile
- Point coordinates - the coordinates in the GameMap of the tile
- boolean playerOccupied - whether or not there is a player on the tile
- boolean excavated - whether or not the tile has been cleared and can be traversed
- boolean base - if there is a team base occupying this tile
Tile Cover
- This class represents the rock/ground that is to be cleared away over top of the tile.
- Tile Covers have their own list of GameObjects that they may contain.
Attributes:
- char symbol - a character which represents a tile cover in the map on the Java console
- GameObjectList gameObjects - a list of what GameObjects are contained in the Tile Cover
GameObject
- A class representing all possible in game objects except for the player
Attributes:
- String name - the name of the element
- String description - a description of the object that will be displayed in game
- int value - how much the object is worth in the game currency
GameObjectList
- Represents a list of GameObjects, extends ArrayList class.
- Contains methods related to finding GameObjects by their name.
GameElement
- Subclass of GameObject
- Are the raw elements to be mined
- Any other type of resource that can be mined in the tile or found on it
Attributes:
- int difficulty - how difficult the element is to mine or to breakdown/move scale of 1..5
- int rarity - how common it occurs in the map scale of 1..5
GameItem
- Subclass of GameObject
- Usually interactive
- Machines, mining machines, transportation
- Found components, programming additions
- Items
Attributes:
- TBD