Age Of Empires
Autumn 2020
My goal was to recreate Age of Empires: The Age of Kings. This project was driven by a desire to explore UI design, mouse controls, resource management and the mechanics of creating structures and units.
Key Features
- Tilemap: My first attempt at creating a tilemap involved multiple layers for terrain tiles, building tiles and unit tiles. Players can interact with buildings or units on their team to choose actions such as movement, building, or training more units. I didn't get around to adding the attack actions, but this would involve a simple stats comparison and some randomness. The terrain tile a unit is on affects these stats, for example, archers have less range in forests. Terrain also affects how far a unit can move through it, reducing the number of steps to the next tile.
- UI: The UI was custom-made using only the p5 library for drawing shapes and text. It allows for the selection of actions and tiles. I designed it to be playable both with just the keyboard and with a mouse for faster tile selection.
- Resource management: You start with a set amount of food and gold, which can be spent to build buildings and train units. Mills and gold mines can be constructed on resource deposits and produce resources each turn based on the deposits they are built on.
- Local Multiplayer: Every turn, the team is swapped to the next player. Players can only interact with buildings and units on their team. However, they can hold down the interaction button on an enemy unit to see the possible locations that the enemy unit could move to.
Challenges, solutions and lessons learnt
It was initially challenging to create the tilemap and mouse interactions due to the isometric perspective on the tilemap. I developed a transformation to map 2D positions to the isometric position, which can also be used when mapping the mouse position to a tile.
Embedded Game
Controls:
Select = Mouse click or WASD (move square) and Space (select square)
Zoom = Mouse Scroll
Next Turn = Enter
![Placeholder Image](../Assets/AOE.png)