Why must we do yvelocity for jump or drop down

Talk about making games.

Why must we do yvelocity for jump or drop down

Postby Wertyboy » Tue Oct 26, 2010 3:13 am

Why? what happen when use y for jump or something?
User avatar
Wertyboy
 
Posts: 543
Joined: Tue Jun 15, 2010 12:38 pm
Location: HCM City, Vietnam
Score: 44 Give a positive score

Re: Why must we do yvelocity for jump or drop down

Postby Chai » Tue Oct 26, 2010 4:21 am

because it's easier.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Why must we do yvelocity for jump or drop down

Postby Hblade » Tue Oct 26, 2010 5:04 am

The same thing :P
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Why must we do yvelocity for jump or drop down

Postby lcl » Tue Oct 26, 2010 6:32 am

It is also possible to do with y, but it's harder. Anyway, I like your question werty. :D It's good to think other ways of doing things. :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Why must we do yvelocity for jump or drop down

Postby Chai » Tue Oct 26, 2010 9:37 am

LCL gives me a strong point of your question.
Thank you for giving me another way of thinking.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Why must we do yvelocity for jump or drop down

Postby DilloDude » Thu Oct 28, 2010 12:41 am

Setting the yvelocity gives it a constant speed. If you just change the y, it will only move once. You can create your own variable to represent yvelocity, and add it to y every frame on a draw actor event, which does give you some advantages if you want to do more fancy things, but for normal situations, yvelocity is simpler.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest