This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Real Physics vs. Look-up Table? (plus Demo)

Real Physics vs. Look-up Table? (plus Demo)
by on (#46753)
This might be a simple answer and I'm overlooking it, but I am wondering if it is wiser to use real physics on a platformer on the NES, or is using a LUT the best way to go?

I've been trying to think of a reason to actually use real physics, because you save a lot of cycles, and an efficient LUT doesn't take that much ROM space.

I also created a demo using fixed-point number physics to estimate a falling object. I faked the negative number by using a flag, but there is a constant acceleration, velocity, and position.

http://cthulhu32.kraln.com/nesdev/physics/physics.0.1.nes

Press B to shoot the velocity up to max (it will wrap around and pop up on the top, didn't bother to add ceiling code). Also, if you wait a minute, you'll notice the velocity gets smaller and smaller till the mario eventually stops moving.

by on (#46755)
Platform-ish NES games as early as 1983, such as Balloon Fight, were already using real physics: 8 bytes for displacement and velocity of each active object.

by on (#46757)
tepples wrote:
Platform-ish NES games as early as 1983, such as Balloon Fight, were already using real physics: 8 bytes for displacement and velocity of each active object.


Ahh okay, that is a good example! I won't throw away the idea of using real physics now :) Thanks!

by on (#48536)
is that one still in progress?

by on (#49985)
Sorry to necromance an old thread, but I thought I'd give a quick reply.

I've been super busy with my new house, work, and life in general lately so I have had zero time to work on anything fun. However, I've been trying to re-prioritize my projects and workload lately, so I'm hoping to get some work done on a few NES things. I really want to work on a scrolling platformer, something simple most likely but that'd be a huge accomplishment for me. I'll get this physics demo up to snuff at some point as well, maybe add in a few ideas like an XOR image splasher, make a little dinky scene demo scroller :D