pingpoli.de



GameDev 2019 Week 30: Item Rarities

Vulnerability, Items, Bug Fixes

10.08.2019 - 23:54
Monday 05.08

While I was looking through some older to-do lists, I rediscovered a note I made about a vulnerability debuff, which would increase the damage an entity takes. So I added one to the game. Like other tower effects, it can be specified in the tower blueprints and can vary its duration and strength. It only increases the direct damage, while damage over time, like posion or bleeding, are not affected. I created an icon for it and added descriptions for it, so it is shown in the building hover, the building window, and as a debuff in the entity window. When I added it to the entity window, I realized that I had forgotten to add a hover effect for the debuffs on the entity, so I also added a hover effect for all debuffs on an entity which show additional information, like "70% Slow" or "10 dmg/s Bleeding".



Tuesday 06.08

When I worked on the music player last week, I found a bug that a music track would not continue playing after muting and unmuting it. Sound effects should not continue playing after muting and unmuting, having an explosion continue several minutes later would be weird. In the code music tracks were the same as sound effects, so I had to add a distinction between them, so music tracks are paused when muted, while sound effects are stopped. While I was working on the sound system I also fixed another long standing bug, that group settings would not be applied correctly to sounds that were added later. This required a few more substantial changes to the sound engine, but after a while this was fixed too.

Wednesday 07.08

Another missing feature were item rarities, from the beginning of items there was an item rarity variable in the item class, but other than being there it didn't do anything. Today I started by creating different backgrounds for the different rarities. I chose grey for common, green for uncommon, purple for rare and yellow for legendary items. After this I also created item icons for shards and jewels for every elemental type. Shards add +10 elemental damage of that type to only towers which have base damage of that type. As an example the ice shard will add 10 ice damage to all towers which have ice damage. There is no type associated with towers, but implicitly the type of the tower can be determined by the base elemental damages it has. For single type towers, there could be an explicit type, but I didn't want to deal with double, triple, quadruple or whatever elemental types. To get this condition working I added a switch to the item buff class, so it can be implemented a lot easier ( it could have been done before, but would have required multiple functions for every item, with the new system, it only requires a single onPickUp function for every item ).

Thursday 08.08

I started the day by implementing the item selection based on rarity, the game no longer picks an item out of all items, but rather determines a rarity first and then picks an item out of that rarity pool. Right now the chances are 10%/20%/30%/40% from legendary to common, these may change in the future though. Then I added all the shard and jewel items, for which I made the icons yesterday. Shards are common and Jewels are uncommon and as mentioned add +10/+20 elemental damage to towers with the same base elemental damage. While testing I noticed a game crash when going back to main menu and back into a game again, which was fixed quickly and another bug, when going back to main menu and loading a different map than the first one. In that case the map was rendered incorrectly. I thought it would be quite complicated to fix, but it turned out the map models weren't named correctly when loading a map, so I only had to change a single line of code and everything was fine.

Very buggy map:


Another point on my to-do list that I thought would be quite easy to implement was to add line breaks to the item description so they no longer go outside their backgrounds. I had implemented that feature a few weeks ago, but of course I overlooked something and it took way longer to add it for the item descriptions than it should have. Finally, I implemented the initial selection. I always popped up, but selecting an item didn't do anything so far, so I finally fixed it.

Friday 09.08

Today I added back a few towers I had in the game previously that were lost to random changes. I wanted to make a proper release build again that I can use for testing with other people and I wanted to add most of the towers I made. They will not be balanced at all though. I also added a setting to the tower blueprint file to control the rarity of the item that unlocks the tower. Then I updated the tower button creator to use the rarity setting and create item images with the correct background. Finally, I changed the initial selection so it only offers items that unlock towers.

Saturday 10.08

I used the morning to make a release build and copy all the files to the correct place. I also did some local multiplayer tests with the release build and they worked fine. Later I made a release build for the linux server and uploaded it to my server, but it doesn't work correctly at the moment, the windows local version does, gotta love the very small linux windows differences, I have to look into that after I finish this blogpost.




by Christian - 10.08.2019 - 23:54


Comments


Comments are disabled
Social Media:  © pingpoli.de 2020 All rights reservedCookiesImpressum generated in 9 ms