Individual Tile Collision

Hi all, I’m so sorry for the length of this post.

I am a monogame beginner, developing a top down twin stick shooter which I want to be similar to nuclear throne, enter the gungeon, or binding if isaac.

The problem I am running into at this point is map collision. My character is loaded in as an animation, as it’s data is from a sprite sheet, rather than a stagnant png.
What I cant figure out is how to tie the player, and the map classes together, so that I can set up collisions. I believe I have a start on such within the PlayerCharacter class (all necessary classes should be below (hopefully)), but I cant tell if its actually detecting the proper hitbox of each tile, which should be 32x32, and I don’t know what exactly I’m supposed to write in terms of position or velocity in order to stop the player from moving when they come in contact.
I think one of the problems with it is I couldn’t find a good tutorial on that top down, 2D rpg style map building, so the code I have in there is based off of a basic platformer code I found.
All I need is this tile collision working, so I can draw the collidables on top of some basic background png.

Thanks for any help y’all can give!








Hi @Cheeks and Welcome to the Forum.

Could you please take a look at your post and explain what’s going on so that we may help you further.

Happy Coding!