Making a data driven game and tools to generate content for it.
Overview
The Winds over eden is an attempt at making a game from the start in an unfamiliar engine.
In short it was an experiment in how well I can plan ahead and execute on said plans, making systems interactions that function from paper to code while combining my enjoyment of gameplay and UI programming. Not just for gameplay but also for tools to enable players to add their own cards and art to the game.
The Setup
To begin on a project like this it’s necessary to have if not stylish at least functional menus that let you navigate the game so you can quickly change scenes, manage volumes, navigate and have the groundwork done for implementing whatever I need to into the game.
So thus the first thing implemented was a full menu setup and managers for things to keep between scenes.
After that I was able to navigate and start the shop and combat systems.
Fun little addition: The buttons grow when you over your mouse over them.
The Combat
With the game navigable I could get started on the combat system. For this I made a combat manager that kept track of all the allies and enemies in the current combat. Issuing orders for who could attack and then letting the cards take care of their movement, the attached code image is of how they select viable targets. It was at this point a lot of empty interfaces with places where abilities would activate despite the cards still lacking them for now.
After that came the cards themselves, this was where I had to figure out how their abilities would look and work in able to have them be dynamic. So I settled on a 3 enum system for clarity and to make it all more workable.
With the basics worked out all that came after that was handling the combat related abilities.
The Shop
After the basics of combat was done I could get started on the shop, handling things like buying cards, adding them to the hand, handling the hand itself and making cards playable into the ally slots. This came with a lot of unexpected difficulties, like having to figure out masking to make the art always fit the cards frame and a new json format to read. Not to mention the silly issues that can appear when working with C# and everything being a reference.
But after many ifs and buts you can reroll the shop, play and handle cards, manage your hand,rearrange your units and of course purchase units. It also handles the growth, preparation and selling related abilities. Along with being that which edits cards stats when an all targetting ability is fired off.
The cards
The very basis of the game itself having 3 different stages with different functionality.
The three stages in question are: Shop card, Shop ally, and Combat Unit. The reason for these 3 stages is that when a card is bought it needs to be moveable by mouse, hold the logic for being sold and played with battlecries and the like. Once played they no longer need the battlecry logic but they need the ability to have their existing stats buffed, their growth abilities to trigger, be empty and to hide their descriptions unless hovered. Combat units however are more unique, they identify if they are allies or enemies, can attack, die and trigger their combat related abilities such as initiator and separate between permanent and temporary buffs.
These abilities are managed by the combat and shop managers while which tell the cards what to do and send info through to the relevant slots. With the example shown being battlecries and how they figure out their targetting.
The card jsons
The cards can carry a lot of data but also need to be creatable and editable in game so I decided to go with the json format for storing them. To create these I created a tool which allows you to create your own cards with the art you want, the stats you want, the name and description you want along with the abilities you want to put on them.
The jsons themselves use integers where possible to make themselves as cheap to read on loading the game scene.
Similar jsons will eventually be used to enable save loading and special enemy waves.
The future
In the future I intend to implement more abilities, make more cards, get proper menu art and make the game complete enough for a commercial release. In the final release I intend to keep the json tool but also make a button to allow players to reset the game to default if they should so desire.