I'm messing around trying to make a simple 2D side scrolling game. I made the map editor before I made anything else so I didn't have to worry about how my level is setup later. The map editor saves tiles using Types to 3 different layers. Then the actual game loads (right now only layer 1 and 3) the tiles and turns them into 1 big image. Layer 1 for the world, Layer 2 will be for moving objects so it won't be one big image, Layer 3 for Background.
I setting up my player to move around in the world and it works good for just simply moving the player, but colliding not so much. The player can land on floors, but goes through the sides of the world and you goes up through the ceilings.
Right now the only colliding code I have set up is somewhat(not using the actual variable names) like this...
The squares with the green on the 4 corners are Layer3, the background which means I don't collide with those.
My player on the floor/ground walking

My player inside the world

My player's head/eye getting stuck in the ceiling

My player enjoying theworld OMG HE'S IN THE GROUND!

The easier route for deciding collisions would be just to use the tiles separately instead of putting them all into one big image but the problem is, it gets laggy and takes forever to exit the game...
Help?
I setting up my player to move around in the world and it works good for just simply moving the player, but colliding not so much. The player can land on floors, but goes through the sides of the world and you goes up through the ceilings.
Right now the only colliding code I have set up is somewhat(not using the actual variable names) like this...
If ImagesCollide(player,playerx,playery,0,worldlayer1,worldx,worldy,0) = 0 u\Vy = u\Vy + .1 Else u\Vy = u\Vy*.4 EndIf
The squares with the green on the 4 corners are Layer3, the background which means I don't collide with those.
My player on the floor/ground walking

My player inside the world

My player's head/eye getting stuck in the ceiling

My player enjoying the

The easier route for deciding collisions would be just to use the tiles separately instead of putting them all into one big image but the problem is, it gets laggy and takes forever to exit the game...
Help?