This past week I was supposed to continue working on the combat system and have something working that you could see.
Fortunately we were able to get the basic systems in place!
Engaging in combat with another entity.
Combat between two entities ends up being powered by a few different systems.
CombatSystem is responsible for determining whether or not an entity is allowed
to attack another entity, and if it is setting the necessary state to indicate that they
are in combat.
DamageSystem is, unsurprisingly, called upon when we want to deal damage to an entity.
SpawnSystem, which originally powered spawning different entities, is now also used to
begin the respawning process when an entity runs out of health.
And then finally the
MovementSystem is called upon when you're out of range of the entity
that you are targeting.
We implemented a new method in the
MovementSystem that allows you to find a path that
is between a certain distance away and near some position, which will be useful when we
want certain attacks to only work within certain distance ranges. Such as a ranged attack
that requires you to be at least 2 tiles away but no greater than 10 tiles away.
We didn't have to do very much to get the frontend working, which felt great because it showed that we're starting to have the foundational pieces in place that make it easier and easier to add new functionality.
We made it so that when you click on an entity with the
Attackable there will be an option in
the interaction menu to attack that entity.
Clicking on an attackable entity shows an
We also made it so that when an entity takes damage we'll temporarily show a health bar above their head, so that you can more clearly see how much health they have remaining before you've won the battle.
After taking damage we'll temporarily show a health bar.
As with most of the other frontend work thus far, I'm using placeholder graphics as I get things into place. When we're closer to release we'll need to do several passes over these graphics to get them more production ready.. But for now having just enough visually to see things work is fine.
I also started working on a server to allow players to sign up for a monthly subscription for the game. Since the game needs to make money in order for me to be able to work on it more, it makes sense to start getting a billing backend in place.
By next week I'll have the billing server live and deployed and it will be possible to pay for the game. Granted, we don't even have production quality graphics or gameplay in place yet so we're a bit of a way from the game actually being worth paying for.
However, I'm hoping that making it possible to sell the game will help me stay focused on the things that are necessary for release (and thus revenue.. and thus more time to continue working on the game) vs. things that are important but not mandatory and can be improved after release.
We want to release quickly and iterate on and improve the game.
We'll also plan out the first city in the game so that we can start getting it into place.
Now that many of our backend and frontend modules are in place it should hopefully be easy to continue to extend them to support more interesting gameplay.
Building the first city and all of the things to do in it will put these systems to the test and we'll extend and improve them as we go.
See ya next time!