http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gameprogrammer] Re: advanced game



So you want something like this:
http://www.strille.net/works/misc/platform_demo/
(explore the level, there are the things you want in it).

Now basically what we have is we know the player entered the circle at some speed and therefore starts going up and round the circle. The distance the sprite has traveled is x, and we know that the angle is in radians x/r as well. Why? Well because a radian is the angle needed to have a arclength of x in a 1 radius circle, does this matter? Yes if you want to understand clearly what I'm talking about, but then again you could believe it's a goblin working on it, I'd recomend studying some basic trig.
Back to the angle, so now we have the angle, well that's almost it, really. That is the angle reading it from the center of the circle, we need to invert it (by adding 180° or pi radians) so that it's the angle from the ground to the head of our character.
So every so many frames check if our character is in a circle, if he is then rotate him (from the standing position) x/r+pi radians (convert it to degrees if that is what you need). Then you can check some other special positions, such as going up a wall left, a wall right, or going on the roof, if that is what you wish, but that's up to you.

Another trick is to take advantage of the vectors usage of flash, but I wouldn't know much about it, a quick google of it brought this:
http://www.tonypa.pri.ee/vectors/start.html
seems like a good place to start, basically what you do is you get the normal to a vector on some linear distances travelled through it, and use that to balance the character and maybe even change the walk animation. hmmm I think that's all I can help you with, hope it helps, I really reccomend this website, I've been browsing over it and it seems to be what you want.

On 4/30/07, Yasser Gonzalez <yassergs@ispejv.rimed.cu> wrote:
Oh! my forgivness to all I make that questions thinking in flash game
based. So If someone know flash please help me.


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html