Couple of interesting things we can learn from Terry Cavanagh's VVVVVV

Terry Cavanagh (@terrycavanagh) released the sources of VVVVVV on Github

VVVVVV’s Source Code Is Now Public, 10 Year Anniversary Jam Happening Now!

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. 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

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.

and this made Hacker News front page, in the top 3 no less
here the HN comments


So yeah a couple of things to learn here …
nah in fact there are a gazillion things to learn, so early warning this gonna be a very long post :stuck_out_tongue:


Flash is Faster Than Anything Else

Yep you read that right

Flash is the fastest tool alive to do

  • fast iteration
  • feedback loop
  • rapid development
  • programming exploration
  • etc.

different people will have different name for that, but basically
it is about writing some visual code and having it shown on the screen almost right away and iterating over it, and over and over

the way you can mix visual design, animation and code in a fast iteration loop is something very special to Flash, it makes it a one-stop do it all tool, perfectly adapted to indie dev (and game dev) so they can do quick prototyping and have fun while doing it.

nothing comes close to that

not Unity, not HTML5, not Haxe, not Flutter, not Dart, not Swift, etc…

And yeah VVVVVV been developed like that

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.

I dunno, what can I say? I was young and more interested in getting something on the screen than implementing it properly. Maybe the best thing about VVVVVV’s source code is that is stands as proof of what you can hack together even if you’re not much of a programmer.

Looking back through it myself all these years later, I find it really funny how much of it is basically just the same parts copy and pasted over and over, with the values changed. This basically makes it impossible to read and maintain ten years later, but back when I was in the thick of it, it made it really fast to iterate and add new things. I’ve gained better habits over the past decade, and I’m definitely a better programmer now – but it does seem to take me longer to do things.

You can still do it that way today with Animate CC and Adobe AIR.


Product Before All

This part says a lot

I was young and more interested in getting something on the screen than implementing it properly.

so yeah, the code could be cleaner, more this or less that

many comments on HN and on twitter criticise a lot the code

but we have to be aware of the context, see that other post Stop And Reflect

Things were pretty bad for me just before IGF submissions last November – far worse than I’d let on at the time, in fact. Last year I’d basically given up my ambitions to be an indie game designer full time, because I’d run out of money. The only reason I was still making games was because I was unemployed, couldn’t find a job, and didn’t really have anything better to do.

The only thing I really had going for me was VVVVVV. It started out as just a small side project, but I was having so much fun with it that I just kept letting it get bigger and bigger. I figured it was probably going to be my last game as a full time indie, after all, and I wanted to make something I could be proud of.

and put that in perspective with Learning from Failures

the guy is running out of money, resources, he is about to give up, but … he did prototype it all in Flash, he keep working at it and fast, and then release it

sure it is a gamble, but Flash allowed him to not waste 3+ years on it, at the opposite it allowed him to finish it fast and put it out there

VVVVVV demo on Miniclip, VVVVVV online demo on thelettervsixtim.es , etc.

Nevertheless, despite my fumbling, things actually worked out! On the first day, I sold 312 copies of the game. By the end of January, I was up to close to 2000 copies! Not only had I made enough to get myself out of trouble and pay back what I owed, but I had enough to keep making games for the rest of the year. Things slowed down after that, but by the time I launched on Steam in September, I was up to 3000 . I don’t think I’m actually allowed to talk about my Steam sales figures, unfortunately, but it’s doing quite well there too.

back to to the original post

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. 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

see, that the code is clean and got a nice architecture does not really matters, because if it works and you can fix last minute bugs (how hard and messy that can be), you got a product you can show

it is with that kind of speed that Flash got your back

and you know what, once you got a v1.0 out of the way, you can still refactor, improve the code later, and even port a v2.0 with another programming language (C++)

because you got your proof of concept, v1.0, etc. that is already working right there

Flash is perfect to produce MVP: Minimum Viable Product

OK I hear you say “but we cannot publish on the web with Flash anymore”

Look at what has been done with VVVVVV

on online game portals like Miniclip, Kongregate, Armor Games, etc. it is a demo with only 2 full levels

so yeah OK you can not publish such demo with a SWF now to play inside the browser

but you can still produce a video so people can quickly watch the gameplay
and you can still produce your own desktop demo

and still put your demo on steam

and later publish your game on mobile

and the mobile version, written in Actionscript for Adobe AIR, based on the original v1.0 flash version of the game

you don’t need to wreck your head to shoehorn (shoehorse) fit it into the web,
you don’t need something special that will cross-compile it to something else,
you don’t need super duper architectured and clean code,
you don’t even need frameworks or libraries like Starling and other ANE,
etc.


Side Notes:
As a quick test I went on Miniclip to check the top games of the moment
and with what they were done:

  • Airport 3D clash: Unity
  • Emoji Glass: Phaser
  • Ducklings: Unity
  • Ninjuzi: Construct 2
  • Renegade Racing: Flash

Haters are Losers

So you have a guy who take upon himself to release the full sources code of his game in ActionScript and C++ and what are the first answers he gets?

  • “the code sucks”
  • “that’s not real open source”
  • and other bullshit

instead of: “it is awesome, thank you”

so yeah there are a lot of haters on HN, reddit, twitter, etc.

see this other blog post Fans and Haters to explain the phenomenon

The “the code sucks” comments are really uncalled for, first the author acknowledge himself

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.

and he list many flaws he is aware of to then conclude why it happened like that

I was young and more interested in getting something on the screen than implementing it properly.

and anyway any dev will find their own code to sucks few months after they wrote it.

And for the other “that’s not real open source” comment, sure OK it is not real open source but for fuck sake that is really an asshole thing to say, the guy is showing sources where you can learn a hell lot from and on top of that some people would want to be able to reuse it commercially and make money from it ? sshhh com’on

Finally, many comments that show how much dev do not understand Flash and are not aware that AIR even exists …

I gonna give just one example

Would it be ridiculous to write a Flash game then package it with Electron bundled with a Flash Player?

I feel like the issues most people have with Flash are one of two things. It isn’t a great choice for rich interfaces (especially things that aren’t games) when considering accessibility and different screen sizes. It also presents security vulnerabilities when it was intended to be sandboxed.

By moving it from web browsers to standalone applications, you lose any expectation of sandboxing. When only using it for games, it ceases to have the same accessibility constraints.

this is beyond stupidity, I’m just tired to correct such brain dead dickwat …


Being Positive and Not Taking Yourself Too Seriously

Personally I appreciate a lot Terry Cavanagh attitude here :slight_smile:

and


So let me list everything that is positive about those sources

  • If you never made a game the VVVVVV’s source got pretty much everything you need to know
    from title screen, dialogues, assets management, map editor, etc.
  • by just editing the AS3 sources you can actually “play with it”, the more you play the more you learn about particular mechanism
  • it is also a great real-life example of AS3 sources ported to C++
    comparing the two code base can teach you a lot
  • the sources are not that big and so are very approachable (eg. about 30 or so classes)
  • because it is already a successful game and it is complete
    you could run your own experiment on it like adding analytics, stats, replacing display list by Starling, delegating some stuff to Workers, etc. and then compare numbers
  • for the more advanced ones it could also be a good exercise in refactor

Morality is to keep being creative, picking the right tool can avoid you to waste time (if not years), and release your products while ignoring the haters.

Big thank you to Terry Cavanagh for those sources.

5 Likes

A post was merged into an existing topic: Behavioral expert needed