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

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
Cthulhu32
Posts: 15
Joined: Wed May 06, 2009 8:47 am
Location: New York, NY
Contact:

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

Post by Cthulhu32 » Wed May 13, 2009 7:40 am

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/physi ... cs.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.

tepples
Posts: 22086
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed May 13, 2009 8:05 am

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.

User avatar
Cthulhu32
Posts: 15
Joined: Wed May 06, 2009 8:47 am
Location: New York, NY
Contact:

Post by Cthulhu32 » Wed May 13, 2009 8:28 am

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!

Kojote
Posts: 35
Joined: Tue Jul 15, 2008 7:57 pm
Location: Salzburg, Austria
Contact:

Post by Kojote » Fri Jul 03, 2009 8:57 pm

is that one still in progress?
Kojote
http://www.pdroms.de - Homebrew news for consoles & handelds
http://www.retroguru.com - Retroguru Game Development
http://www.speckdrumm.org - Speckdrumm - Austrian Demogroup
http://www.retromagazine.eu - Retro - German Retrogaming Print-Magazine

User avatar
Cthulhu32
Posts: 15
Joined: Wed May 06, 2009 8:47 am
Location: New York, NY
Contact:

Post by Cthulhu32 » Tue Aug 18, 2009 11:23 am

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

Post Reply