realbasic-games
[Top] [All Lists]

Accelerated Jump

To: Realbasic - Games <REALbasic-Games at lists dot realsoftware dot com>
Subject: Accelerated Jump
From: Eric <cire- at prodigy dot net>
Date: Tue, 14 Oct 2003 16:54:01 -0500
Hi

I have been thinking about the acceleration thing
and this is what I'm thinking on doing :

Hero_class

Y_Velocity as integer
Y_Accel as integer

Set_Y_Accel(YA as integer)
Y_Accel = YA

Get_Y_Accel() as integer
return Y_Accel

JumpCont()
If Jumping then
    Y_Velocity + Y_Velocity + Y_Accel
end if

Update()
hero_sprite.y = hero_sprite.y + Y_Velocity


So if the hero is standing still the the Y_Accel would be small ?
If he is just walking just a tad bit bigger?
Then if he is running then a big number?

Is this right? Math has never been my strong point....


Thanks

Eric


 - - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>