Original Post
Areet i'm relatively new to game development and i'm having a go at making a small tile based top down game just for learning purposes. This is where i have come to a standstill, i understand the concept of how my collision should work like. if my player moves by 32 px over each tile check the tile it will move to to see if it is passable which in my case is 0 for floor and 1 for walls in the map array. my problem is making this work for just the tiles containing a 1. im on my phone so i cant copy and paste code but basically i have... if (mapArray[j] == 1) then if player.x + 32 > j*32 && etc for the other sides returns true else return false then in my movement code... if key down then if !engine.collision() then player.y +32. sorry if this is all a bit disjointed any help would be appreciated.