XaiJu
Lizardrive
Lizardrive

patreon


SEGA Megadrive game development #6

Colliding with the environment

As he moves, our hero will eventually collide with something. 

There is a function to check this being called when hero is moving (I removed it in the previous example for readability purpose):



This function both tells if the hero can keep on walking in a direction and if the element is colliding with has a specific interaction tied to it.

I saved some CPU by considering only sprites positioned close from the hero.



More Creators