How do I add a collision between the goomba and the ground
I tried to add a collision to the ground for hours. (or trying to make the goomba go backward if it touches the wall or ground) I got nothin. Can someone please help me. :(
here is the game: https://microstudio.io/i/Tiberius/supermariobros/
It's possible to check if a rectangle is colliding with a tilemap by finding the tiles it overlaps and checking if any are blocks. See my example Tilemap Collision.
As you see, my game does not support that style. I can't just find a collision in 1 part. It is for every goomba and every block. I do not know how to do it. At least I tried doing it, but still does not work.
You can probably use the same collision code as the player, and you may be able to use the same platformer physics code too.
You probably don't understand the code you created.
Practically, all you need to do is modify the function called "updatePlayer()" by cutting out most of the code.
That leaves 15 lines of code that you add to the goomba file.
You don't need to change the code anywhere else.
https://microstudio.io/i/Loginus/supermariobros2/
I do understand my code, But, it is hard for me to think and do stuff after school. It is hard for me to think. :(
I am sorry if I am pushing you or making you do to much work. And remember that I am still a starter at coding at microscript, and I have only been here since the end the 2024.
Please forgive me for pushing you Loginus, I just sometimes need help because I am tired and I do this for free time. :(
I am so sorry. ðŸ˜ðŸ˜ðŸ˜