Kingdom of Spades

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

A real-time strategy game prototype made in 3 days.

Instructions

Left click: selection - select/deselect an object

Right click: command - send selected unit to given position, attack given enemy, build/repair a building or dig a hole

Move mouse to the edge of a screen: scroll the viewpoint

Goal:

Dig a hole to find a hidden gem.
Do not get killed by enemies crawling from the hole.

Theme

As always, our game sticks to the Running out of space theme only very loosely. Because starting with the exact official theme is too mainstream (and would probably lead to our game being very similar to many other games), we started elsewhere, working our way to the original theme. The phonetic similarity of Running out of space and Running out of spades led to an idea of digging a hole with spades/shovels, which break often, inspiring me to make a resource management real-time strategy. Additional idea bringing the game more to the official theme was to move the soil from the hole to other place(s) on the map, possibly causing troubles when walking around it. The theme has also projected into the Worker’s inventory size, which is relatively small, requiring the Worker to do many trips when harvesting a material.

Development

Somebody once told me programming real-time strategy games is difficult. Well, I should have listened better. After spending actual (time-tracker-measured) 25 hours and 25 minutes programming and reaching just the state you can see, I can confirm it is true. The total length of the source code, consisting of 49 files (with Unity scripts, classes and enums), is 2140 lines.

Results

Although the game is not finished, we managed to create:

- Solid code base for an RTS game:
  - hybrid hierarchical finite state machine-based behaviours combined with behaviour trees
    - walk, build, fight, harvest, ...
    - non-trivial behaviour combinations such as "repeat: find nearest object of given type (e.g. a unit, a building or any more concrete type) belonging to given player, within a set diameter, go towards it, then keep attacking it, handling it running away"...
    - due to the decomposition into a hierarchy of behaviour classes, each behaviour or combination of behaviours is relatively simple
  - object model of the "game world"
    - e.g. MonoBehaviour -> MapObject -> Unit -> Worker or MonoBehaviour ->MapObject -> Building -> FactoryBuilding -> Center
  - GUI (status bar with selected object info, and object's inventory)
  - miscelaneous scripts and utilities
    - VisualSwitcher: a flexible script, switching on/off children GameObjects based on parent's health level, requiring no setup (only correct naming of the children)
    - PhotoShoot: a scene and a script for automatic (therefore deterministic/reproducible) batch generation of icons/sprites from 3D objects by automatically rendering them (on a GPU, using Unity) in a prepared environment, placing the results into the Assets folder
    - ...
  - (The code works almost without dirty programming hacks. I could say I am *almost* proud of it.)
- Minimalist graphics:
  - 3D objects composed of a few geometric primitives.
- and last but not least: Nice music with a classic AoE vibe.

Future work

- Commands bar (build a building, make a worker) is work in progress.
  - Debugging an issue with button-clicks not being registered took the most valuable time just before submission and it had to be disabled.
- Handle object reaching 0 HP - block unit behaviour, disable commands.
- Add more buildings (e.g. barracks) and units (e.g. soldiers).
- Implement actually using (and using up) spades as a required tool when digging.
- Implement moving of the dug-out soil elsewhere (do not let it just disappear).
- Implement path finding and obstacle avoidance.
- Implement enemy spawning and more high-level/global AI such as estimating player's units' strength and attacking only when we (enemy) are stronger.
- Balance the gameplay difficulty (adjust maximum health of each object, spawn just-enough enemies to keep the player busy but not overwhelmed).
- Make better visuals (especially the Worker).
- Make SFX (tool-wood, tool-rock, tool-soil hits; click sounds, object selection noises and unit "taunts" when receiving commands; ...).
- Add animations (walk, attack, idle, harvest tree, harvest iron, dig).
- Add logo, menu, gameover/win screens, ..., level editor, multiplayer, battle-royale mode and become #1 game on all possible application stores ;-)

Credits

Music: cheeslo

Everything else: M-1

Please let us know what you think - what you like or don’t like about the game. Any feedback is welcome!

Platforms
Release date
Developer
M-1
Age rating
Not rated

System requirements for PC

System requirements for macOS

System requirements for Web

Read more...
Edit the game info
Last Modified: Jan 9, 2019

Where to buy

itch.io