• Print view

## Some physics formulas for later

Description: General discussion regarding the current engine development.
Moderators: Moderators, Semi-moderatos

CaptainSwag101
Topic author, Moderator
CaptainSwag101
Topic author, Moderator
Age: 21
Reputation: 26
Posts: 113
Joined: 2 Apr 2014
Location: California, United States
I know it's a little early for this, but I have estimated some formulas for Mario's physics that we can use when we start making the main game engine. These formulas are only rough guesses, but I will be analyzing the physics more closely soon, so these formulas may change.

Mario's Jump Velocity (Vertical Speed, in Blocks per Second):
-2x² + 3
x = number of seconds since start of jump

Mario's Jump Velocity (Vertical Speed, in Pixels per Second, if each block is 32x32 pixels)
-64x² + 96
x = number of seconds since start of jump

Koopa Shell Kicked Speed (Horizontal Speed, in Blocks per Second)
4 blocks per second

If any of these formulas seem wrong, please let me know, and I will check or fix!
Also, if anyone else has some formulas, please post them here!

--The Captain of Swag

Kevsoft
Angry developer
Kevsoft
Angry developer
Age: 20
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
I've found this long time ago, when I wanted to try to make one :P

http://forums.mfgg.net/viewtopic.php?p=346301
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿Ｓｉｇｎａｔｕｒｅ．ｓｔａｒｔ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬

Wohlstand in interview:
Spoiler

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿﻿Ｓｉｇｎａｔｕｒｅ．ｅｎｄ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

CaptainSwag101
Topic author, Moderator
CaptainSwag101
Topic author, Moderator
Age: 21
Reputation: 26
Posts: 113
Joined: 2 Apr 2014
Location: California, United States
Thanks! I will begin analyzing this right away!

Added after 11 minutes 24 seconds:
Ok, since SMBX used physics from SMB3 (or very close at least), here is a rundown of the physics calculations from SMB3. Note that that all times are per-frame, or 60 times a second, meaning that our engine should probably update the physics 60 times every second.
Also, in SMB3, the P-Meter allows the player run at maximum speed (as if taking off, but not actually flying) even when he does not have a Raccoon Leaf, but SMBX only allows the character to run full speed when they have a Raccoon Leaf. What will this engine be doing?

Explanation of SMB3 physics:

--The Captain of Swag

Kevsoft
Angry developer
Kevsoft
Angry developer
Age: 20
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
As this engine will be configureable it probably will do both, but before the custom part, it will first orientated on SMBX.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿Ｓｉｇｎａｔｕｒｅ．ｓｔａｒｔ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬

Wohlstand in interview:
Spoiler

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿﻿Ｓｉｇｎａｔｕｒｅ．ｅｎｄ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Veudekato
Viscount
Veudekato
Viscount
Reputation: 79
Posts: 369
Joined: 19 Feb 2014
Location: Russia
My channel (PlatGEnWohl news and tutorials , smbx tests):

Kevsoft
Angry developer
Kevsoft
Angry developer
Age: 20
Reputation: 93
Posts: 379
Joined: 26 Apr 2014
Location: Austria
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿Ｓｉｇｎａｔｕｒｅ．ｓｔａｒｔ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬

Wohlstand in interview:
Spoiler

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ ﻿﻿Ｓｉｇｎａｔｕｒｅ．ｅｎｄ（） ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

Veudekato
Viscount
Veudekato
Viscount
Reputation: 79
Posts: 369
Joined: 19 Feb 2014
Location: Russia
broken? for me it works
My channel (PlatGEnWohl news and tutorials , smbx tests):

Wohlstand
Wohlstand
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia

CaptainSwag101
Topic author, Moderator
CaptainSwag101
Topic author, Moderator
Age: 21
Reputation: 26
Posts: 113
Joined: 2 Apr 2014
Location: California, United States
So maybe when we create the engine, instead of having Mario's jump speed decrease over time, we can have a constant jumpspeed, which does not change, but a variable vertical speed which decreases by a global "Gravity" constant over time. So, when Mario jumps, set his VSpeed = JumpSpeed, then every frame while he is in the air, decrease: "VSpeed -= Gravity"

This will allow us to easily make all objects affected by gravity to fall at once, by subtracting the gravity constant from each NPC and player's vertical speed during every game tick/physics update cycle.

--The Captain of Swag

Wohlstand