PeglinMaxSpeed
Fixes the physics collision bugs at 3x speed and offers 1x, 2x, 3x, 5x and 6x speeds, cycled with one key.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:
- Install BepInExPack_Peglin.
- Put
PeglinMaxSpeed.dllinPeglin/BepInEx/plugins/. - 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
FixPhysicson, 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.
