Mountain Map and Overworld Exploration


The main things on the agenda this week were just what the title implies. They were both tough and easy at the same time. As for what that means... Well, I'm a bit of a rookie when it comes to environment artistry. Despite all the time it took to make what I have, it was kinda fun! ^^ As for the overworld movement...


The essentials were easy. The tough stuff was refactoring it for cleanliness. I didn't like how the base implementation had the jumping script handle both jumping AND gravity-applying. That's a very fixable violation of the Single Responsibility Principle! Correcting it and other bugs I ran into took some doing. It all came from my inexperience working with Unity's built-in CharacterController component.


Issues with the Overworld Movement

"Wait, this is more efficient than the Rigidbody-Collider combo I've used all these years? Sign me up!"

That came at a cost: bad groundedness-detection. That's why I often was unable to jump when walking. Couldn't move in midair, either. All despite each movement submodule relying on the same CharacterController instance. Thus, I had to code my own groundedness-detection to compensate.


Thought it'd be cool to implement that (partly) through a BoxCollider right below the player character. The detector would keep track of when that collider leaves (and when it enters) the ground, sending out signals when needed. The movement submodules would respond to those as needed. It worked just fine... at first.


Sometimes when walking on slopes, the detector would wrongly signal that the player's left the ground. Thus, the jump animation triggered mid-walk. Heck, it sometimes triggered when you move on level ground as well. A mess, it was! xD In the end, I decided to use a variation of the traditional raycasting method of ground-checking. And with that, the animation issues were no more. Now here's a peek at the map:





I'll make a video showing it in action after some more prep.

Get Trigram Islands

Leave a comment

Log in with itch.io to leave a comment.