PeglinMaxSpeed
Fixes the physics collision bugs at 3x speed and offers 1x, 2x, 3x, 5x, 6x, 10x and 15x speeds, cycled with one key.
| Date uploaded | a week ago |
| Version | 1.2.0 |
| Download link | PierreMarais-PeglinMaxSpeed-1.2.0.zip |
| Downloads | 45 |
| Dependency string | PierreMarais-PeglinMaxSpeed-1.2.0 |
This mod requires the following mods to function
BepInEx-BepInExPack_Peglin
BepInEx pack for Peglin. Preconfigured and ready to go.
Preferred version: 5.4.2100README
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, 6x, 10x and 15x. The game's own 1.5x is dropped, and 5x, 6x, 10x and 15x take its place 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 → 10x → 15x → back to 1x. From 1x the cycle starts at the slowest offered speed (2x with the default list), 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.
- How fast a speed really runs depends on your framerate. Peglin lets one frame cover at most 0.1 seconds of game time, so the fastest a speed can play is about 0.1 × your frames per second: 6x at 60 fps, 10x at 100 fps, 15x at 150 fps. A speed above that still runs, it just plays at the speed your framerate allows. Vsync and your monitor's refresh rate set that framerate, so a 60 Hz screen with vsync on tops out at 6x whatever speed is chosen. When a speed falls short, the mod writes the speed actually reached to the log.
- A fast speed costs performance on busy maps. Speeding up runs more physics steps every second (50 at 1x, 750 at 15x), so the fastest speeds are the hardest on the CPU. When the framerate drops, the reachable speed drops with it, so a lower speed can play 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.
- Explains what limits a speed. The line under Speedup Amount names the limit and what it costs: speed is capped by your framerate (6x needs 60 fps, 10x needs 100 fps, 15x needs 150 fps). Higher speeds can cause game slowdowns; for example, 10x will run at 6x if your device cannot handle the speed up amount. It takes the place of the game's 3x speed warning while
FixPhysicsandHideSpeedWarningare both on. - Speedup Controls sits under Speedup Amount, next to the speed it applies to.
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,10,15 | Speeds offered in the menu and by the speedup key, up to 15. 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 | Replace the game's 3x warning with the line explaining that speed is limited by the framerate |
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.
- Upgrading from 1.0.0: an existing config keeps
Speeds = 2,3,5,6, so 10x and 15x only appear once you add them: setSpeeds = 2,3,5,6,10,15inBepInEx/config/PeglinMaxSpeed.cfgand restart the game.
Known limitations
- A speed plays at about 0.1 × your framerate at most: 6x needs a steady 60 fps, 10x 100 fps and 15x 150 fps. Below that a speed plays a little slower than chosen (6x plays at about 5x at 50 fps, 15x at about 12x at 120 fps). Nothing breaks, and the mod writes the speed actually reached to the log.
- If 1.5x was your saved speed, the mod switches it to 2x.
- A saved speed that isn't in the
Speedssetting moves to the nearest one offered, and the game saves that as your new Speedup Amount. Removing 10x or 15x from the setting therefore changes a saved 10x or 15x to 6x. - 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 a speed above 3x is selected, the game keeps using it until you pick another speed in the options menu. The game's menu shows its own speeds (1.5x as the first option) meanwhile.
- 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
Speedslist, so add10,15to 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.