tschak909 Posted June 10, 2016 Share Posted June 10, 2016 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 Quote Link to comment Share on other sites More sharing options...
+5-11under Posted June 10, 2016 Share Posted June 10, 2016 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. 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 10, 2016 Share Posted June 10, 2016 That works, but for more realistic movement I suggest using sub pixel calculations (fractional 16 bit math). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.