-
Notifications
You must be signed in to change notification settings - Fork 0
Map Design
A core aspect of any RTS game is the game map, in which the core gameplay takes place. The map must be able to house a city of a fixed size, while taking up sufficient amount of space in the map to house the core resources of the game. A key challenge in the design was the infancy of the development cycle, which meant that constant gameplay factors such as the city size, enemy numbers and general gameplay loops were largely undetermined. This meant that any solution for the game map had to be adaptable and scalable, to fit the needs of the game as it progressed.
The solution to the demands of the game map was delivered in the form of the algorithm employed by MapGenerator, which possesses the functionality to generate a game map of a given tile width and height, which contains an island holding a city of set size.
The MapGenerator delivers its functionality by doing the following:
- Generate a 2D array of char of the width and height provided - to represent the entirety of the game map
- Fill each entry with an Ocean character - as any tile not filled by subsequent functions will be considered ocean
- Pick a random point on the map to place the city, such that the city dimensions of width and height will still fit - with a buffer to build the island around
- Pick two points on either side of the city, with the distance between them being the specified length of the island
- Iterate between each point and place a vertex, or edge of the map, with points being above the city
- Iterate between each point and place a vertex of the map, with points being below the city
- Interpolate between each pair of vertices and fill in the island
Although it was implemented fairly quickly, the algorithm encountered some key issues when implemented in the game engine
Initially, the map filling function was encountering an error, as the edges of the map had potentially 3 vertices, instead of the usual two, causing an effect like this (below figure visualised after step 5 and 7 was completed, step 6 not implemented).
### Entity placement bug The game engine's default code comes equipped with placing isometric entities, however, it seemed as though this code was incorrect as entities spawned using the spawnEntityAt() function were being placed at a location slightly offset to their desired location. This behaviour is indicated in the below image:Map
City
Buildings
Unit Selections
Game User Testing: Theme of Unit Selection & Spell System
Health Bars
In Game menu
- Feature
- User Testing:In Game Menu
Landscape Tile Design Feedback