v1.4.0 Beta! | Patreon Weekly #173
Added 2022-09-26 17:25:01 +0000 UTCHey Patrons!
Firstly, there’s an audio Q&A attached to this weekly! There were 18 questions asked by 10 different patrons. You can find question timestamps at the end of this weekly. I also mention a game’s soundtrack in the audio Q&A, which you can find here: https://www.youtube.com/playlist?list=PLvK9pRNXoVoM5rEd0d6NqXR4JwEtDaLab
In this weekly, I’m going to do a deep dive on an annoying bug that was introduced during the alpha, and which took a few tries to fully fix.
Auto-resting?
As those of who played the v1.4.0 alpha (and a few unlucky folks who played the beta) will know, there’s a bug that caused the player to automatically start spending turns when they walk onto traps.
This bug popped up because of a small new QOL feature I was trying to implement into v1.4.0: Tapping on the hero would cause them to trample grass or activate traps that they happened to already be standing on. This is accomplished by having the hero essentially move in place.
A move action is triggered whenever the player taps on a location where no other game actions (e.g. pick up item or attack) are available. Normally when you try to move onto your own tile, the game sees that moving isn’t possible and just cancels the action. In the v1.4.0 alpha I changed this so that you can move onto your own tile if you aren’t levitating and there is either tall grass or a trap there.
The problem of course is that deactivated traps are still traps, so tapping to move onto one of them would cause the hero to move there, and then rather than ending movement (as you’re now on the tile you were moving towards) the game would instead keep constantly moving in place.
Oops.
I fixed this in the beta by changing it so that only active traps count. Problem solved right? The problem now is that if you’re under the effects of time freeze, traps don’t actually activate right away. This leads to the exact same bug as before, just in a much more specific situation.
The fix this time is going to be to just remove the interaction with traps entirely. The main point of this change was to trample grass that grew onto you, and the cases where an active trap is under the player were added as an afterthought. I’m not actually sure there even are cases where the player can be standing on a trap that hasn’t activated.
It’s very, very easy to make changes like this that have unintended consequences. Even a relatively simple game like Shattered has so many moving parts, and very often some specific niche interaction can cause unintended behaviour like this. A majority of new bugs are caused by oversights like this, though usually the situations they trigger in are very specific. To be fair though, I should have seen the deactivated trap problem coming, as that situation was pretty common.
Audio Timestamps
- 0:13 "have you ever thought about or come up with ideas for developing other games?" - RadiantChaos
- 1:45 "i've always felt like pixel dungeon is more accessible and easy to learn than other roguelikes, which is especially impressive given the sheer depth of the game. how did you accomplish this? any approaches or tips that other roguelikes might benefit from?" - Verdagon
- 4:51 "when you have bugs pop up, how often are they quick fixes, and how often do you have to rewrite a large chunk of code to get around them?" - Depresbian
- 7:00 "how do you avoid burnout?" - Depresbian
- 8:50 "do you like gummy bears" - Depresbian
- 9:17 "did the classes you take in high school/early years of college/uni (if you did those) prepare you at all for this career?" - RadiantChaos
- 12:06 "do you like my cat?" - RadiantChaos
- 12:20 "How do you feel on the the current place of thrown weapons? Any info on ideas you have for changes to them?" - Netrame
- 14:23 "What kind of music have you been enjoying recently and do you have any recommendations?" - Netrame
- 16:21 "what does inhaling confusion gas from the traps feel like? is it like getting high on drugs? or does it just affect your vision?" - RadiantChaos
- 17:41 "Any plans to rework Battlemage on hit effects, which just copy existing enchantments (fireblast, lightning, disintegration, blast wave)?" - Fcelon
- 19:11 "Is the rat king good or evil? What are his goals?" - heyseth
- 19:56 "Would you ever consider expanding the armor system? Right now there is a lot of weapon variety but only one armor for each tier plus the class armors, so would be awesome to see more armor diversity" - heyseth
- 22:39 "What is your opinion on Shattered being used as a code-base, not just a game?" - Zrp200
- 25:55 "do you plan to give any lore to the artifacts? im especially curious who created the chains and the chalice" - Depresbian
- 27:29 "I can't remember if this has already been asked before, but... Are there any easter eggs or references in the game that nobody has noticed yet?" - PunStar
- 29:29 "Have you ever thought about adding some voice acting to shattered? Even something basic (like grunts of pain when taking damage) could make the characters feel much more alive." - Kamil
- 30:28 "how do you gauge win percent numbers for items and skills balance-wise, and more specifically, how do you determine the “right” win rate number goals to set. have win rates percentages changed significantly over time, and have there been any events that caused a long term increase in wins?" - Spam Account