#18624 - dagamer34 - Tue Mar 30, 2004 1:08 am
I am trying to use mapEd for my Super Mario clone and have run into a bit of a problem, collision.
I can see that mapEd has some kind of collision layer/featuer but am unaware of how to use it. The readme that came along with it shed little light on how to use it. I would like to use it for a custom based collision detection (as opposed to tile-based).
If all else fails, then I will just make a dummy map with dummy tiles to represent arbitrary values, but I want to know if this works first.
Thanks for your replies.
_________________
Little kids and Playstation 2's don't mix. :(
#18625 - col - Tue Mar 30, 2004 1:40 am
what kind of 'custom' detection scheme?
if it dosn't use tiles at all, then the most you can probably do with maped is use some custom tiles as position markers
cheers
Col
#18626 - Nessie - Tue Mar 30, 2004 1:45 am
mapEd has a set of collision tiles built into it by default, which you've probably seen when you toggle between map and tile view, but you can replace it with your own collision tileset.
All you do is place a custom .bmp in the same directory as the executable and the tool will attempt to load this first. If it suceeds, it becomes the new collision tile set. If it fails, mapEd will proceed and load it's own internal collision set.
Here is what it has to be called if you want to try it:
The collision tiles should be 8x8 tiles (for now) and the tileset dimensions need to be a power of 2, such as 64x32, 128x64, etc. Since the actual pixel representation of the collision layer isn't exported, you can put whatever you what in each 8x8 tile in the collision tileset you want to load.
From there, you simply paint the desired collision tile onto the collision layer. At export time, the collision array will contain the index of the collision tile contained at each location.
An example might help. Assume the default collision tileset in mapEd.
If you look at the default set, tile 0 is clear and tile 1 is completely solid. Anywhere you paint the completely solid tile, a '1' will be exported into that slot in the 2D collision array.
So, your game will have to interpret that 1 as completely solid in order to make it work.
The collision array could be used for other things as well. Say you have 'death drops' in your map. You fall off and you are dead. You could test for the player going out of bounds of the map. Another way you can do it that might be more flexible (say you have spikes at places in your map that do not correspond to the boundaries of your map) you could create a collision tile, say tile 2, that represents a 'kill zone'.
As before, it is up to your engine to interpret the data.
Note that you cannot paint collision tiles on non-collision layers and vice versa. If you see your current brush rendered as a non-textured red block, that is the editors way of telling you you can't paint that data onto the active layer.
#18652 - dagamer34 - Tue Mar 30, 2004 11:21 pm
Ah, Nessie, that is exactly what I wanted. I was just confused looking at the map editor docs and it didn't make any sense to me.
Now I can go make my Super Mario Bros. clone. Yah!!!
_________________
Little kids and Playstation 2's don't mix. :(