Computer Science Canada walking animation |
Author: | kousha41564 [ Fri Jan 02, 2009 4:02 pm ] | ||
Post subject: | walking animation | ||
alright watsup guys. i am making a game for fun , and right now i am just working on the walking animations and the colisions. this is a pokemon red blue style thing. you know where you have the bird view thing going on ? so here is my code, i made a dude, and made his shoes in relation to the position of the dude (cirlce) , now i wud like the feet to move as if he is walking. cant figure it out thogh. any help is apreciated.
|
Author: | Homer_simpson [ Fri Jan 02, 2009 7:41 pm ] |
Post subject: | Re: walking animation |
replace: drawfilloval (xx2,yy2, sd1,sdd1,2) %shoes drawfilloval (xx1,yy1, sd2,sdd2,2) %shoes with: drawfilloval (xx2 + round (sind (x1 * 10)) * 3, yy2 + round (sind (y1 * 10)) * 3, sd1, sdd1, 2) %shoes drawfilloval (xx1 + round (sind ((x1 + 18) * 10)) * 3, yy1+ round (sind ((y1 + 18) * 10)) * 3, sd2, sdd2, 2) %shoes |
Author: | kousha41564 [ Fri Jan 02, 2009 7:47 pm ] |
Post subject: | RE:walking animation |
dude aweosme THANK YOU. sorrry to be a burden but could you explain ? |
Author: | Tony [ Fri Jan 02, 2009 8:12 pm ] |
Post subject: | RE:walking animation |
in simple terms, natural walking movement's approximation by a sine wave is close enough. |
Author: | kousha41564 [ Fri Jan 02, 2009 9:12 pm ] |
Post subject: | RE:walking animation |
alright alright alright, sorry i am such a dumb*** but , i will require a more indepth explenation as to what exactly is happening cuz i would love to use this code in future for other things. thank you |
Author: | Tony [ Fri Jan 02, 2009 10:31 pm ] |
Post subject: | RE:walking animation |
uhh... there was a link in my previous post a sine wave -- http://en.wikipedia.org/wiki/Sine_wave is a periodic wave based on the sine functions -- http://en.wikipedia.org/wiki/Sine , typically covered in grade 10 math. Wikipedia is fairly in-depth on the subject. ![]() |
Author: | kousha41564 [ Fri Jan 02, 2009 10:34 pm ] |
Post subject: | RE:walking animation |
Well, i will have a fun type trying to pass this as my own genius in front of otehr people ![]() |