top of page
Search
  • Writer's pictureRob

Alpha 0.02

It’s been over a month since the last update! I apologise for it being so delayed, but it’s been a busy month!

Some of you may be thinking “Hey, where is that vLog we were promised?” – I decided against vlogs for now. At least until I have something prettier to show where video footage would be nicer to look at. It’s also very time consuming so for now I’m sticking with the written medium for now! So let’s get stuck in!


New cards!

I added two new cards each with their own terrible placeholder art! The first was a second shield card with a twist. I have now coded the concept of “status effects” into cards so they can apply a status to the character or target (such as poison). The first of these effects I made was the “Guard” effect, which essentially allows your shield to stay in play for an extra turn instead of auto running out at the start of your next turn. I thought it would be a simple effect to work into the game flow.

The second card is a push card! That allows you to force enemies to move away from the target square. Position manipulation is going to be quite important for some of the strategies in the game so the ability to push enemies into water, walls or each other is a function I wanted to get into the game sooner rather than later!



Alpha 0.01 complete

With those cards I consider the very first build of the game complete! I set out to do the following for this build;


· Randomly generated maps.

· The player character.

· A manager for the player’s cards and health.

· The deck, discard pile and hand mechanics implemented.

· At least 5 different cards.

· One enemy type.

· The ability for the player and enemy to attack each other


Before moving on, I decided to spend some time testing and fixing bugs, I found quite a few little issues but nothing too serious, five bugs in total, all fixed.


So what next for Alpha 0.02? Here is what the goals for this build are.


· Chests that award new cards

· Some basic sound effects (sound manager for the game)

· UI so the player actually has some idea of what is happening.

· Core game loop, when enemies are defeated, a new match starts with an increased difficulty

· A better system for loading cards into the game

· Get something animated in the game.


So … I’ve done almost all of this.


User interface!

The game now has a UI layer! I’d like to just preface this with the statement that ALL the art is placeholder and generally not very good. It is certainly not final! Having said that, let’s see how it functions.


Health and shield

The health bar is pretty self-explanatory. It’s a health bar. It tracks the player health. Moving on, I also added a shield icon that will appear when the player has a shield active. This demonstrates that the player’s health is protected by the shield.



Mana pool

The player’s mana pool shows how much mana you have. Each card as a mana cost to play and that is limited by this pool, the player obviously needs to be able to see how much mana they have left so they can plan accordingly.



The deck and discard piles

Also pretty self-explanatory. It shows how many cards are left in your deck and discard piles respectively.



The prize pool

I will go into the mechanic as a whole in a bit, but this effectively shows how many prize cards you will have to choose from at the end of a battle.

That’s all the UI for now so on to the next thing!



Chests and game progression

This is the mechanic I have implemented that allows the player to get more cards for their deck. Each chest is spawned in a random space on the grid. A player can move onto it to pick it up at which point it is removed and a new chest is spawned somewhere else randomly. For every chest you pick up you gain a card for the prize pool (max 3), at the end of the battle you may choose one card from the pool to add to your deck for the next battle.

I like this mechanic because it can force the player to make decisions on whether or not put themselves in a bad position or drag out a fight longer than needed for the chance at getting more / better cards at the end of a fight.



Difficulty progression

After a fight is over, I want the next one to be a little harder. I refactored the way enemies are spawned and selected for fights entirely. So each round now has a difficulty level and each enemy has a difficulty rating. The EnemyManagerController selects at random some creatures whose combined difficulty rating is less than or equal to the difficulty rating of the current round. E.g. if the round had a difficulty level of 3, a goblin swordsman had a difficulty rating of 1 and a goblin archer had a difficulty rating of 2, the EnemyManagerController will select either 3 goblin swordsmen or 1 goblin swordsman and 1 goblin archer. Make sense? Good.

Each round gets a little harder as the game progresses and the game needs to determine by itself what you may be fighting against.


Some new effects

At some point I want to make things look prettier so I had a play around with Unity’s particle system. I got some pretty neat effects out of it to replace the magic missile and the put in something nice for gaining rewards from chests. Again these aren’t final by any means just proof of concept so I know I can use particle effects instead of sprites however and wherever I want to in the future.




The developer console

Around this time I did another test pass and bug fixing session. I found an annoying bug that only triggered after the second round of battle, and to retest my attempts at fixing the bug playing out two whole fights just to see if my new code worked over and over again would be a very inefficient way of working, so I created a dev console to allow me to input commands into the game to effectively cheat. I created a Kill Enemies command so I could easily get through levels if I had bugs that show up only after a few rounds or something. I have added a couple of other useful commands since, it will really help with testing later in the process.



Sound!

I have to say I quite enjoyed building sound into the game, and maybe spent a little too long finding cool music and sound effects for various things and putting them in the game. It does make a huge difference. It was quite easy to get the sounds triggering at the right times for some of the attacks because of the animation system I wrote to handle card attack animation last month so I was quite pleased that the extra effort I put in earlier on was paying off now.


Big refactor and code clean up

I have done a lot of work. It was about time to step back and go through my code and make sure it’s not too hacky and keep it sustainable. When you’re mentality is “I'm just making a prototype right now” it can be easy to justify some bad practice, so I went through everything I’ve done so far. Line by Line. Public variables were made into properties or just made private, whole methods were removed or replaced or made re-usable and entire systems were changed.


I won’t bore you with all of the details but the two major changes I made were;


To stop the player avatar being a singleton, created a base entity and have the player and enemies inherit from the same class so they can share some of the same code.

Both players and monsters can be pushed, attacked, can move, spawn, etc. They share a lot of functionality because they are both entities on the game board so doing this helped my remove a lot of duplicate code.


The second major change was to add a state machine to the main game class. This helps a lot in moving all the logic for code that handles the player turn, enemy turn and victory screen game states into separate files, making things much more manageable.


Essentially all the game is required to do is run the current state of the game, then when conditions change, the state is changed and then the game runs that state instead. The logic for those states is contained in their own classes. I’m really glad for this change because the Update() function in my game manager was starting to get silly. Now It’s just a few lines long.


Final card templates!

After a few iterations I finally settled on a look for the cards! I’m quite pleased with them. In the game code, I have come up with a “Card builder” that takes in some parameters such as name, cost, attack power, range, status effects, etc that can be used to generate the cards in code. This is important because I can now add new cards much more easily. The plan is to eventually store a JSON file on a server and for the game to get the game card data from there. I can then easily tweak the variables of the cards if things need changing.



I currently have artists working on a player sprite sheet and new tiles so hopefully the game will start looking a bit prettier by the time I do my next update. I've been in contact with a new artist who's work I came across on Reddit, a student from the USA, she came up with this neat tile. I'm looking forward to seeing what we can come up with together for the maps, background and terrain.




This was a long one, but there was lots to show! I will be keeping things more regular in future. If you made it this far, thanks for reading!!! :-D

117 views0 comments

Recent Posts

See All

Comments


ABOUT DOUBLE ONE

Hello! Thanks for visiting. Right now Double One is just a lone developer. Me. Who has thrown their lot in at work to make their own way into the world as an indie game developer. I've got an idea, some concept art, and a basic prototype of a thing I think is going to be fun. So watch this space and wish me luck!

- Rob -

  • Black Facebook Icon
  • Black Twitter Icon
  • Black Instagram Icon
bottom of page