Live data from Hacker News

Open source is democratizing video game development

github.com

21–28 of 28 posts

Re: Open source is democratizing video game development

#21
post #17

Earlier quoted context omitted.

It's kind of weird how terrible this code is (according to software design 'best practices'). 5k lines in a single file, tons of repetition that could be replaced with more compact code etc. I would think the author was a novice programmer, but looking at the creator's history they've already made Towerfall, another hugely acclaimed game (and one I still play to this day), about 5 years before this was released. Yet…

> (according to software design 'best practices') that's because these best practices aren't geared towards producing something good - it's geared towards making something easy to understand for someone else, and easy to maintain when requirements change. It is also designed for the lowest common denominator programmers - so that many can work on the same code base, over a long period of time. For games, none of thes…

Yep, absolutely. A lot of game code has really big files. Although not exactly the gold standard for code style, the Source Engine does have a significant level of even though almost every file is 1k+ SLOC.

Here's the base Source Engine movement code for example: https://github.com/VSES/SourceEngine2007/blob/master/src_mai...

Re: Open source is democratizing video game development

#22

The article mentions asset stores / packs as part of the democratization but that is also often the biggest barrier to open sourcing games. Solo or small indie developers often rely on asset stores for at least part of their content and that usually means they can't open source their entire game even if they wanted to as licenses for assets usually do not allow for redistribution in this form. If you want to open sou…

It's the id software model, isn't it? Open source the code, allow mods, encourage an ecosystem that anyone can learn from. And if they want the original assets instead of subbing in their own, they can buy a copy of the game and use those with their modified code.

They can still distribute their mod and other players of the original game will already have the shared assets.

Any new assets can have their own licensing terms.

I've run into similar situations with open sourcing non game code too. I can open source the code I wrote, but not branded images and trademarked assets that designers made. So we just subbed the assets with placeholders. Everything still worked, it just looked different.

With games, though, that becomes harder when something like a level is both an asset and non trivial to replace, and its design is often more unique than the engine itself. Think something like Portal, which is a joy not necessarily because of the Source engine, but because of the great level design and balance.

Just interesting to think about. I'd love to see more open games.

Re: Open source is democratizing video game development

#23
post #9

Earlier quoted context omitted.

Celeste has a huge amount of code dedicated to the proper smooth movements. It requires both knowledge of "physics" simulation, as well as coding methods to get a particular desired outcome (ala, the feeling of responsiveness). It might not be easy for someone without coding experience to create. Have a look at https://github.com/NoelFB/Celeste/blob/master/Source/Player/...

It's kind of weird how terrible this code is (according to software design 'best practices'). 5k lines in a single file, tons of repetition that could be replaced with more compact code etc. I would think the author was a novice programmer, but looking at the creator's history they've already made Towerfall, another hugely acclaimed game (and one I still play to this day), about 5 years before this was released. Yet…

Games are (sadly IMO) mostly write-only software.

Re: Open source is democratizing video game development

#24

The article mentions asset stores / packs as part of the democratization but that is also often the biggest barrier to open sourcing games. Solo or small indie developers often rely on asset stores for at least part of their content and that usually means they can't open source their entire game even if they wanted to as licenses for assets usually do not allow for redistribution in this form. If you want to open sou…

It's the id software model, isn't it? Open source the code, allow mods, encourage an ecosystem that anyone can learn from. And if they want the original assets instead of subbing in their own, they can buy a copy of the game and use those with their modified code. They can still distribute their mod and other players of the original game will already have the shared assets. Any new assets can have their own licensing…

It is the id model, and it's not without value, it's just short of what I'd really call an "open source game" since so much of a game is about the assets, levels, etc. and not just the code.

I think id's open source code has been great for lots of reasons. I just think there is untapped potential in "fully" open source games where all the assets (including the source assets like Blender files and not just the intermediate formats like .fbx) are open source as well as the code as that makes it easier for people to experiment, learn and remix the content.

Re: Open source is democratizing video game development

#25
post #17

Earlier quoted context omitted.

It's kind of weird how terrible this code is (according to software design 'best practices'). 5k lines in a single file, tons of repetition that could be replaced with more compact code etc. I would think the author was a novice programmer, but looking at the creator's history they've already made Towerfall, another hugely acclaimed game (and one I still play to this day), about 5 years before this was released. Yet…

> (according to software design 'best practices') that's because these best practices aren't geared towards producing something good - it's geared towards making something easy to understand for someone else, and easy to maintain when requirements change. It is also designed for the lowest common denominator programmers - so that many can work on the same code base, over a long period of time. For games, none of thes…

I mean, stuff like this isn't really defensible:

    switch (index)
    {    
        case 0: return sound0;
        case 1: return sound1;
        case 2: return sound2;
        case 3: return sound3;
        case 4: return sound4;
    }

Re: Open source is democratizing video game development

#26
post #9

Earlier quoted context omitted.

Celeste has a huge amount of code dedicated to the proper smooth movements. It requires both knowledge of "physics" simulation, as well as coding methods to get a particular desired outcome (ala, the feeling of responsiveness). It might not be easy for someone without coding experience to create. Have a look at https://github.com/NoelFB/Celeste/blob/master/Source/Player/...

It's kind of weird how terrible this code is (according to software design 'best practices'). 5k lines in a single file, tons of repetition that could be replaced with more compact code etc. I would think the author was a novice programmer, but looking at the creator's history they've already made Towerfall, another hugely acclaimed game (and one I still play to this day), about 5 years before this was released. Yet…

Its because best practices are written by people who dont write alot of code. Most of them are lowest common denoninator bs.

Re: Open source is democratizing video game development

#27
post #17

Earlier quoted context omitted.

> (according to software design 'best practices') that's because these best practices aren't geared towards producing something good - it's geared towards making something easy to understand for someone else, and easy to maintain when requirements change. It is also designed for the lowest common denominator programmers - so that many can work on the same code base, over a long period of time. For games, none of thes…

I mean, stuff like this isn't really defensible: switch (index) { case 0: return sound0; case 1: return sound1; case 2: return sound2; case 3: return sound3; case 4: return sound4; }

Look perfectly readable and easy to understand.

Re: Open source is democratizing video game development

#28
post #17

Earlier quoted context omitted.

> (according to software design 'best practices') that's because these best practices aren't geared towards producing something good - it's geared towards making something easy to understand for someone else, and easy to maintain when requirements change. It is also designed for the lowest common denominator programmers - so that many can work on the same code base, over a long period of time. For games, none of thes…

I mean, stuff like this isn't really defensible: switch (index) { case 0: return sound0; case 1: return sound1; case 2: return sound2; case 3: return sound3; case 4: return sound4; }

only because there's no `default` case.

You could argue that having `sound` as an array, and index into that array is better, but once again, what does "better" mean here?

this code works as is, you will not get an array index out of bounds error. If this is quick and easy to write, what else could you ask for?

Post reply on HN