lucasyuhyuh
Moldy Popcorn
Piece of bacon programming MegaDrive games.
Posts: 47
|
Post by lucasyuhyuh on Dec 24, 2019 18:08:58 GMT -5
How do i do something like in:
0 = sky 1 = ground
0,0,0,0,0,0,0,0 0,0,1,1,1,0,0,0 0,0,0,0,0,0,0,0 1,1,1,1,1,1,1,1
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 24, 2019 20:58:35 GMT -5
I think you mean engine, not editor.
Basically you need to keep a variable for your camera position (i.e., the coordinates of your map and where the scroll position is) + your sprite position in relation to the map.
Once you have that figured out, you read the tile under, above (if jumping), and in front of your character. If it's a tile you can walk through (i.e., the sky), you allow the action to happen, otherwise you block it.
|
|
lucasyuhyuh
Moldy Popcorn
Piece of bacon programming MegaDrive games.
Posts: 47
|
Post by lucasyuhyuh on Dec 25, 2019 10:21:00 GMT -5
Wait, i actually meant tileset (like in tilemap).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 25, 2019 14:14:35 GMT -5
reload MyMap for y = 0 to 9 for x = 0 to 9 ReadInt z DrawTile z,x,y next next
MyMap: DataInt 1,1,1,1,2,1,1,1,1,1 DataInt 1,1,2,1,1,1,1,1,1,1 DataInt 1,1,1,1,1,1,1,1,1,1 DataInt 1,1,1,1,1,1,1,1,1,1 DataInt 3,3,3,3,3,3,3,3,3,3 DataInt 4,4,4,4,4,4,4,4,4,4 DataInt 5,5,5,5,5,5,5,5,5,5 DataInt 6,6,6,6,6,6,6,6,6,6 DataInt 6,6,6,6,6,6,6,6,6,6 DataInt 6,6,6,6,6,6,6,6,6,6
Like this?
|
|
lucasyuhyuh
Moldy Popcorn
Piece of bacon programming MegaDrive games.
Posts: 47
|
Post by lucasyuhyuh on Dec 25, 2019 19:28:14 GMT -5
Yep.
|
|