Journal Entry 6: Walls and Automatic Meteor Spawning
Date: 15. 9. 2021
My first task today was supposed to be creating walls but I decided to put some more time into tweaking the damage system. Most importantly I added the starting health query and on damage taken callback.
I had the basic idea of wall done fairly quickly but I ran into some trouble. Interaction between walls and the player was very weird. The player could levitate when bumping into to wall and touching walls in flight would randomly boost the player. Sometimes the boost was so big that once the player landed back on the platform it fell trough or got stuck inside.
Once I fixed the fixed the first problem I realized both of the problems were the same. The ground detection system was set up to indicate ground when touching ground or wall tiles, which is not entirely the intended behavior. Touching the walls from bottom was enabling the player to continuously jump and the boosting was just repeated jumping. Once I figured this out fixing it was quite trivial, I just constrained the angles that register the ground contact.
Regarding walls I also added textures indicating damage the wall has received and implemented spawning walls when pressing W including snapping them to the grid. I also used the composite collider, just like with terrain.
Once I had walls figured out I implemented the automatic meteor spawning. I had this done fairly quickly as I was able to reuse some code from earlier days. However I ran into some problems with the walls again. They have suddenly become invincible. After a lengthy debugging session I realized, that the entire problem was missing rigidbody on the walls prefab. I got rid of this component once I decided to use composite collider. Once I added it back everything worked like before.
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 8: Finished Refactoring and Repeating WorldSep 17, 2021
- Journal Entry 7: Pausing and RefactoringSep 16, 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.