* Load an unlimited amount of loose music Binary blobs can now store 128 tracks, and music can now be read from loose files. Unfortunately, the two cannot be used together -- loose music can still only use 16 tracks. This commit attempts to fix that, allowing for music playback by filename. * Rework music track loading The current "loose songs" system does not load files from custom assets. This is from the #412 PR, and is NOT the "extra loose songs" system that this PR implements, but they both work in the same area so I decided to squash both of these bugs at once (plus, it helped clean up the code and make a saner system, so...) This commit also allows "loose music" to override music stored in the `vvvvvvmusic.vvv` binary blob. When reading a blob, it will first check if a loose file exists at the current path it's trying to find a track at; if it exists, it will load that instead. If the blob does not exist, the system will try to locate all expected built-in tracks directly from the assets folder instead of doing that during blob loading. The `play` command has some safety removed due to an old exploit which needs to be kept -- `music(5b)` should play track 5. This is used in many levels and cannot be broken; unfortunately this means that we no longer get the nice error when a song fails to be played, but that's better than breaking a large amount of levels. This commit does NOT address loading a "extra" loose track overtop of a custom blob track, because with the current tooling, and the way it will most likely continue to work in the future, every single custom track in blobs have a completely empty path. If someone decides to modify their blob in a hex editor or makes their own tooling, this issue may show up again, but that is a problem which can and probably should be addressed at a later date. The required code to solve such a problem would be far more than what this PR should address, and for a situation so unlikely, it's easy enough to just avoid adding the same custom song twice, one in a music file, and one loose, because if you're making a level, you're probably going to use one or the other. * Fix mentioned issues from review
How to Build
VVVVVV's official desktop versions are built with the following environments:
- Windows: Visual Studio 2010
- macOS: Xcode CLT, currently targeting 10.9 SDK
- GNU/Linux: CentOS 7
The engine depends solely on SDL2 2.24.0+. All other dependencies are statically linked into the engine. The development libraries for Windows can be downloaded from SDL's website, Linux developers can find the dev libraries from their respective repositories, and macOS developers should compile and install from source. (If you're on Ubuntu and your Ubuntu is too old to have this SDL version, then see here for workarounds.)
Since VVVVVV 2.4, git submodules are used for the
third party libraries.
After cloning, run git submodule update --init to set all of these up.
You can also use this command whenever the submodules need to be updated.
Steamworks support is included and the DLL is loaded dynamically, you do not need the SDK headers and there is no special Steam or non-Steam version. The current implementation has been tested with Steamworks SDK v1.46.
To build the Make and Play edition of the game, uncomment #define MAKEANDPLAY
in MakeAndPlay.h.
To generate the projects on Windows:
# Put your SDL2 folders somewhere nice!
mkdir build
cd build
cmake -A Win32 -G "Visual Studio 10 2010" .. -DSDL2_INCLUDE_DIRS="C:\SDL2-2.24.0\include" -DSDL2_LIBRARIES="C:\SDL2-2.24.0\lib\x86\SDL2;C:\SDL2-2.24.0\lib\x86\SDL2main"
Then to compile the game, open the solution and click Build.
For more detailed information and troubleshooting, see the Compiling VVVVVV Guide on the Viki.
To generate everywhere else:
mkdir build
cd build
cmake ..
Then to compile the game, type make.
Including data.zip
You'll need the data.zip file from VVVVVV to actually run the game! You can grab it from your copy of the game, or you can just download it for free from the Make and Play page. Put this file next to your executable and the game should run.
This is intended for personal use only - our license doesn't allow you to actually distribute this data.zip file with your own forks without getting permission from us first. See LICENSE.md for more details.