The Importance of Math and Science in N
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
Velocity
Now for a ninja to free fall full screen, it takes 96 frames. Considering that is approximately 23 squares, it is an average speed of 2.40 sq/frame. Remember that as the pull of gravity is constant, whether the ninja falls at an angle or straight down, it will pull at the same speed (there is no air resistance in N) The acceleration of a falling N is shown here:
Note: When running, the Ninja achieves maximum velocity at approximately 52 frames, or after approximately 7 squares of movement. If we consider a square as approximately 6 feet (according to the ninja's size) then that is after 42 feet, much less space then an actual athlete takes to achieve maximum velocity (aprox. 40 yards).
When falling, the Ninja achieves max velocity at 46 frames.
The farthest a ninja can free fall horizontally is across 13.5 squares
A launchpad meanwhile propels the ninja from 0/0 to 11sq/47 frames, for an acceleration of 0.23sq/frame
Now, when moving horizontally across a surface, N takes exactly 168 frames, and since it is 31 squares across, that is a rate of approximately 0.184 sq/frame, significantly slower. Here are the rates of enemies:
Frame By Frame: A Lifetime
A Ninja's lifespan is 90 seconds. At 40 frames per second, that is 3600 frames to a lifetime. A lot of maneuvering eh?
Well when put into perspective, one could fall more than 37 times, or run back and forth almost 22 times.
___________________________________________________________________________________________________________________________
Enemy's Speed
Vertical:
-Thwump (attacking): 127
-Thwump (returning): 315
-Attacking/Returning Ratio: approx. 1/2.5frames
-Laser Drone: 1238
-Chaingun Drone: 836
-Zap Drone: 312
-Seeker Drone: 144
-Seeker/Zap/Chaingun/Laser Ratio: approx. 1/1.48/3.97/8.6 respectively
-Rocket: 170
Horizontal:
-Floorguard: 138
-Thwump (attacking): 172
-Twhump (returning): 425
-Attacking/Returning Ratio: approx. 1/2.5frames
-Laser Drone: 1669
-Chaingun Drone: 1127
-Zap Drone: 421
-Seeker Drone: 194
-Seeker/Zap/Chaingun/Laser Ratio: approx. 1/1.48/3.97/8.6 respectively
-Rocket: 229
Now speeds come out like such, in squares/frame:
-N (falling): 0.240
-N (running): 0.184
-N (terminal falling): 0.340
-N (terminal running): 0.267
-Thwump (attacking): 0.181
-Thwump (returning): 0.073
-Laser Drone: 0.019
-Chaingun Drone: 0.028
-Zap Drone: 0.074
-Seeker Drone: 0.159
-Rocket: 0.135
-Floorguard: 0.225
In summary, enemy speeds are summed up in this order
N (terminal falling)>N (running terminal)>N (falling)>Floorguard>N (running)>Thwump (attacking)>Rocket>Seeker Drone>Zap Drone>Thwump (returning)>Chaingun Drone>Laser Drone
Basically, N can outrun zap drones, returning thwumps, chainguns and lasers. He is approximately the same speed as an attacking thump, but only if they both start at 0 sq/f. If the ninja has even a 1 frame running start, he will break ahead at the very end having achieved his terminal velocity more quickly.
N can outfall anything, unless you count NReality's wall floorguards, which I won't cover. Note that following gravitational acceleration, N accelerates as the map goes on, then hits terminal velocity. This is observed when the attacking thwump is in the lead for the majority of a free fall, until N accelerates and passes the thwump, which has a constant velocity. N however is constantly accelerating until terminal velocity...and is the only object in the game to do so, breaking the laws of physics.
____________________________________________________________________________________________
A gauss' aim and frequency algorithm is a gaussian curve (a bell curve) named after Carl Freiderich Gauss.
Shown with the equation
f(x)=ae-[(x-b^2)/2c^2]
See the attached picture for a visual aid of both velocity and gauss
_________________________________________________________________________________________________________
Momentum
Momentum is crucial for N. Without it, he couldn't jump, or slide. But what constitutes momentum?
A simple formula: mass*velocity=momentum
Now as N's mass is a constant, the only variable to change momentum is N's velocity. The faster N is going, the farther he is propelled. For example, when sprinting down 2-sloped tiles and then jumping off a cliff, N will be propelled farther than if simply running. This is the basic principle that causes N to go so far when propelled by a thwump cannon-it adds velocity which adds momentum, allowing N to go farther.
Momentum is also commonly needed to get through small gaps. The same principle applies, that N's velocity is greater when in free fall (see section on gravity acceleration in 'Velocity'), and so he can have greater momentum to get through the small cracks.
_____________________________________________________________________________________________________________________
Slope
This is one of the more obvious lessons. Here is a list of tiles slopes, of QWAS respectively:
1:
x=y
-x=y
-x=y
x=y
2:
2x=y
-2x=y
-2x=y
2x=y
3:
1/2x=y
-1/2x=y
-1/x=y
1/2x=y
4:
y= -sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y=sqrt(-x^2 + 1) for -1 < x < 0
5:
Undefined
Zero
Undefined
Zero
6:
2x=y
-2x=y
-2x=y
2x=y
7:
1/2x=y
-1/2x=y
-1/x=y
1/2x=y
8:
y=sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y= -sqrt(-x^2 + 1) for 0 < x < 1
E: x=0 or y=0
D: --
Speed per tiles (no propulsion) while falling:
1: 0.073
2: 0.152
3: 0.034
4: --
5: 0
6: 0.152
7: 0.034
8: --
E: 0
D: 0.240
Size
If the N game was in actual realistic terms, the ninja would be 5'8" tall. This would imply the tiles size would be 6 feet, meaning the dimensions of the game in feet is 144x186 feet or 26874 square feet.
Now for a ninja to free fall full screen, it takes 96 frames. Considering that is approximately 23 squares, it is an average speed of 2.40 sq/frame. Remember that as the pull of gravity is constant, whether the ninja falls at an angle or straight down, it will pull at the same speed (there is no air resistance in N) The acceleration of a falling N is shown here:
Note: When running, the Ninja achieves maximum velocity at approximately 52 frames, or after approximately 7 squares of movement. If we consider a square as approximately 6 feet (according to the ninja's size) then that is after 42 feet, much less space then an actual athlete takes to achieve maximum velocity (aprox. 40 yards).
When falling, the Ninja achieves max velocity at 46 frames.
The farthest a ninja can free fall horizontally is across 13.5 squares
A launchpad meanwhile propels the ninja from 0/0 to 11sq/47 frames, for an acceleration of 0.23sq/frame
Now, when moving horizontally across a surface, N takes exactly 168 frames, and since it is 31 squares across, that is a rate of approximately 0.184 sq/frame, significantly slower. Here are the rates of enemies:
Frame By Frame: A Lifetime
A Ninja's lifespan is 90 seconds. At 40 frames per second, that is 3600 frames to a lifetime. A lot of maneuvering eh?
Well when put into perspective, one could fall more than 37 times, or run back and forth almost 22 times.
___________________________________________________________________________________________________________________________
Enemy's Speed
Vertical:
-Thwump (attacking): 127
-Thwump (returning): 315
-Attacking/Returning Ratio: approx. 1/2.5frames
-Laser Drone: 1238
-Chaingun Drone: 836
-Zap Drone: 312
-Seeker Drone: 144
-Seeker/Zap/Chaingun/Laser Ratio: approx. 1/1.48/3.97/8.6 respectively
-Rocket: 170
Horizontal:
-Floorguard: 138
-Thwump (attacking): 172
-Twhump (returning): 425
-Attacking/Returning Ratio: approx. 1/2.5frames
-Laser Drone: 1669
-Chaingun Drone: 1127
-Zap Drone: 421
-Seeker Drone: 194
-Seeker/Zap/Chaingun/Laser Ratio: approx. 1/1.48/3.97/8.6 respectively
-Rocket: 229
Now speeds come out like such, in squares/frame:
-N (falling): 0.240
-N (running): 0.184
-N (terminal falling): 0.340
-N (terminal running): 0.267
-Thwump (attacking): 0.181
-Thwump (returning): 0.073
-Laser Drone: 0.019
-Chaingun Drone: 0.028
-Zap Drone: 0.074
-Seeker Drone: 0.159
-Rocket: 0.135
-Floorguard: 0.225
In summary, enemy speeds are summed up in this order
N (terminal falling)>N (running terminal)>N (falling)>Floorguard>N (running)>Thwump (attacking)>Rocket>Seeker Drone>Zap Drone>Thwump (returning)>Chaingun Drone>Laser Drone
Basically, N can outrun zap drones, returning thwumps, chainguns and lasers. He is approximately the same speed as an attacking thump, but only if they both start at 0 sq/f. If the ninja has even a 1 frame running start, he will break ahead at the very end having achieved his terminal velocity more quickly.
N can outfall anything, unless you count NReality's wall floorguards, which I won't cover. Note that following gravitational acceleration, N accelerates as the map goes on, then hits terminal velocity. This is observed when the attacking thwump is in the lead for the majority of a free fall, until N accelerates and passes the thwump, which has a constant velocity. N however is constantly accelerating until terminal velocity...and is the only object in the game to do so, breaking the laws of physics.
____________________________________________________________________________________________
A gauss' aim and frequency algorithm is a gaussian curve (a bell curve) named after Carl Freiderich Gauss.
Shown with the equation
f(x)=ae-[(x-b^2)/2c^2]
See the attached picture for a visual aid of both velocity and gauss
_________________________________________________________________________________________________________
Momentum
Momentum is crucial for N. Without it, he couldn't jump, or slide. But what constitutes momentum?
A simple formula: mass*velocity=momentum
Now as N's mass is a constant, the only variable to change momentum is N's velocity. The faster N is going, the farther he is propelled. For example, when sprinting down 2-sloped tiles and then jumping off a cliff, N will be propelled farther than if simply running. This is the basic principle that causes N to go so far when propelled by a thwump cannon-it adds velocity which adds momentum, allowing N to go farther.
Momentum is also commonly needed to get through small gaps. The same principle applies, that N's velocity is greater when in free fall (see section on gravity acceleration in 'Velocity'), and so he can have greater momentum to get through the small cracks.
_____________________________________________________________________________________________________________________
Slope
This is one of the more obvious lessons. Here is a list of tiles slopes, of QWAS respectively:
1:
x=y
-x=y
-x=y
x=y
2:
2x=y
-2x=y
-2x=y
2x=y
3:
1/2x=y
-1/2x=y
-1/x=y
1/2x=y
4:
y= -sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y=sqrt(-x^2 + 1) for -1 < x < 0
5:
Undefined
Zero
Undefined
Zero
6:
2x=y
-2x=y
-2x=y
2x=y
7:
1/2x=y
-1/2x=y
-1/x=y
1/2x=y
8:
y=sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y= -sqrt(-x^2 + 1) for 0 < x < 1
E: x=0 or y=0
D: --
Speed per tiles (no propulsion) while falling:
1: 0.073
2: 0.152
3: 0.034
4: --
5: 0
6: 0.152
7: 0.034
8: --
E: 0
D: 0.240
Size
If the N game was in actual realistic terms, the ninja would be 5'8" tall. This would imply the tiles size would be 6 feet, meaning the dimensions of the game in feet is 144x186 feet or 26874 square feet.
- Attachments
-
- Gaussian Function.png
- (24.56 KiB) Downloaded 592 times
Last edited by Amadeus on 2009.04.16 (21:33), edited 19 times in total.
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
-
- Ice Cold
- Posts: 221
- Joined: 2008.11.17 (13:24)
- NUMA Profile: http://nmaps.net/user/apse
- Location: Perth, Australia
- Contact:
well.
seems like it took a lot of researching.
pretty interesting nonetheless.
seems like it took a lot of researching.
pretty interesting nonetheless.
---

---

---
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
yes, it did
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- Damn You're Fine
- Posts: 384
- Joined: 2008.09.19 (01:47)
- NUMA Profile: http://nmaps.net/user/littleviking001
- MBTI Type: INTP
- Location: Southern California
- Contact:
Pretty nice. The slopes for the 4- and 8-tiles are off. A circle's slope isn't the same as a parabola's slope. And the ninja has acceleration when he falls, so you'd have some more work to do to find the rate he actually falls at. Average speed is okay, but in certain cases the acceleration would play an important role.

The last Metroid is in captivity. The galaxy is at peace...
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
Done!
thanks for the constructive criticism
thanks for the constructive criticism
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- Subterranean Engineer
- Posts: 1694
- Joined: 2008.09.26 (16:15)
- NUMA Profile: http://nmaps.net/user/Izzy
- MBTI Type: INTP
- Global Mod
- Posts: 213
- Joined: 2008.10.12 (01:08)
- NUMA Profile: http://nmaps.net/user/RandomDigits
- Steam: www.steamcommunity.com/id/
- MBTI Type: ENFP
- Location: Local Star System
Interesting.
One thing I noticed is the velocity of the enemies is the same horizontally as vertically. Does that mean you calculated it for 23 tile lengths too? Because the ninja's running velocity was calculated for 31.
Or do the enemies move slower horizontally? :p
One thing I noticed is the velocity of the enemies is the same horizontally as vertically. Does that mean you calculated it for 23 tile lengths too? Because the ninja's running velocity was calculated for 31.
Or do the enemies move slower horizontally? :p
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
My bad. Was being clumsy again and knew they were the same speeds, and didn't incoporate the different tile lengths...
ratios are the same though, as are their speed
ratios are the same though, as are their speed
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- RoboBarber
- Posts: 367
- Joined: 2008.09.30 (21:43)
- NUMA Profile: Legions of http://nmaps.net/user/Onesevennine
- MBTI Type: INFP
- Location: Texas'); DROP TABLE Members;--
I think the functions for 8 tiles, Q, W, A, and S, respectively, look something like:
y=sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y= -sqrt(-x^2 + 1) for 0 < x < 1
The equations for 4 tiles' Q, W, A, and S, respectively:
y= -sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y=sqrt(-x^2 + 1) for -1 < x < 0
Cool and interesting research, well done. Just one thing that I noticed: the ninja can definitely outrun attacking thwumps at top speed.
y=sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y= -sqrt(-x^2 + 1) for 0 < x < 1
The equations for 4 tiles' Q, W, A, and S, respectively:
y= -sqrt(-x^2 + 1) for 0 < x < 1
y= -sqrt(-x^2 + 1) for -1 < x < 0
y=sqrt(-x^2 + 1) for 0 < x < 1
y=sqrt(-x^2 + 1) for -1 < x < 0
Cool and interesting research, well done. Just one thing that I noticed: the ninja can definitely outrun attacking thwumps at top speed.
:loud music:

"Whosoever dies with his art on the most hard drives, wins." - Michael W. Dean'

"Whosoever dies with his art on the most hard drives, wins." - Michael W. Dean'
-
- "Asked ortsz for a name change"
- Posts: 3380
- Joined: 2008.11.13 (16:47)
Very nice, especially the 'race' diagram at the end.
the dusk the dawn the earth the sea
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
Made a major error in horizontal calculations
Fixing now
Fixing now
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- Yet Another Harshad
- Posts: 464
- Joined: 2008.09.26 (13:23)
- NUMA Profile: http://nmaps.net/user/lord_day
- MBTI Type: INTJ
My N usually plays at 8 ms/f or 8 milliseconds per frame. Which is 125 frames per second, and doesn't seem right. Have I made a mistake?

- Yet Another Harshad
- Posts: 480
- Joined: 2008.10.25 (09:44)
- NUMA Profile: http://nmaps.net/user/KlanKaos
- MBTI Type: ENFP
- Location: Mah house.
When you watch a demo and compare it to the time elapsed, it works out to 40 frames/second. I never could figure out how the 8 ms/f worked into it.
Anyways, this is really cool. I've been thinking about stuff like this for a while now, and even thinking about doing an extra-credit Physics project on N (kinematics FTW!). I now know I'm not the only one who thinks about these things.
Anyways, this is really cool. I've been thinking about stuff like this for a while now, and even thinking about doing an extra-credit Physics project on N (kinematics FTW!). I now know I'm not the only one who thinks about these things.

- Moderator
- Posts: 1318
- Joined: 2008.12.04 (01:16)
- NUMA Profile: http://nmaps.net/user/maxson924
- Location: Tampa
- Contact:
Huh? Last time I checked (3 seconds ago), the ninja can outrun rockets pretty easily.Basically, N can outrun zap drones, returning thwumps, chainguns and lasers, but cannot outrun floorguards, attacking thwumps, seeker drones, and rockets
This is very cool, though. I had no idea that sideways-moving thwumps were slower than downward-moving ones :P

- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
Maxson-the speeds are the same.however,the screen is not a perfect square resulting In different frame counts
Across, it is 31 squares, and down 23
Speeds are universal (besides N)
Across, it is 31 squares, and down 23
Speeds are universal (besides N)
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- Moderator
- Posts: 1402
- Joined: 2008.10.01 (01:36)
- NUMA Profile: http://nmaps.net/user/therealone
There is also an interesting fact that n will hit the ground at the same frame whether he is falling straight down or at an angle, Making his falling speed when he is falling fully to the left or right, faster than falling straight. So if you could work out those vector addition formulas that would be a goo addition.
This same thing occurs when n jumps and will land on the spot that he could run to at the same time. So if you could work out his jumping velocities too that would be another good addition.
But, this is a great informative guide, I like it.
This same thing occurs when n jumps and will land on the spot that he could run to at the same time. So if you could work out his jumping velocities too that would be another good addition.
But, this is a great informative guide, I like it.
<@Izzy> Holy balls, sweet run.
<@gloomp> Holy sweet, balls run.
<@Izzy> Sweet, balls run holy.
<@gloomp> Run sweet, balls holy.
<@Izzy> Sweet run, ballsy hole.
<@gloomp> All's sweet, holeb run.
<@Izzy> Ballsy nun, sweet mole.

<@Kool> bro no joke, I saw the sexiest swedish chick giving herself anal on one of those pop-up alarm-clocks at my uncle's house
<@gloomp> Holy sweet, balls run.
<@Izzy> Sweet, balls run holy.
<@gloomp> Run sweet, balls holy.
<@Izzy> Sweet run, ballsy hole.
<@gloomp> All's sweet, holeb run.
<@Izzy> Ballsy nun, sweet mole.

<@Kool> bro no joke, I saw the sexiest swedish chick giving herself anal on one of those pop-up alarm-clocks at my uncle's house
-
- The 700 Club
- Posts: 732
- Joined: 2008.11.19 (00:59)
- NUMA Profile: http://nmaps.net/user/greenblack
- Location: In the land of the jabberwocky
O_0
ughh
my head hurts.
i hope you fall off at 1 fps. and cant do a thing about it.
good though
how long did this take?
ughh
my head hurts.
i hope you fall off at 1 fps. and cant do a thing about it.
good though
how long did this take?
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
a while
I had to test everything multiple times
the frame counts are average, so shouldn't be off-and if they are, only so by a single frame
I had to test everything multiple times
the frame counts are average, so shouldn't be off-and if they are, only so by a single frame
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
All fixed up, with a few minor additions. If theres anything wrong though, love to hear it!
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
-
- Wizard Dentist
- Posts: 604
- Joined: 2008.09.26 (15:04)
- NUMA Profile: http://nmaps.net/user/SkyPanda
This is very interesting. Good job!
- The 700 Club
- Posts: 705
- Joined: 2008.09.20 (11:26)
- NUMA Profile: http://nmaps.net/user/mc_george
- MBTI Type: INTP
- Location: Melbourne, Australia
Useful if you want to think about N through maths and physics. Useless if you just want to play the game. :P
And lord_day, I imagine the 8ms/f is only a measure of how the speed of transition between one frame and the next. The game itself only records an action every 0.025 seconds, as you can see when you high score.
And lord_day, I imagine the 8ms/f is only a measure of how the speed of transition between one frame and the next. The game itself only records an action every 0.025 seconds, as you can see when you high score.

- Moderator
- Posts: 1318
- Joined: 2008.12.04 (01:16)
- NUMA Profile: http://nmaps.net/user/maxson924
- Location: Tampa
- Contact:
So a rocket is really faster than the ninja?

- Boeing Boeing Bone!
- Posts: 755
- Joined: 2008.12.23 (05:44)
@maxson:no
@george:no. Speed matters a lot, from know which enemies can outrun you to timing in a dda
@george:no. Speed matters a lot, from know which enemies can outrun you to timing in a dda
http://greenbrown.bandcamp.comPeople write to me and say, "I’m giving up, you’re not talking to me." I just write them a simple message like, "Never give up," you know? And it changes their life
- The 700 Club
- Posts: 705
- Joined: 2008.09.20 (11:26)
- NUMA Profile: http://nmaps.net/user/mc_george
- MBTI Type: INTP
- Location: Melbourne, Australia
What I'm saying is that these explanations only give you a further understanding and depth of knowledge into the physics of the game. It's not really going to help you any more with just playing the game.ganteka wrote:@george:no. Speed matters a lot, from know which enemies can outrun you to timing in a dda
And after playing a couple of columns, I think most people would've figured out what the ninja can and can't outrun.

-
- "Asked ortsz for a name change"
- Posts: 3380
- Joined: 2008.11.13 (16:47)
I've often wondered how different N would be if floorguards, rockets, etc gradually gained speed instead of starting at max speed. N is the only object that builds up its speed. (I think). Makes the game much more interesting.
the dusk the dawn the earth the sea
Who is online
Users browsing this forum: No registered users and 6 guests