Banner
Views: 853,416,127
Time:
20 users online: AnEvilGhost, bladeoperator, brickblock369, Bullymario, Counterfeit,  Deeke, ExONightZ, Fermín Acosta Jr., Hobz, Infinity, Jellcaps, Jibjig, levelengine, Lumy, ModernKiwi,  Ninja Boy, SammmUuU, Schneider912, SNDBB, Starrypop - Guests: 48 - Bots: 59 Users: 47,077 (2,501 active)
Latest: PixusPanic
Tip: It's recommended to use these when ripping graphics.Not logged in.
Details for Remove Speed Oscillation
SMW Patches - Remove Speed Oscillation Show random
File Name: Remove Speed Oscillation
Added:
Authors: tjb0607
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: Completely removes speed oscillation (http://tasvideos.org/GameResources/SNES/SuperMarioWorld.html#ExplanationOfOscillatingSpeeds) from the game.
When sped up, instead of oscillating around the maximum speed, you will go exactly the maximum speed.
This will make jump heights completely consistent, and allow for completely consistent slope speed sections.

Note: because the default title screen demo goes dpad neutral in the air, it will desync with this patch and kill Mario. You will need to use a custom title screen demo to prevent the title screen from softlocking you.

It even removes the speed oscillation in mashing B to slow down with cape, which may make backwards fly harder.

Other than that, it should feel indistinguishable from normal, on average giving you a roughly 0.6% higher speed (+0.2 subpixels/frame) than usual.
Tags: lorom, sa-1, speed
Download: Download - 1.21 KiB
52 downloads
Screenshots
Previous 
 Next
MiniMawile303
Moderated with:
Lunar Magic 3.11
ASAR 1.71
SA-1 Pack 1.32 (also tested without)
Snes9x 1.60

Added SA-1 compatibility while moderating. It works as intended and doesn't feel like too obtrusive of a change to physics, so it's accepted. There's another speed fix patch out there, but I think both are valid to keep, just depends on what you want to change for your hack.
Note that this doesn't completely remove the cape slow down by mashing B, rather it makes it more consistent in how it slows you down (and caps how slow you can go).
Posted by:  MiniMawile303 - | Link
tjb0607
Originally posted by AnasMario130
So oscillation is basically a gradual change in a physical quantity instead of an immediate one, particularly in this context? I can see that in the GIFs.


Speed oscillation is when you're at maximum speed, and you're holding forward, your speed doesn't stay constant, it goes through a loop of 5 speeds.

For example, without p-speed, it will oscillate through 36, 35, 36, 35, 37 speed, rather than staying constant at the maximum of 36. Each frame you're holding right it will go to the next speed value in that list.

The reason it does this is because SMW only ever decelerates or accelerates your speed, never sets it to a specific value, when handling your max speed. If you also look at the fraction of the speed, you can look frame by frame to see why it happens.

Code
36.0 - 36 >= 36, decrease by 1 = 35.0
35.0 - 35 < 36, increase by 1.5 = 36.5
36.5 - 36 >= 36, decrease by 1 = 35.5
35.5 - 35 < 36, increase by 1.5 = 37.0
37.0 - 37 >= 36, decrease by 1 = 36.0


This patch will make it so the acceleration code only brings you up to exactly equal the maximum speed of 36 (then it will stay at 36), and the deceleration code (decreasing the speed by 1 every frame you hold right) only ever runs if something else put your speed over the maximum.
Posted by: tjb0607 - | Link
AnasMario130
So oscillation is basically a gradual change in a physical quantity instead of an immediate one, particularly in this context? I can see that in the GIFs.
Posted by: AnasMario130 - | Link
tjb0607
Originally posted by HammerBrother
Woah there, not to be confused with this patch. The oscillating speed only applies if you are on ground running full speed and holding left/right. My version only fixes this if you set !GroundDecel to 0. Nintendo shouldn't decelerate the player if going above max speed, rather to clamp it or not touch $7B at all.

This patch also checks if the player's X speed is greater than max would clamp it, this is a problem if you have horizontal boost blocks (it actually runs every frame). A good way to fix this is instead of clamping the X speed, simply avoid accelerating the speed and don't touch $7B at all. However, you do apply the clamp on the acceleration code itself (so that your X speed is always stopped at max and not have the x speed value stopped at values beyond that max):



Also, note that both patches hijack $00D742.


This patch is for people who only specifically want speed oscillation completely removed, while keeping the rest of vanilla functionality, e.g. where you're slowed down if you try to accelerate while you're over your max speed. Your patch causes a much greater change to the phyics, causing an even more extreme desync in the title screen demo (mario doesn't even get close to jumping on yoshi, vs mine where he still mounts yoshi). For example, with your patch, if you let go of run in the air while holding right, you don't slow down to walking speed until you reach the ground (or at all, with !GroundDecel 0). Also, your patch does leave a slight bit of speed oscillation while on the ground (depending on settings), while this one doesn't.

This patch doesn't clamp the X speed if it's greater than max, it only jumps to the vanilla routine for deceleration (just like the vanilla code). Otherwise, just like vanilla, if you aren't holding anything on the dpad, your speed locks in place.

To make sure it plays and feels the same, I played through all of Kaizo Kindergarten any% with this patch applied.
Posted by: tjb0607 - | Link
HammerBrother
Woah there, not to be confused with this patch. The oscillating speed only applies if you are on ground running full speed and holding left/right. My version only fixes this if you set !GroundDecel to 0. Nintendo shouldn't decelerate the player if going above max speed, rather to clamp it or not touch $7B at all.

This patch also checks if the player's X speed is greater than max would clamp it, this is a problem if you have horizontal boost blocks (it actually runs every frame). A good way to fix this is instead of clamping the X speed, simply avoid accelerating the speed and don't touch $7B at all. However, you do apply the clamp on the acceleration code itself (so that your X speed is always stopped at max and not have the x speed value stopped at values beyond that max):



Also, note that both patches hijack $00D742.
Posted by: HammerBrother - | Link

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy