Journal Entry 8: Finished Refactoring and Repeating World
Date: 17. 9. 2021
My first task today was finishing the refactoring process I went through yesterday. I only had a little bit of work left mostly centralizing constants regarding building walls. I had this done relatively quickly.
I continued with implementing the repeating world mechanic. I created a collider under the platform and set it to trigger. Then I tagged all of the objects that should repeat with a special tag and did some scripting. When the under platform trigger is activated, all of the tagged objects are teleported some distance down. I also added a way to queue callbacks before and after moving the world. This is used to stop spawning meteors, getting rid of meteors and rubble and restarting meteor spawning with a bit of delay on level up. I had to rework the meteor spawning a bit to enable this.
While testing I had some trouble with the world teleporting seemingly randomly. Turns out pieces of rubble were falling down the hole and activating the trigger. I solved this by disabling collisions of rubble and the trigger in the Collision Matrix.
I also had some trouble with building walls. This was anticipated as I was fully aware I'm mixing local and global coordinate systems in the wall spawning script. Although this wall building system is temporary, I decided to fix as I will probably reuse this code later.
I will continue next time with some more testing of the world repeating mechanic, because I don't believe I got it right already.
Files
Get Don't Be Afraid To Fall
Don't Be Afraid To Fall
Status | In development |
Author | Martin Mihálik |
Tags | mff-gdintro-2021-c |
More posts
- Journal Entry 10: Time is upSep 19, 2021
- Journal Entry 9: Change of PlansSep 18, 2021
- Journal Entry 7: Pausing and RefactoringSep 16, 2021
- Journal Entry 6: Walls and Automatic Meteor SpawningSep 15, 2021
- Journal Entry 5: Rubble Collection and Damage SystemSep 14, 2021
- Journal Entry 4: Explosions and RubbleSep 13, 2021
- Journal Entry 3: Fixed Movement and MeteorsSep 12, 2021
- Journal Entry 2: Terrain and Player ControlsSep 12, 2021
- Journal Entry 1: The Design and PlanningSep 10, 2021
Leave a comment
Log in with itch.io to leave a comment.