8 ms·
VVVVVV Source Code
- rafram 1y agoAwesome game. Good to see the code is authentically bad for an indie game of that era.
- oofabz 1y agoAuthentically bad is a good way to put it. My favorite part is the 3300 line Game::updatestate() function and its gigantic switch statement.
- alt227 1y ago> case 4099: lol! Also I like that every function starts with: >jumpheld = true;
- matheusmoreira 1y agoI think it's pretty charming. Games have so much abstraction these days it feels like there's no way to truly understand what it is they're even doing. One can spend months agonizing over the true nature of things and how ideas and concepts relate to each other and eventually distill it all into some object oriented organization that implements not just your game but all possible games. One can also just cycle the game's state machine in a big function, haha switch statement go brrr. Reminds me of the old NES games which would statically allocate memory for game objects, very much in the "structure of arrays" style, they too had game logic just like that. Also reminds me of old electromechanical pinball machines. You can literally see the machine cycle. https://youtu.be/ue-1JoJQaEg https://youtu.be/ue-1JoJQaEg https://youtu.be/E3p_Cv32tEo https://youtu.be/E3p_Cv32tEo
- oneeyedpigeon 1y agoHoly... all wrapped in an if statement too!
- valtism 1y agoIt was originally written in flash, then ported to C++ which would explain some (not all) of the badness.
- tomgp 1y agoI find the code genuinely inspiring. A lesson that being precious about code quality is not always the best way forward.
- endemic 1y agoYeah, code is a means to an end.
- neuroelectron 1y agoThere's nothing wrong with this code. It's called loop unrolling and it keeps the game performant.
- rafram 1y agoHah. Unroll your loops manually to give the compiler a break!
- neuroelectron 1y agoExceelnt sgugstion
- neonsunset 1y agoWas very confusing to see C++ and ActionScript until I realized this is VVVVVV and clearly not VVVV!
- zahlman 1y agoI was confused trying to figure out how they would interoperate, or be useful in the same project. Turns out the desktop version is in C++ and the mobile version is in ActionScript. I assume there were good reasons for this.
- phire 1y agoThe names are kind of misleading, as there appear to be both iOS and android ports of the "desktop version". I'm not sure which version you actually get if you buy the game on iOS/Android. The original desktop release in 2010 was based on flash (presumably using Adobe Air for desktop? There was also a flash web demo), but there were issues, and flash was really hard to port to linux. So they rewrote the entire game in c++ in 2011, for easier porting. It's that rewrite that is what's labeled as "desktop version". It's the most up-to-date and polished version. The "mobile version" is a fork of the original 1.0 flash code base, and IMO it's only really interesting because it's much closer to what Terry originally wrote.
- peterldowns 1y agoIncredibly fun game, I'm not a huge gamer but I remember buying the Humble Bundle just to get this. One of the few games that I've spent the time to finish. Awesome work, Terry, and thank you for the great times! btw also fuck you for veni vidi vici, jeez that took me a while! https://www.youtube.com/watch?v=4CtiY5D6HCs https://www.youtube.com/watch?v=4CtiY5D6HCs
- levodelellis 1y agoThat took me a long time too. It was rewarding tho
- gsliepen 1y agoHe apologized, didn't he? There was a screen named "I'm sorry" :P
- alterom 1y agoI'm ashamed to say that, as much as I appreciate the wonderful game, I gave up :)
- Gazoche 1y agoI remember buying the bundle and thinking "I'll just play that lightweight 2D platformer while waiting for the bigger, more interesting games in the bundle to download"...and then spending the entire evening on it.
- h2zizzle 1y agoI finally got it after a good few hundred tries, iirc. Prep for having the patience to finish Final Fantasy XV's Pitioss dungeon. My boyfriend at the time (who'd bought VVVVVV for me), on the other hand, was attempting a no-death-all-trinket run. I could never understand just how damn good he was at gaming. Oh, and PPPPPP (the soundtrack) remains a staple. Especially the associated osu! Stream tracks.
- theandrewbailey 1y agoI bought the first Humble Bundles. VVVVVV has been sitting around in my Steam library ever since. Guess I'll get around to playing it now.
- woleium 1y agotangentially related, great to see https://www.iiiiiiii.com/ https://www.iiiiiiii.com/ is still going
- phanimahesh 1y agoWhat's it supposed to be
- woleium 1y agoturn up your volume.
- dang 1y agoRelated. Others? Is opening up your source code worth it? Terry Cavanagh thinks it was for VVVVVV - https://news.ycombinator.com/item?id=25727963 https://news.ycombinator.com/item?id=25727963 - Jan 2021 (16 comments) Many games are held together by duct tape - https://news.ycombinator.com/item?id=22043156 https://news.ycombinator.com/item?id=22043156 - Jan 2020 (154 comments) VVVVVV Source Code Released - https://news.ycombinator.com/item?id=22011465 https://news.ycombinator.com/item?id=22011465 - Jan 2020 (1 comment) VVVVVV’s source code is now public, 10 year anniversary jam happening now - https://news.ycombinator.com/item?id=22011358 https://news.ycombinator.com/item?id=22011358 - Jan 2020 (223 comments) VVVVVV 60% Off On The Mac App Store This Weekend - https://news.ycombinator.com/item?id=2347676 https://news.ycombinator.com/item?id=2347676 - March 2011 (1 comment)
- TZubiri 1y agoLoved the game, sweet and short. It's one of those twists that reward programmers that can think outside of the box and execute instead of downloading some generic libraries and making yet another platformer.
- zem 1y agoI don't know about short, some of those screens took forever to beat! (and I finally hit one I just couldn't and abandoned the game, but it was indeed fun up to then)
- accrual 1y agoNo way, this is very cool! I loved playing through VVVVVV. The first level music still lives and plays in my head from time to time.
- Centigonal 1y agoI remember when a certain someone on an irc channel shared the vvvvvv flash demo with me and some others. That game, that period of time, the early Humble Bundles -- all of that was pretty formative for me. Crazy to think that was almost 15 years ago.
- Ros2 1y agoI think it was a beta and not a demo but either way, it contained 95% of the game not obfuscated in any way. So I saw the ActionScript code quite a while ago!
- jmmv 1y agoI’ll take the chance to reference Super Hexagon by the same author. Incredibly fun and addictive game as well while being super simple. I recall reading somewhere that the author spent only a day or so writing it. And PPPPPP, the soundtrack for VVVVVV, is neat too!
- rubslopes 1y agoSuper Hexagon is my all-time favorite mobile game. I bought it in 2017 and I still play it to this day. I say it's the only game quick enough that you can have fun during an elevator ride.
- symmetricsaurus 1y agoSecond this recommendation! It’s a super fun game to learn. It looks impossible to start out but then your brain adapts. It’s like seeing through the matrix.
- addandsubtract 1y agoWhile on the subject of games from the same author, Dicey Dungeons is an incredible fun game. Similar to a deck building rogue like, but instead of cards, you have dices. There are like six unique characters, multiple challenges per character, the rules keep changing (forcing you to rethink the game), and the game is filled with lots of humor. There's also free DLC and mod content, which I haven't even got to.
- oneeyedpigeon 1y agoThat game definitely doesn't get the respect it deserves! It's basically the giant on whose shoulders Balatro stood. Without being the giant :(
- WickyNilliams 1y agoLove this game. There's also some interesting write ups from the dev about the process. I really enjoyed (despite not being a game dev) this article on how the enemy AI works. https://www.gamedeveloper.com/design/how-enemy-ai-works-in-dicey-dungeons https://www.gamedeveloper.com/design/how-enemy-ai-works-in-d...
- gallerdude 1y agoWhen I was near the end of high school, my family visited London, and I was thinking about being a game dev. So I sent Terry Cavanagh an email, and to my surprise he completely agreed to get lunch. He was extremely kind, gave me a lot of interesting life advice. I remember him saying that he got most of his ideas just from playing around with mechanics and experimenting a lot, he was never really one to get grand visions. Anyways, great fellow, glad he opened source V (as he called it).
- unwind 1y agoWow, that is cool! Did it help/affect your later choices with your career, did you end up a game developer, or at least try it or so? Always fun with closure! :)
- gallerdude 1y agoI made a very mediocre platformer in my senior year of high school, published on itch.io. I ended up becoming a software developer, which I enjoy 80% as much, but without any burnout or worrying about the superstar economics of being a game dev. Once the singularity hits, maybe I'll make more games. https://gallerdude.itch.io/the-journey-east-full https://gallerdude.itch.io/the-journey-east-full
- deleted 1y ago[deleted]
- Daub 1y ago> I remember him saying that he got most of his ideas just from playing around with mechanics and experimenting a lot This is important. Too many people assume that novel ideas come from abstract concepts. Yes they can, but they can equaly arise from playing with the medium.
- nonethewiser 1y agoKinda easy to imagine the opposite as well... having some idea and then implementing it and feeling unsatisfied. Especially a game. It may check all the boxes thematically and have the required features but just not feel fun. Not to say starting with a firm idea is bad... more like it may be hard to avoid playing around and improvising with the medium in any case.
- lazycouchpotato 1y agoIf you liked VVVVVV, I suggest trying LOVE. https://store.steampowered.com/app/269270/LOVE/ https://store.steampowered.com/app/269270/LOVE/
- moralestapia 1y agoWow, this is great, I really enjoyed this game when it came out, what a pleasant surprise to see it was open sourced, truly a work of art.
- grep_it 1y agoThere was a period of time in my life where I had recently moved to California from Canada and I was desperate for a job. I got a job doing door-to-door sales for Comcast. I hated it. I often sat in my car playing VVVVVV on my phone while shirking my responsibilities. Thank you Terry, for the reprieve.
- kleiba 1y agoYou can play a demo of VVVVVVV in your web browser here: https://www.kongregate.com/games/TerryCavanagh/vvvvvv-demo https://www.kongregate.com/games/TerryCavanagh/vvvvvv-demo
- cess11 1y agoAt first I thought it would be some kind of successor to https://vvvv.org/ https://vvvv.org/, which I hadn't looked at in years. The game looks fun, might give it a spin.
- kristoff_it 1y agoWe have it packaged for Zig, just run `zig build` and you can play the game on Linux, macOS and Windows. https://github.com/allyourcodebase/VVVVVV https://github.com/allyourcodebase/VVVVVV
- babuskov 1y agoVVVVVV is very simple game but exceptionally well made. Tight controls coupled with interesting level layouts made it both a puzzle to solve (how to do a section) and then required dexterity to execute it. And music in this game is top tier. I remember getting it in a bundle which I bought for some other game, and VVVVVV turned out to be my favorite.
- oneeyedpigeon 1y agoLooks like the game itself has one of the finest domains you'll come across: https://thelettervsixtim.es/ https://thelettervsixtim.es/
- gitroom 1y agobeen cool seeing how much small games like this stick in my head years later honestly. you think chasing clean code slows down the creative part or helps it?
- damnitbuilds 1y agoHe confesses to declaring i,j,k in every class so he didn't have to declare them in functions where he used them ( and (not surprisingly) that caused some nasty, difficult bugs ). Amazing that he ever made a decent game out of code like that!
- mystified5016 1y agoPretty much every game has all sorts of horrible nasty hacks. Admittedly, this is one of the worst I've seen.
- senand 1y agoQuote from https://distractionware.com/blog/2020/01/vvvvvv-is-now-open-source/ https://distractionware.com/blog/2020/01/vvvvvv-is-now-open-..., linked in the article: --- snip --- 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. 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). This led to some nasty and difficult to track down bugs, to say the least. In entity collision in particular, several functions will share the same i variable. Infinite loops are possible. --- snip --- This sounds so bad, and confirms my prejudice that gaming code is terrible.
- nashashmi 1y agoThis sounds great and confirms my suspicions that gaming coders learn more than standard coders do.
- hombre_fatal 1y agoThat just boils down to the trivial claim that building harder things teaches you more than building simpler things. Games are one of the hardest things you can build since they have end to end complexity unlike most projects that can be cleanly decomposed into subsystems.
- naikrovek 1y agothis is the correct takeaway, in my opinion. game developers must consider things that people like enterprise developers never concern themselves with, like latency and performance. these days, at least where I work, everything is dominated by network latency. no matter what you do in your application logic, network latency will always dominate response time. with games, there is no latency unless you are writing a multiplayer server, and there are many ways to solve that, some better than others. playing a single player factorio game, having huge factories on five planets, robots flying around doing things for you, dozens of ships flying between planets destroying asteroids and picking up the rocks they leave behind, hundreds of thousands of inserters picking up items and putting them onto or removing them from conveyor belts, and updating the status of everything in real time at 60 frames a second kinda hints at what computers can do today if you keep performance a primary concern. corporate developers never have to think about anything even approaching this. i'm convinced that 2-4 experienced game developers could replace at least 20 traditional business software developers at any business in the US, and probably 50 enterprise software developers anywhere. They aren't 5x-10x as expensive, either. Experienced game developers simply operate on another level than most of us.
- hbn 1y agovoid Graphics::print_level_creator(...) { /* We now display a face instead of "by {author}" for several reasons: * - "by" may be in a different language than the author and look weird ("por various people") * - "by" will be longer in different languages and break the limit that levels assume * - "by" and author may need mutually incompatible fonts, e.g. Japanese level in Korean VVVVVV * - avoids likely grammar problems: male/female difference, name inflection in user-written text... * - it makes sense to make it a face * - if anyone is sad about this decision, the happy face will cheer them up anyway :D */ Hard to argue with that
- kentonv 1y agoVVVVVV is a superb demonstration that graphics don't make a game -- music does.
- sph 1y agoI recently saw a video review of VVVVVV, I was mildly interested, then the music came in, and it was an instant buy. Also the quote by Terry Cavanagh when asked if in retrospect there is anything he would change about the game: “I would change nothing.” Finished a few days ago, great game, great music.
- RankingMember 1y agoI love the Hotline Miami series, but there's no way I'd love it nearly as much without that absolutely killer soundtrack.
- AnthonBerg 1y agoAgreed! Nonetheless, VVVVVV’s graphics are exquisitely done, and, well, perfect? The graphical limitations – the technical underpinnings of the style? – those are a decision, and the result is… exactly what it should be. (Hard to get into words! Came out kinda pretentious? *shrug*)
- throw4847285 1y agoCavanagh is one of my biggest indie game heroes. He's done it all, from weirdo experiments, satirical exercises, addicting arcade games, and games with surprising depth. It just shows that when you have a really good grasp of the medium, there's no reason to be limited by genre. A great game is a great game.
- badc0ffee 1y agoI always felt that VVVVVV had c64-esque (or at least C64-inspired) graphics and music. I found out there's an actual C64 port of it: https://youtu.be/aY-OE5HPLv4 https://youtu.be/aY-OE5HPLv4
- lagniappe 1y agoEvery time this is brought up, I think of https://vvvv.org/ https://vvvv.org/
- relaxing 1y agoWas expecting the creative coding environment as well.
- pier25 1y agoOh man it's been so many years since I've read some AS3 code. I'm still pissed they abandoned the EcmaScript 4 proposal back around 2007-2008.
- theyinwhy 1y agoSuch a great gesture for one of the best platformers ever released.
- lproven 1y agoCould anyone explain for a non-gamer what this is? I gather it's a game, it's graphically simple but in fact is really hard, and it was a commercial success early on (due to a Humble Bundle?) -- but I haven't really played games since the ZX Spectrum was new. Never heard of it, or the developer, and I have no idea what people are/were excited about. (For other ZX Spectrum era folks: it sounds like a harder "Manic Miner" and I hated that.)