mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
No description
09e15db878
There's a bug in the cutscene that plays if your companion is Vitellary in the room "Now Stay Close To Me...". The relevant gamestate is gamestate 43, which for Vitellary calls the script `int1yellow_4`. When Vitellary says the text box "That big... C thing! I wonder what it does?", Terry intended for Vitellary to change his facing direction to the left, as you can see with the command `changedir(yellow,0)` in the original scripting. `changedir()` just changes the `dir` attribute of an entity, and a `dir` of 0 means face left and a `dir` of 1 means face right. Then when Vitellary says "Maybe we should take it back to the ship to study it?", Terry intended for him to face rightwards once again, as indicated by the `changedir(yellow,1)` command. Unfortunately, what happens instead is that when Vitellary says the first text box ("That big... C thing! I wonder what it does?"), he turns left for precisely one frame, and then afterwards goes back to facing right. Then the second text box comes around, but he's already facing right. How come? Well, the problem here is that Vitellary's AI for "follow Viridian" is overriding his `dir` attribute. Vitellary's AI says "get close to Viridian", but Vitellary is already close enough to them that he stays put. However, he still turns to face them as part of that AI. To fix that, we need to put him in the AI mode that specifically says to face left, with the command `changeai(yellow,faceleft)`. That way, he no longer has the AI mode of following Viridian, and he will actually look left for the intended duration instead of only looking left for one frame. But then we have another problem. When the cutscene ends, Vitellary no longer follows Viridian. I mean it makes sense - we just placed him in "only face left" mode, not "follow Viridian" mode! And this is not merely a visual problem, because Vitellary is a supercrewmate and the game won't let the player walk off the screen if Vitellary isn't offscreen yet. To fix THAT issue, we'll need to put Vitellary back in "follow Viridian" mode. It turns out that the `changeai()` command was more intended for scripting crewmates (entity type 12), NOT supercrewmates (entity type 14). As such, the command assumes that you'll want state numbers that apply to entity type 12, such as 10, 11, 12, 13, and 14, even though the only one that applies to entity type 14 is state 0, and every other state number just makes it so that the entity doesn't move an inch. And specifying faceleft/faceright is just state number 17. Luckily, we can still pass the raw state number to `changeai()`, we don't have to use its intended names. So I do a `changeai(yellow,0)` to set Vitellary's state number back to 0 when it comes time to make him face right again. As a bonus, I added comments to the changed lines. This is a semi-obtuse method of scripting, so it's always good to clarify. |
||
---|---|---|
.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).