mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
No description
6658a46b2e
Fixes #402 (Violet appearing 1 frame after the Ship teleporter room appears). The root cause of this bug is due to the game loop order changes made with the over-30-FPS patch. 2.2's game loop order was gameinput(), gamerender(), then gamelogic(). In 2.3, gamerender() was moved to the end as it required special code to render more than 30 frames a second. So 2.3's game loop order is gameinput(), gamelogic(), then gamerender(). In hindsight, I could have preserved the game loop order, but this would require some more complex code in the game loop than what is there currently. Fixing it now would fix rendering glitches such as this one (along with being able to remove script.dontrunnextframe with the two-frame-delay fix), but it could also introduce new rendering glitches we don't yet know about. After discussing this in Discord DMs with flibit, we agreed that the game loop order should be fixed in 2.4 instead. When the game teleports you, gamelogic() runs script.teleport(). This function will gotoroom to the teleporter destination, then it loads the teleport script. Some teleport scripts (such as levelonecomplete, which creates Violet) expect that their entities will be created, and more generally that their script will be ran, on the same frame that the gotoroom happens, i.e. by the time that the next gamerender() happens, i.e. script.run() should be ran before the next gamerender() happens. This would be true on the old game loop order, but with the new game loop order, gamerender() gets ran directly after gamelogic() with no script.run() in between. To fix this, I did the same thing I did with the two-frame-delay fix (#317), where I ran the script for that frame, but in order to prevent running it twice I set script.dontrunnextframe to true. |
||
---|---|---|
.github | ||
desktop_version | ||
mobile_version | ||
third_party | ||
tools | ||
.gitattributes | ||
License exceptions.md | ||
LICENSE.md | ||
README.md |
This is the source code to VVVVVV, version 2.0+. For more context about this release, see the announcement on Terry's blog!
License
VVVVVV's source code is made available under a custom license. See LICENSE.md for more details.
In general, if you're interested in creating something that falls outside the license terms, get in touch with Terry and we'll talk about it!
Authors
- Created by Terry Cavanagh
- Room Names by Bennett Foddy
- Music by Magnus Pålsson
- Metal Soundtrack by FamilyJules
- 2.0 Update (C++ Port) by Simon Roth
- 2.2 Update (SDL2/PhysicsFS/Steamworks port) by Ethan Lee
- Beta Testing by Sam Kaplan and Pauli Kohberger
- Ending Picture by Pauli Kohberger
Versions
There are two versions of the VVVVVV source code available - the desktop version (based on the C++ port, and currently live on Steam), and the mobile version (based on a fork of the original flash source code, and currently live on iOS and Android).