Main Menu

Sprite to wall collision.

Started by Zenn, April 28, 2008, 08:51:19 AM

Previous topic - Next topic

Zenn

Hi everyone.  I am currently in the process of putting together a small RPG adventure, the project is going smoothly(ish) so far.  I've got my sprites moving and didplayed correctly,  I have just figured out how to get Playmapper maps displayed (Excellent tile tool, good work Kevin): and I've just put my basic stats into declared arrays, (monsters as type's).

My problem thus far is collision with wall tiles, how would you code the player to ignore grass tiles and treat certain wall tiles as solids?  So far I'm using a combination of GetTile and player oldX/Y#, This works to an exstent but causes the camera to shake slightly...Any ideas.

kevin


    When mapping in games,  we generally have two versions of the our maps.  One is the display the version the other being a collision map.    The collision map isn't drawn, we just run collisions against it. 

Zenn

Ah, two maps, It's so obvious when you think about it.
First map drawn, second map drawn with wall tiles only and invisible, collision would be coded for invisible map.
Thanks for your quick reply Kevin.

monkeybot

i tend to have multiple maps(array based) and use these for alien path boundaries and interactive components 'n that