Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Open Source The Internet Entertainment Games

Terry Cavanagh Releases Source Code For VVVVVV On GitHub (gamasutra.com) 47

The source code for acclaimed 2D puzzle platformer VVVVVV has been released by creator Terry Cavanagh to celebrate the title's 10th anniversary. Gamasutra reports: Breaking to news in a blog post, Cavanagh explained the code fro both the desktop and mobile versions of the game can now be grabbed over on Github, and confessed that "even by the standard of self taught indie devs, it's kind of a mess." The desktop code is the version that was ported to C++ by Simon Roth back in 2011 and later updated and maintained by Ethan Lee, while the mobile code is written in Actionscript for Adobe AIR and is based on the original v1.0 flash version of the game.
This discussion has been archived. No new comments can be posted.

Terry Cavanagh Releases Source Code For VVVVVV On GitHub

Comments Filter:
  • by Anonymous Coward

    Never heard of VVVVVV before today. Where is all the acclaiming coming from?

    • Well, see it's page on Steam, got a "Most Fun/Compelling Game" in an Indie Games Festival. And it's very well scored both on Steam and Metacritic.
      I for one recommend it, great hidden gem of a game.

    • by pjt33 ( 739471 )

      For example, Slashdot [slashdot.org].

    • > Never heard of VVVVVV before today. Where is all the acclaiming coming from?

      Come on, it has its own Wikipedia page: https://en.wikipedia.org/wiki/... [wikipedia.org]

      • by Rei ( 128717 )

        To be fair, so does... (clicks "Random Article")... I've Forgotten What It Was in You (That Put the Need in Me), a 1989 "country rock" song by someone named Maria McKee. The article has five sections and nine references.

  • by hraponssi ( 1939850 ) on Saturday January 11, 2020 @04:05AM (#59609224)

    code always seems to become a mess. especially in a project with a few developers, and i would guess an indie game is a great example. someone who claims their personal project a mess likely is also more critical of themselves anyway.

    never heard of this game but it is still nice to see source code released for published games. the game is also still sold on steam, has 5k+ reviews and very positive rating. so i guess some people have heard of it.

    the blog post goes very nicely with the code, providing interesting story elements on its development besides the single line picked up in this slashdot summary stating the code is a mess.

    the mess seems to refer to some basic controversies of code quality (e.g., passing everything around all the time because "globals bad"), just hacking it together fast, and stating how he would be slower now trying to do it "right". is it so bad to just hack working stuff together while having some fun when making a simple indie game?

    • Re: (Score:3, Insightful)

      by Anonymous Coward

      As always it's really about the long term plan for the code. If you're building a game, and it's fairly solid and stable and only needs a handful of minor post-launch fixes/tweaks/changes then fine.

      If you're going to maintain it day in, day out for 10 years then you really want the code to be in a better state because you inevitably have two choices when dealing with a codebase like that for the longer term:

      1) Continue building hack upon hack upon hack until you can do no more with it and have to abandon th

      • by guruevi ( 827432 )

        Or you could do like EA and other game developers do, simply re-release the same engine every year and once in a while you update the assets/levels to a slightly higher definition.

    • It can always be a lesser or greater mess, though. One can for example see things like while (yp < 0) yp += 700; while (yp >= 700) yp -= 700; and then ask "why not simply use regular modular arithmetics for this?".
      • I can think of two reasons to perform modulo reduction via repeated subtraction.

        Retro console or handheld demake
        Terry might have planned to eventually port this to a platform where integer division is slow, such as an 8- or 16-bit console or an ARM7TDMI-based Game Boy Advance system. If one expects these while loops to run no more than once in the vast majority of cases, it can be faster than calling a subroutine to perform division.
        Poor support in C and C++ for modular arithmetic
        The % operator on negative
        • And that very page you linked gives you a fix for C's misbehavior. In any case, just by packaging the behavior into a function, you could switch the implementation easily later.
    • code always seems to become a mess

      Once you get enough experience, you can write code that isn't a mess. I focus on three elements:

      1) Does the code work?
      2) Is the code readable? Can a new programmer take the source and figure it out?
      3) Is the code flexible? Can new features be added without massive refactors?

    • by AmiMoJo ( 196126 )

      If you have a plan from the start the code doesn't have to be a mess. I've had some pretty big C projects that I kept in shape by having a plan and sticking to it. Even one fairly large (16k) assembler project.

    • by tlhIngan ( 30335 )

      No, games are generally coded horribly.

      And that's because of two things. First, a game has almost no long-term maintenance - for the vast vast vast majority of games, once it's released, after the first few patches, that's it, it's dead. So no one cares about long term maintainability since no one's going to maintain it longer than a few months after release. So accumulating technical debt doesn't matter because it's effectively written off.

      Second, time pressures. You don't have time to refactor, or clean u

  • Unmaintainable code (Score:2, Interesting)

    by skoskav ( 1551805 )
    Although it nearly made me barf in my lap to read his 3500 line switch [github.com], or seeing the mix of code abstractions in his logic update method [github.com], it certainly takes some sort of talent to work on that code well enough to produce a game that good.
    • Refactoring is something that clearly happens to non indie code, that and apparently comments, and no repeating //Generic "run script" 200 times does not count as commenting.
    • by Cederic ( 9623 )

      I think to be fair you start with a switch statement that's 8 lines long then add new features, and it grows and keeps growing.

      It's not really talent to work on that code, it's knowing the code inside out because you wrote it all and there's enough of a logical structure that lets you navigate it.

      My code from the early 90s is unsophisticated but I had no trouble working on it. I wouldn't wish it on others now.

      Credit to him for being willing to share. Platformers just aren't my thing so I gave up on his game

    • The length of the switch (while a problem) isn't as big of a problem as fucking magic numbers. That's 101 amateur shit right there:


      case 7: //End of opening cutscene for now

      case 9: //Start SWN Minigame Mode B

      case 10: //Start SWN Minigame Mode A

      Really? He was too fucking lazy to add simple enums???


      enum
      {
      STATE_END

      • by tepples ( 727027 )

        Why slashdot's "code" tag is STILL shit: It removes extra whitespace

        Slashdot's <code> tag (not <ecode>) removes whitespace on purpose, following the behavior of HTML's own <code> tag. Slashdot's <ecode> tag behaves more like HTML's <pre> tag.

        20 years later and they STILL can't fix this basic shit.

        A lot of the quirks of Slashdot with respect to formatting are intended to deter people from posting sexually explicit or racially bigoted ASCII art copypastas.

      • Half the numbers are commented as "Generic 'run script'".
  • Countless projects have their source code made available every day, what makes this one 'stuff that matters?'

  • "while the mobile code is written in Actionscript for Adobe AIR"

    I literally shuddered when I read that part.

  • by LenKagetsu ( 6196102 ) on Saturday January 11, 2020 @11:20AM (#59609682)
    VVVVVV is a precision platformer, there is literally nothing puzzle about it.

We are each entitled to our own opinion, but no one is entitled to his own facts. -- Patrick Moynihan

Working...