![]() This is just kind of how it worked when making a flash game in 2009 – accessing external data assets is hard to do, so it just made sense at the time to compile that into the game instead. ![]() All the actual levels in the game are hardcoded in huge arrays that I generated with my own map editor, which exports the levels in source code that I could read in.There’s a lot of copy and pasting going on here. Every state in the game is packed into these three files, under functions called things like “ teleporterrender” and “ towerlogic“. Most of the critical game code is in three files – p, logic.cpp, and the incorrectly named titlerender.cpp. Somewhere along the road, I picked up that it was a good habit to separate your code into input, logic and render, and boy did I take that to heart.Fun fact: modders reverse engineered this “ internal scripting” years later to do amazing things with custom levels that I didn’t even know were possible. These functions basically load data into a very simple script parser that controls cutscene logic. If you’re looking for the game’s text, that’s mainly (but not entirely) in the Scripts.cpp and TerminalScripts.cpp classes.In entity collision in particular, several functions will share the same i variable. This led to some nasty and difficult to track down bugs, to say the least. For example, maybe my worst programming habit is declaring temporary variables like i, j and k as members of each class, so that I didn’t have to declare them inside functions (which is annoying to do in flash for boring reasons). There’s a lot of weird stuff in the C++ version that only really makes sense when you remember that this was made in flash first, and directly ported, warts and all.Some possibly interesting notes/explanations of why things are they way they are: I think even a peek of the source code will quickly reveal that VVVVVV is not a technically sophisticated game! Even by the standards of self taught indie devs, it’s kind of a mess. ![]() ![]() So, I think a fair question to ask here is: “What’s interesting about the VVVVVV source code?”. I wanna give a big big thank you to Ethan Lee, who helped a lot to prepare for this, including getting the repo ready for the public, and organising the reveal on AGDQ (hi speedrunners!)! Thanks Ethan! The repo contains two versions – the desktop version, ported to C++ by Simon Roth in 2011, and later updated and maintained by Ethan Lee – and the mobile version, written in Actionscript for Adobe AIR, based on the original v1.0 flash version of the game. I wanted to do something special to mark the occasion: so, as of today, I’m releasing the game’s source code! VVVVVV is such an important game to me, I barely even know where to start. But I’ve always gone by “ it’s not tomorrow until you wake up” rules, so I still think of January the 10th as the real launch day <3 Or possibly tomorrow is, depending on who you ask – technically, the game first went live at 3am GMT on the 11th January 2010, after a very, very long day of fixing every last bug I could, making last minute builds, and trying to slowly upload everything on an extremely unreliable internet connection that kept cutting out. Today is the 10th anniversary of VVVVVV’s release!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |