Collision mask support
boriscallens opened this issue · comments
If there is collision mask support, could the readme.md be updated to provide information?
Hi - I don't have this in, all sprites are currently checked for collisions and bubbled through the handler. I can add this though and update the wiki. Just to be clear about what you're looking for, collision masks as described here http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Filtering#Filtering_collisions_using_masks ?
Let me know.
Hey j03m, thanks for the quick response :)
I'm not smart enough to get the context of the wiki you linked to, but I can quickly explain my need ;)
Parts of my screen should be inaccessible to my player character.
The inaccessible areas can easily be defined by a gif where transparent pixels should not trigger a collide event.
The gif should never be actually rendered.
Can I already do this with existing functionality?
Okay, gotcha. That's a bit different then what I was thinking.
You can sort of do that today if your game is using isometric tiles engine, you can follow the method used in the samples to create blocking cells and simply set the cells to GAME_WORLD_CELL_OVERLAY, GAME_WORLD_CELL_BLOCK. See the "Creating an isometric game world with mock-3D sprites" section of the readme. GAME_WORLD_CELL_BLOCK makes a portion of the iso map non-traversable. You could attempt to do this with the 2D gameworld tile stuff, but it's unfinished and may not work.
I don't have functionality for doing this using a single gif. So essentially the pixels in the gif define where a character is allowed to move? The gif is the size of the current viewport?
Yes, pixels define a colission effect.
The gif can be the size of the viewport, but doesn't have to be..
Hey I thought about this feature and I believe it could be implemented for flat 2d non-tile worlds, but it doesn't really make sense for iso-tiles or 2d-tiles. Reason being, the tiles are the map of non-traversable areas. Let me know if your thoughts were the same.
I have been experimenting and have solved my problem a different way.
To get to specifics: my screen was an ocean with a big ice-rock-island in
it.
The character could only walk on the ice rock.
In flixel this problem was solved by having a background with ocean and
island + a collision map for the ocean.
Now I'm solving it by just having the ocean on the background and adding a
island shaped extra sprite.
It was my mistake to stick with framework related techniques instead of
trying to use what was provided :S
But to answer your question: yes, iso collision maps wouldn't make
much sense I think ;)
On 8 June 2012 05:12, Joseph Mordetsky <
reply@reply.github.com
wrote:
Hey I thought about this feature and I believe it could be implemented for
flat 2d non-tile worlds, but it doesn't really make sense for iso-tiles or
2d-tiles. Reason being, the tiles are the map of non-traversable areas. Let
me know if your thoughts were the same.
Reply to this email directly or view it on GitHub:
#3 (comment)
Btw: have you seen this: http://www.mapeditor.org/ ?
Many framework seem to have an implementation of it.
Not that I need it, but it seems kind of cool ;)
On 8 June 2012 21:24, Boris Callens boris.callens@gmail.com wrote:
I have been experimenting and have solved my problem a different way.
To get to specifics: my screen was an ocean with a big ice-rock-island in
it.
The character could only walk on the ice rock.In flixel this problem was solved by having a background with ocean and
island + a collision map for the ocean.
Now I'm solving it by just having the ocean on the background and adding a
island shaped extra sprite.
It was my mistake to stick with framework related techniques instead of
trying to use what was provided :SBut to answer your question: yes, iso collision maps wouldn't make
much sense I think ;)On 8 June 2012 05:12, Joseph Mordetsky <
reply@reply.github.comwrote:
Hey I thought about this feature and I believe it could be implemented
for flat 2d non-tile worlds, but it doesn't really make sense for iso-tiles
or 2d-tiles. Reason being, the tiles are the map of non-traversable areas.
Let me know if your thoughts were the same.
Reply to this email directly or view it on GitHub:
#3 (comment)
I actually have one in the works as well. A random room generator as well. Also - let me know if you get your project to a level where you would want to show it on the site. I will link it in the ReadMe
Good news on the change!