You are viewing a potentially older version of this package. View all versions.
PierreMarais-PeglinMaxSpeed-1.0.0 icon

PeglinMaxSpeed

Fixes the physics collision bugs at 3x speed and offers 1x, 2x, 3x, 5x and 6x speeds, cycled with one key.

Date uploaded 2 weeks ago
Version 1.0.0
Download link PierreMarais-PeglinMaxSpeed-1.0.0.zip
Downloads 35
Dependency string PierreMarais-PeglinMaxSpeed-1.0.0

This mod requires the following mods to function

BepInEx-BepInExPack_Peglin-5.4.2100 icon
BepInEx-BepInExPack_Peglin

BepInEx pack for Peglin. Preconfigured and ready to go.

Preferred version: 5.4.2100

README

PeglinMaxSpeed

Play Peglin fast without orbs clipping through pegs.

Features

  • Fixes the 3x speed physics bugs. Peglin warns that 3x speed "may cause occasional bugs with physics collisions". This mod fixes the causes, so fast speeds play like normal speed.
  • Speeds: 1x, 2x, 3x, 5x and 6x. The game's 1.5x is replaced by 5x and 6x, in Options > Speedup Amount and on the speedup key.
  • Cycle speeds with one key. Each press of the speedup key (or a click on the speed button) moves to the next speed: 1x → 2x → 3x → 5x → 6x → back to 1x. From 1x the cycle always starts at 2x, whatever is set in Options. The speed you land on is saved as your Speedup Amount, just like picking it in the options menu. This works when Speedup Controls is set to toggle; in hold mode the key works as normal. Cutscenes that turn speedup off, like the Act 4 boss's, still put you back at your speed afterwards.
  • Why stop at 6x? Peglin limits how much game time one frame can cover (0.1 seconds). At 60 fps that works out to 6x, so a 7x or 10x option would still play at 6x.
  • If 6x slows your FPS down on certain maps, play at a lower speed. Below 60 fps, 6x can't reach full speed anyway, so a lower speed plays just as fast and smoother.
  • Runs start at your speed. Starting a new run or continuing one keeps you sped up if you were sped up when you left, even after restarting the game. Peglin means to do this, but a bug makes every run start at 1x.
  • No more speed warning in the options menu while the fix is on.

What was wrong

Speeding up makes the game run several physics steps for every frame drawn (about 3 at 3x, 6 at 6x). A few of Peglin's collision rules only ran once per frame, so when sped up they fell behind the orb:

  • Orb speed cap. Orbs could go faster than the game's speed limit between frames and clip through pegs and walls.
  • Ghost orbs (and other orbs that pass through pegs on the way up or down) switched between passing through and bouncing late. They went through pegs they should hit, or the other way round, and didn't follow the aiming line.
  • Dull pegs could use an out-of-date "last peg hit" and count or ignore hits wrongly.

Some pegs also change on a timer, and the game checked those timers once per frame, so when sped up they acted several physics steps late:

  • Long pegs stayed solid a little too long after being hit, so orbs could bounce off them again.
  • Slime-only pegs turned their colliders back on late after popping.
  • Flickering pegs turned solid or see-through on different steps depending on speed.
  • New bombs (from a peg turning into a bomb mid-shot) finished setting up their relic effects late.

The mod runs all of these on every physics step instead, so an orb follows the same path at every speed. At 1x this matches the game's own behaviour to within one physics step (1/50 of a second).

Installation

With a mod manager (recommended): install PeglinMaxSpeed from Thunderstore with r2modman or the Thunderstore Mod Manager. BepInEx is installed for you.

Manually:

  1. Install BepInExPack_Peglin.
  2. Put PeglinMaxSpeed.dll in Peglin/BepInEx/plugins/.
  3. Start the game once to create the config file.

Settings

Change these in BepInEx/config/PeglinMaxSpeed.cfg (start the game once to create it). Restart the game after changing them.

Setting Default What it does
FixPhysics true Fix the collision bugs at high speeds
Speeds 2,3,5,6 Speeds offered in the menu and by the speedup key, up to 6. 1x is always available. Leave empty for the game's own (1.5, 2, 3)
CycleSpeeds true The speedup key steps through every speed. false gives the game's normal on/off toggle
RememberSpeedup true Start each run sped up if you were sped up when you left
HideSpeedWarning true Hide the game's 3x warning while FixPhysics is on
EnableLogging true Write details to BepInEx/LogOutput.log

Compatibility

  • Built for Peglin v2.0.12. On other versions the mod writes a warning to the log, as some features may not work.
  • Requires BepInExPack_Peglin.
  • Works alongside PeglinRelicRerolls.

Known limitations

  • Below 60 fps the new speeds play a little slower than chosen (for example, 6x plays at about 5x at 50 fps). Nothing breaks.
  • If 1.5x was your saved speed, the mod switches it to 2x.
  • With FixPhysics on, flickering pegs fade 50 times a second, so on a high refresh rate screen the fade can look slightly less smooth.
  • If you uninstall the mod while 5x or 6x is selected, the game keeps using that speed until you pick another one in the options menu.
  • English only.

CHANGELOG

Changelog

1.2.0

  • The Options menu's Speedup Amount row explains the framerate limit in the line under it: speed is capped by your framerate, with the fps each of the top speeds needs; higher speeds can cause game slowdowns; and 10x runs at 6x when the device cannot handle the speed up amount. It replaces the game's 3x speed warning.
  • Speedup Controls now sits directly below the Speedup Amount row.
  • Upgrading from 1.0.0: an existing config keeps its old Speeds list, so add 10,15 to it (or delete the line) to get the new speeds.

1.1.0

  • Speeds up to 15x: the default list is 2x, 3x, 5x, 6x, 10x and 15x, and the speedup key cycles through all of them. How fast a speed really plays depends on the framerate (about 0.1 x fps), because the game lets one frame cover at most 0.1 seconds of game time.
  • Writes the speed actually reached to the log when the framerate is too low for the chosen speed to play at full speed.

1.0.0

  • First release: fixes the collision bugs at 3x speed and faster (orb speed cap, ghost orbs, dull pegs, and long, slime-only, flickering and bomb peg timers), offers 1x, 2x, 3x, 5x and 6x speeds, makes the speedup key cycle through them, starts each run at the speed you left at, and hides the 3x speed warning.