Sprite and Supercharge Bugs

Published February 19, 2024
Advertisement

Very little progress occurred this week due to projects that were due. What did get done was prototyping to implement crystal sprites as prefabs and bug-fixing involving supercharging.

Last week ended with the finishing of the crystal supercharging system, our system that applies a constant bonus to a crystal throughout a run. However, the controller support was also merged in, causing multiple problems for the system. I wanted to phase out one of the useless scripts so that we can more easily polish this system in the case of a player alternating between keyboard and mouse to controller. Attempting to do so caused even more bugs that I had to work on.

One major bug that took a long time to debug was an issue where swapping crystals from one slot to another, then back again made the crystal seemingly disappear. What caused so much confusion was that all the information transferred successfully, but the crystal did not appear. The solution: one of the methods on the new script tweened the object to a scale of (0,0,0).

The new sprite implementation comes as we plan to have crystal fragment spikes floating above the main crystal sprite of some abilities. My attempt currently works for some parts of the implementation but ultimately needs the supercharging and controller branch done in order to progress further. I made a prefab of a crystal that is an empty game object with children that are sprites. These sprites can then have materials added. What needed changed in the scripts is methods added to our CrystalManipulationFunctions script to add, remove, or fetch these prefabs. These will affect a reference found in our Crystal scripts.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement