coolest game EVER!!!

Got a brilliant program idea? Let us know!

Moderator: MaxCoderz Staff

Stickmanofdoom
Regular Member
Posts: 86
Joined: Fri 17 Dec, 2004 8:20 pm
Contact:

Post 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.
Last edited by Stickmanofdoom on Sat 07 Jan, 2006 2:23 pm, edited 1 time in total.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

It was perfectly clear for me, thanks I understand it pretty much now, though I learned such things in physics.
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

So in other words, I should start paying attention in math? :)
cheese=yum
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

katmaster wrote:So in other words, I should start paying attention in math? :)
Well it applies to both math and science.
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post 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.
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
axcho
New Member
Posts: 53
Joined: Thu 20 Oct, 2005 5:44 pm
Contact:

Post 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.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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?
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

ASM porting time!!! if only I still could assemble or remember any ASM. :cry: :cry: :cry:
Image Image Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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.
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post 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.
Image Image Image
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post 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 :)
cheese=yum
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post 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?
Image Image Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Can we see this demo?
Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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!!!
User avatar
axcho
New Member
Posts: 53
Joined: Thu 20 Oct, 2005 5:44 pm
Contact:

Post by axcho »

Here's the UTI topic: Ninja

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