Gamedesign in Flash
- Started
- Last post
- 10 Responses
- SirG
I don't suppose any of you have a working isometric pathfinding algorithm in Flash mx laying somewhere?
I need to make an isometric world where users can select different characters and move them as he pleases.
Any thoughts?
- ape0
are you talk'n habbo hotel stuff?
- SirG0
Yep... You could compare it with that...
- highrise0
you need the A* algorithm or a-star. you can get a script for flash, its pretty heavy but think thats what you need.
- highrise0
emailed you the file.
- SirG0
Thanks H... I got that one from the "Flash MX Game Design Demystified" book... But wanted to save some time... The book is some 19 chapters long and about 600 pages :p
If someone has a working isometric engine that he/she would like to share, that'll be awesome... I know I'm asking much but it would be greatly appreciated. :p
- Seph0
oldx = getProperty (_root.house.char, _x);
oldy = getProperty
(_root.house.char, _y);finalX = ((Math.sqrt(3)/2)*(oldx+oldy));
finalY = ((oldy-oldx)/2);
Let me explain. (its flash 5 code)
oldx and oldy are the coordinates of a character inside a movie clip that has been inclined -60,-30 that will give you pseudo parralelogram 3d space.
finalx and finaly will convert the points of your character back to stage coordinates. That means you can limit and control your characters movement to within the parrallelogram but have the character itself outside the movie clip. (if it were inside the movie clip it would be all distorted)
It came in very useful when I produced a pseudo 3d game environment. Hope it helps.
- Seph0
highrise - can you email it to me too, please. Pretty please.
I heart highrise.
- Seph0
bump
highrise pleeeeeeeease
gimme that code baby.
- SirG0
I sent it to ya Seph but you really should read about it in the book 'cause it's a pretty hard to understand piece of code.
- Seph0
thanks SirG. Ill trace it to death and understand it in the end.