I still working on balancing units but I’ve finished implementing the unit rank system for all of the current units in the game. The rank system (unit level system) allows me to set unit stats and abilities based on a single rank number. So for example I have a function that sets all sorts of stats and AI code based on the rank number for that unit. This makes it easier for me because I can call a single function (e.g. trebuchet.setRank(4)) and all the stats that are relevant for that unit are updated (e.g. hit points, movement speed). The unit AI code also may use this rank number to determine how the unit will think. A low level dragon may fly low and not move around as much as a higher level dragon. A high level shield grunt will block more often than a lower one. A ninja may use more advanced melee attacks at higher ranks.
So for these past weeks I’ve been integrating the setRank function and identifying variables and AI code that could be scalable according to the rank. This will provide the player with new experiences when encountering the same types of enemy units later in levels. Aside from unit rank icons I’m thinking about maybe tweaking the look of the player skins slightly to reflect rank, like changing the color of the ninja’s headband, or the number of spikes on a grunt’s helmet. This is a nice-to-have feature at this point though and I’m focusing on gameplay and functional stability at the moment.
I have a rough plan of the level progression as it relates to unit types and ranks. I’ll be refining this plan as I continue development. My next major tasks are updating and balancing the upgrade system and developing new game level objectives.
Upgrade System Development
The current alpha version (0.0.1.8.3) has a demo set of skills and skill mod combinations with some random costs and skill requirements associated with them. These skills, the mods that are available, and costs may not reflect what the game will be like at launch. Specifically, I plan on revamping the ally unit upgrade system. The unit pre-requisites will be made clearer and you’ll be able to upgrade the unit ranks to match or overpower the ranks of enemies you encounter. Also, the current version does not have player rank requirements but in the future certain skill may not be available until your character reaches a certain rank.
Game Level Objectives
The current alpha version (0.0.1.8.3) has only one objective. It is the same for every level. Just kill every enemy and don’t get killed yourself. I plan on having a few new types of game objectives. I have been planning on doing this for a while now so this isn’t late breaking news, but until now I haven’t been able to start development this aspect of the game.
Here’s just a few ideas for game objectives:
Capture the flag: Classic Bowmaster Prelude level objective where you can either win by capturing the flag or destroying all of the enemy units.
Defend your base: Win by successfully defeating all of the enemies. You lose if your base is destroyed.
Attack enemy base: Win by destroying the base against a never ending horde of enemies. You lose if you die. Perhaps you have a limited number of troops at your disposal (ouch that sounds harsh… at your “disposal”)
Escort/Protect: Protect a slow moving caravan or injured unit as it is transported from one area of the map to another.
These are just a few ideas for game level objectives. I also plan on generalizing the design of these objectives to allow for interesting variations. So even if the objective is familiar the situation may be a lot different. Instead of escorting a single unit from one place to another, you may have to protect an exodus of refugees escaping from a raided town and they’re coming from the same direction as the enemies.
I’m in the early development process for these features so I haven’t completed a whole lot of code for the other modes, but I have been toying with some variations on the current game mode. Since I’ve been working a lot with the unit AI code I’ve been trying to refactor the code to anticipate these new game modes and mode variations. One very important design change was the concept of which way is “forward”. Right now I have the good guys always come from the left and bad guys from the right. They each move “forward” toward the other team. I used to have functions in the unit AI code called advance() and retreat() but this was always relative and became very confusing. I also locked myself into the idea that good or bad units will _always_ come from the same side. Well I’ve finally generalized this code and now I can place a unit anywhere on the screen and it will move to a target spot of interest. No more confusing functions and no more “forward” variable or hard-coded start position point.
This redesign means that I can now create some interesting new variations on the current “kill all enemies and don’t die” objective. I tested two new ideas variations. The first thing I did was switch the starting positions, just to see if the AI still worked. Success! Both armies marched towards each other as expected. It was just a little weird because it was so different to be shooting in the other direction (especially if you’re using the pull string method). I then tried something a little more interesting. I place the starting spot for the good guys in the middle of the screen next to a stonekeep and created spawn points at both the left and right edges of the screen. It was very exciting being completely surrounded with almost no safe place to retreat too. Maybe I’ll create a zombie level 😉
So I’ll continue to provide devlog entries as I work on the BETA but it may still be a while before I post the BETA to play. However, I’ll continue to support the ALPHA that’s currently up so if there’s any major bugs found then I’ll try to fix it and re-post.