GameDev 2019 Week 25: Item Improvements
Building Hover, Items
08.07.2019 - 17:22Sunday 30.06
I made a lighthouse tower model in Blender and added the lighthouse to the game, which deals light elemental damage ( obviously ^.^ ), because I didn't have a light elemental tower yet.
Monday 01.07
The on hit effects and aura source effects were their own classes and not linked in the code, but the building window and the new building hover have just one effect list, which has to list all the effects of the tower, and the code got kinda messy with different types of effects. Also the new target limitations like air only need to be listed in the same list. Therefore I refactored the whole system and introduced a new effect super class for all of the effects and moved all the on hit effects and aura sources into the same list. Now it is very easy to display the effects of a building and the code got a bit cleaner in the process. I also added the target limitation effects as a new effect type, made (temporary?) icons for them and updated the effects list in the building window.
Tuesday 02.07
As mentioned above the building hover effect needed an upgrade, it didn't even show the elemental damages yet. The new building hover now uses the same stats layout and the same icons as the building window, so there is some consistency and it should be easier to see the stats. It also uses the new effects system from yesterday and lists all on hit effects and aura sources, as well as possible target limitations.
Wednesday 03.07
So far items were fairly limited in their ability to do cool things, they mostly just unlocked buildings or added simple stat buffs. Therefore I added a bunch of features today to improve the variety of items. First, I added a way to add effects to towers, and to try it added an item that adds a posion on hit effect to all towers. Then I implemented a building and upgrade price factor for the player, so items can make building prices or upgrades cheaper. While testing this I realized that I completely reworked the building hover yesterday, but forgot to add the price, so there was no way of telling whether the tower actually got cheaper, so I had to add the price back to the building hover :D. While working on the building hover I also changed the stats it shows to include all the items the player has unlocked, e.g. if a player has an item that adds 10 fire damage to all towers, the building hover for the lighthouse will also show 10 fire damage in its stats, which is really handy I think. After that I also gave the player more stats for gold rewards, so there can now be items that increase the amount of gold gained from eliminating a mob, finishing a wave or even from opening gold bags. Finally, I added even more callbacks for items and used those to make an item that increases the damage of all towers depending on the amount of gold a player has and another one that increases the damage when the player is low on lives.
Thursday 04.07
It was a rather unproductive day, I only started a little web tool that is going to help with the creation and balancing of towers in the future, it'll take some time to be done though.
Friday 05.07
I did a little bit more work on the web tool, but then switched back to the game itself. Earlier this week I added the lighouse tower to the game, but it was only using the default attack. However, I wanted it to shine a beam of light to its target while it is attacking it. So I created a texture for it and added some code to allow for different types of line attacks. I also tinkered a bit with the shader for the line billboards, it's better than before, but it's not completely right yet. In addition to that I added a parameter to the blueprint files, which specifies how how a projectile ( or a line attack ) is launched within the tower, because the lighthouse is fairly tall and it looked weird when the light beam was coming from the middle of the lighthouse rather than the top ^^. Then I fixed a bug where the building hover was messed up for newly unlocked buildings. And to finish the day I created a new help ui, which will have some helpful information for the game in the future, right now it only shows the elemental damage factors.
Saturday 06.07
In the future the help ui needs to have some text, but I don't want to have to add line breaks by hand to make sure the text fits in the scrollable container. Therefore I worked on an auto line break feature for labels, which automatically inserts line breaks when the length of the line gets too long. In addition to that I also implemented justify alignment, which in my opinion looks a lot better than left alignment in almost every case. It's not quite pixel perfect, but it's good enough for now. Also I hurt my left ringfinger and typing with one finger less than you are used to is extremely difficult and slow ... ^.^
by Christian - 08.07.2019 - 17:22
Comments
Comments are disabled