I have a 2d map of integers
0000000000 0200000001 1111100011 0 = sky/empty 1 = ground 2 = player When player falls in a hole/cliff I want the player to go below the map, so it will look like the player had died by falling in the hole/cliff.
Here is what I did:
if(player.getY()+player.getHeight() > map.getHeight()){ //player has fallen in hole/clifff } The code above will test if the player's feet touch the end of map. But how to move him below the map? Because if I move the player down then the array will be out of bounds.
Is there way without changing the map array?