I'm kind of new but I think I know this.
If you notice the little colored boxes under your sprite tiles that you can turn on or off.
Those are tile flags.
So you can use one of them to signify which tiles will be considered solid for your player and check it for each solid tile.
Then you can use something like "tile = mget(x,y)" to get what sprite tile is at (x,y) on the map.
Define which flag is solid. There are 8 flags, 0-7.
So we'll just use flag 3 as an example.
Go back and check flag 3 on each of your solid sprites.
Then just do something like "flag_solid = 3" and then use "fget(tile,solid_flag)" to check if a tile is solid.
There's probably better ways of doing this, I'm just trying to explain!
Here ya go.
It's not perfect by a long shot.
But it displays the core concepts.
The biggest thing is taking note that if you select the grey block in the sprite editor, underneath it is a red bubble turned on. That's the flag i use to check if something is solid.
[Please log in to post a comment]