Hello PICO-8 Community!
Attached is my first attempt at programming a video game (I have done a lot of statistical programming, but this is way different). Currently I am having some problems with Maps and collision detection in this particular game.
Setup: Flag 0 are things you can stand on, Flag 1 are things that you can't jump through.
Problem: Whenever I start the map, I hit an invisible wall next to the tree trunk, on both sides and you can jump on some of the tree that are not able to be jumped on.
Could someone look at my code/map and see if there is something wrong with my collision detection or map construction.
Thanks,
HBHR Jelly
I believe your bug is in collide_map in the code:
```
--pixels to tiles
x1/=8 y1/=8 y1/=8 y2/=8
y1 is repeated. x2 is absent. ---- Although fixing that fixes most of the problems, even with that corrected I can stand in mid-air in this position: I'm going to leave that one for you or someone else to track down. :p |
Hi HBHR_Jelly! I recognise that code from the Nerdy Teachers tutorial :)
As for the error that remcode pointed out, looks like it was a rogue map tile at X014, Y013 (you can see it with a grey dot in the top-left corner in the map editor). Delete that tile and you're golden!
Look forward to seeing your game continue – have fun!
Thanks to both both @daddynewts and @remcode. that has fixed my problem!
[Please log in to post a comment]