mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
No description
b8553107ff
It's quite rare, though possible, that during finalstretch you could see a glitchy tileset that looked like this: https://i.imgur.com/V7cYKDW.png This happened because final_mapcol, the variable that controls which color of finalstretch is rendered, could end up being 7. Normally, it's in the range of 1..6, which perfectly correlates with the Warp Zone tilesets in tiles2.png, and the higher the number the farther back in the tileset it goes from the gray Warp Zone tileset. However, if it's 7, then it'll start grabbing tiles from the Ship plus some unused blank tiles, which does not look pretty in the slightest. This happened because it's possible, though exceedingly unlikely, that fRandom(), a function which returns a float between 0..1, could return exactly 1. fRandom() calls rand(), which returns a result between 0 and RAND_MAX, and divides it by RAND_MAX. This value is implementation dependent, but required to be at least 32767, and on most systems is 2147483647. Even taking the value of 32767, that means there's a 0.003% chance that you could get this glitchy tileset when the game cycled the color in finalstretch. But of course, playing the game for long periods of time will eventually increase this chance - cycling the color 1,000 times (around 17 minutes of playing) will result in the chance being 3%. Then as the calculations in the finalstretch color cycling logic calls fRandom(), then multiplies by 6 and adds 1, it was possible for fRandom() to return exactly 1, then have 6 added to it, resulting in final_mapcol being 7. To fix this, just decrement the multiplication by fRandom() to multiply by 5 instead of 6. Now the only possible numbers that calculation can produce would be 1..6. |
||
---|---|---|
.github | ||
desktop_version | ||
mobile_version | ||
third_party | ||
tools | ||
.gitattributes | ||
.gitmodules | ||
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).