Jump to content
IGNORED

making semi realistic inertia using a table and HMOVE/changing Y


 Share

Recommended Posts

Am trying to think of how best to implement a small amount of inertia for both player and ball/missile movement. I am doing very old school code on Dogeball, and basically not keeping track of X (starting from a known spot, and just nudging hmove and keeping track of Y), this would seem to suggest that with a simple table in ROM, I could iterate through say, 5 values ranging from slowest to fast, to make something that feels like you're running (the player is a miniature golf block guy, btw),

 

What is everyone's thoughts on this? am just thinking out loud.

 

-Thom

Link to comment
Share on other sites

After each period of time, velocity = velocity + acceleration. Also, location = location + velocity. If acceleration is constant at 1, then the speed will increase each period of time by 1, 2, 3, 4, etc., up to the maximum speed. Also, the location will jump by that amount each period (i.e. 1, 3, 6, 10)

 

I think I got that right. I'm sure someone else could confirm.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...