i’ve got some problems with flash mx… i’m trying to make a game using the arrow buttons on the keyboard to navigate thru the platform. this works so far… but the platform is kind of like a labyrinth seen from above if you know what i mean. that’s why i said it’s like zelda or pokemon on the game boy
so the view is from the top…
now the problem is i need a collision detection… this doesnt work with tutorials and the other problem is that in a labyrinth there are walls and i have to prevent that the users hit’s on walls…
so basically the player has to be able to walk thru the map and not thru or over the walls but i cant get this to work. if a player hits a wall then he should just walk along that wall but doesnt work
AND AND then when a player comes over (like in contact) with another player then the whole movie has to go to another url on the site, a html site. after he been to the html site he should be able to go back to the place where the player has been…
like when a player walks to a dragon then the movie has to go to dragon.html. but then in that page he can click to continue the walk, then the players should be place rite where he left the game and not in the beginning again…
well i hope u ppl can help me out and if u can hurry it up coz i’m trying to put my site online in a few weeks…
alright… calm down first of all. What you’re talking about is creating a tile-based world. You don’t need collision detection for this… it would be simply too complicated.
The way to create a tile based world is to use a two dimensional matrix. It’s basically a table, much like this
|111101111|
|111100001|
|111111101|
|100000001|
001111111
the 1s represent walls, and the 0s represent open spaces… see how the 0s follow a path? Games like pacman, etc, are done like this. You should start thinking in these terms.
Each object in your world will have an inherent position(x,y). When you try to move in a certain direction, lets say to the right, your actionscript should check whether (x,y+1) is occupied. If it’s not, it can move.