I created a basic battle game consisting of two teams of four characters. Each character has a different ability. They can attack, support and have some special tactics depending on the round.  The player can pick their team via a character select screen and the character they want to attack (depending on ability). Everything else from character turns to attacking is random.

A quick playthrough

There is a bit of a story behind this demo that I’ve written up and will publish soon. The code for the demo needs a big refactor. It’s a bit of a brain dump I'm not happy with the final result. Longer OOP projects like this are a great learning experience.

Character artwork is from ArtBreader. Game code is here . C&C welcome.

Things I hate about it.

  • Character classes. It’s hard to grab subclass detail. I get around this by implementing interfaces. It’s not pretty and leads to issues. I think an abstract class or just a full interface implementation would have been better.
  • Reusability. I put myself in a bit of a corner using Unity UI. I tired coding around it but ended up with a bunch of similar methods.
  • I couldn't decide how to implement character data. I ended up instantiating a prefab from a prefab deck. It’s Ok, in future i would make a menu prefab and instantiate that with a player character.
  • Not happy with the code. I feel it's spaghetti for such a simple game. This comes from pushing forward with the implementation. It works, but can be ropey, i can see some issues with updating the screen.

Things I like about it.

  • It's an OK base to work from :D

Overall a bit of a frustrating experience. I need to make more projects like this to gain confidence implementing OOP architecture. I learnt a lot but I chopped and changed so much during the process. I would like to get to a point where I know what approach to take before I commit.