Page 8 of 10

Posted: Sat 07 Jan, 2006 3:09 am
by Stickmanofdoom
Acceleration (gravity) is fairly simple, once you know how it's done.

Assuming that down is considered positive:
(y-coordinate) + (y-velocity) = (new y-coordinate)
(y-velocity) + (gravity constant) = (new y-velocity)

To make the acceleration smoother, the object should move in "fractions of a pixel". This is accomplished by using a 16-bit number for the position of the object, and using the most significant byte for all other events.

The reason you don't need to square anything is actually kind of neat. Da Vinci and Galileo both figured out that "the sum of consecutive odd numbers gives the distance traveled by a free falling body on a given time". That's why the velocity changes at a constant rate. Calculus would also explain why this is the case.

Does anyone want to explain this a little clearer? I have a feeling this only makes sense to people who already know how this works.

Posted: Sat 07 Jan, 2006 3:25 am
by kalan_vod
It was perfectly clear for me, thanks I understand it pretty much now, though I learned such things in physics.

Posted: Sun 08 Jan, 2006 12:44 am
by katmaster
So in other words, I should start paying attention in math? :)

Posted: Sun 08 Jan, 2006 12:53 am
by kalan_vod
katmaster wrote:So in other words, I should start paying attention in math? :)
Well it applies to both math and science.

Posted: Sun 08 Jan, 2006 3:58 am
by dysfunction
This game doesn't exactly have accurate physics- really cool physics, but unrealistic nonethless. It doesn't seem to have continuously acting gravitational acceleration- it just accelerates you to a certain velocity.

EDIT: You know what, it does! It does have accurate kinematics, at least basically. Obviously you can't bounce off walls like that, but the falling part is accurate.

Posted: Tue 21 Feb, 2006 7:32 pm
by axcho
After many hours of debugging, I have created a TI-BASIC engine for N! 8) It is fast even on my 83+ so on the 84+ it should be very fast. So far the engine includes running, jumping, wall sliding, wall jumping, and perfectly functional collision detection! The controls are 2nd to jump, and the right and left arrows to move. I've tried to keep the feel as similar as possible to N.

The ninja is represented by a single pixel, and its velocity ranges from -2 to 2 pixels per frame in both axes. At the moment there are no enemies or items, but mines and gold should be possible to implement. Moving enemies won't work, but turrets might.

Posted: Tue 21 Feb, 2006 7:44 pm
by kalan_vod
OMG! That sounds awsome! I wish I would've thought about making it a pixel...Could you post a ss or demo sometime soon?

Posted: Tue 21 Feb, 2006 7:47 pm
by Liazon
ASM porting time!!! if only I still could assemble or remember any ASM. :cry: :cry: :cry:

Posted: Tue 21 Feb, 2006 7:51 pm
by kalan_vod
Liazon wrote:ASM porting time!!! if only I still could assemble or remember any ASM. :cry: :cry: :cry:
He said it's in basic, so it wouldn't be to hard to make in 68k basic.

Posted: Tue 21 Feb, 2006 7:53 pm
by Liazon
kalan_vod wrote:
Liazon wrote:ASM porting time!!! if only I still could assemble or remember any ASM. :cry: :cry: :cry:
He said it's in basic, so it wouldn't be to hard to make in 68k basic.
I believe the original intention was z80 ASM.

68k basic is somewhat different from 83+, but doable. I'd rather try to port the engine in C. Then again, axcho could probably do it himself and I'm too bad at programming to do it correctly.

Posted: Wed 22 Feb, 2006 2:07 am
by katmaster
Sounds awesome!!! I'm glad to see work is actually being done on this. As for me learning ASM, I'm just way to busy right now. Maybe this summer :)

Posted: Wed 22 Feb, 2006 2:07 pm
by Liazon
katmaster wrote:Sounds awesome!!! I'm glad to see work is actually being done on this. As for me learning ASM, I'm just way to busy right now. Maybe this summer :)
same here.

@axcho: can I take a look at your source? I wonder what text format will allow all the symbols to appear correctly. I just need to take a look at the pseudocode. I can't guarantee that I have time to work on this. I'm so caught up with my first project, and it's such a simple game, I'd be surprised if I could get this done correctly.

Would it be advisable to add a pause mode which allows you to look at the entire map?

Posted: Thu 23 Feb, 2006 4:12 pm
by threefingeredguy
Can we see this demo?

Posted: Thu 23 Feb, 2006 6:02 pm
by kalan_vod
He posted it on UTI.

I tried it and it wroks really good, but good thing axes were on otherwise I would've just fell :D. I made it into a program so more people could try it (those who are lazy :D).

CLICKY <---------CLICK NOW!!!

Posted: Thu 23 Feb, 2006 8:06 pm
by axcho
Here's the UTI topic: Ninja

I'm glad to see your interest in my program. Thanks. :)