eniko,
@eniko@peoplemaking.games avatar

Working on games is cool cause they're antithetical to clean code. I'm sure some people will argue but clean code relies on systems that obey a set of distinct rules. Those rules are almost always absolute

So you start your game with your clean rules. In context A you can do B but not C

But an unfortunate part of game design is that the most interesting powers you can give players are the ones that break the inherent rules of the system. So inevitably you'll wind up with a bunch of code that works around your baseline rules and that always turns into a goddamn mess

pettter,
@pettter@mastodon.acc.umu.se avatar

@eniko There's that, and also "When you think about it, a helicopter is kind of a very specific type of door"

thevoicesgames,

@eniko good to know I’m not the only one who has this problem

efi,
@efi@chitter.xyz avatar

@eniko that's why you usually want to design the maximum freedom you're gonna give the player first, and then add the caps that make it into the starting set

kaynSD,
@kaynSD@peoplemaking.games avatar

@eniko I'll argue, but only from the point of view that software development is all about getting a fixed stack of tech to solve a problem; while game development has you inherently need to CREATE that problem to begin with (paraphrasing @ash on that one)

The real issue comes when you keep changing the problem you're trying to solve. Designers are welcome to say that they can't tell what will be right until they see it, and I'm welcome to say that I need to rewrite the answer if they're going to fundamentally change the question.

It requires a really, really high level approach to programming and project management and a certainty of faith in the vision of a game design to cleanly develop a game from scratch with clean code

Farbs,
@Farbs@mastodon.social avatar

@eniko I took me decades of gamedev to realise that the special cases and exceptions aren't imperfections, they're the interesting bits.

My programmer brain always wants to take them out or fold them into a general purpose always-on system, and whenever I do the game gets just a little bit more bland.

eniko,
@eniko@peoplemaking.games avatar

@Farbs yeah thats how you get games that feel like MMOs

Farbs,
@Farbs@mastodon.social avatar

@eniko OMG yes. I've been trying to articulate to Farbs Jr why Sea is Thieves feels like an MMO. I think maybe it's this.

lritter,
@lritter@mastodon.gamedev.place avatar

@eniko @Farbs on the other end of the spectrum are games that are practically QTE orgies

Andre_LA,
@Andre_LA@mastodon.gamedev.place avatar

@eniko
A bit offtopic, but when the "clean code™" criticisms exploded on my feed I thought that devs were complaining about the broad concept of "cleaner code", only much more later I discovered it was about a book 😅.

CMZinac,

@eniko yep. I think it's even more critical to comment your code than in other fields to indicate the intended behavior. It's so easy to accumulate side effects and forget what the original code was intended to do!

JoshJers,
@JoshJers@peoplemaking.games avatar

@eniko Yeah I can see the dividing line in Procyon's code where "these systems are nicely built, yay" turned into "fuck it I just need to ship this stupid game"

eniko,
@eniko@peoplemaking.games avatar

@JoshJers that's definitely the point i'm hitting in kitsune tails now >_>

awkravchuk,
@awkravchuk@functional.cafe avatar

@eniko this sounds like an option of person who never tried flexible enough programming languages.

NafiTheBear,

@eniko the good part ist, since you enforced your clean code rules, you can spot the obvious breaks a specific rule does and if they don't take overhand are managable.

jplebreton,
@jplebreton@mastodon.social avatar

@eniko i've come to feel that a critical skill with game programming is being able to roll with design changes and keep things as tidy and maintainable as possible while avoiding both total chaos and total rigidity. every game codebase is a set of compromises in this space and some definitely have way more to admire in than others.

eniko,
@eniko@peoplemaking.games avatar

@jplebreton yeah I'd agree with that. it's easy to let it get away from you though, like I kind of have in Kitsune Tails... >_>;

though part of that is spinning code for a jam game into a full title with very little refactoring

pux0r3,
@pux0r3@mastodon.gamedev.place avatar

@eniko I feel like half of my job is explaining this to non-game devs when building games-focused SDKs 😆

at,

deleted_by_author

  • Loading...
  • eniko,
    @eniko@peoplemaking.games avatar

    @at yeah thats how that goes, sorry

    at,

    deleted_by_author

  • Loading...
  • eniko,
    @eniko@peoplemaking.games avatar

    @at if you wanna get back into it but not be tossed in the deep end then I can't recommend highly enough

    superFelix5000,

    @eniko @at have to check that out! 🤝🕹️🎱

    gaycodegal,
    @gaycodegal@mastodon.social avatar

    @eniko I personally think some of the cleanest code you can do for this often leads to the most interesting bugs.

    Specifically, the latest two Zelda games while I don't know their code are clearly state machine based with rules that situationally turn on and off rule sets. However, you can sometimes turn on two rulesets at once, or turn off one that wasn't meant to be disabled, or cause something to reach a state where the developers chose not to crash the game.

    scottmichaud,
    @scottmichaud@mastodon.gamedev.place avatar

    @eniko Yeah, there's no clear specification. Games are perpetual prototypes, and then they ship.

    There's some benefits to clean-ish coding in so far as it makes things easier to throw out and replace. It doesn't help maintain a specification, though, because there probably isn't one.

    gvlx,
    @gvlx@masto.pt avatar

    @eniko
    is not linear

    This analysis can also be applied to :

    Minimum Viable Architecture

    by Randy Shoup
    https://www.youtube.com/watch?v=9Q7GANXn02k

    eniko,
    @eniko@peoplemaking.games avatar

    @gvlx I'll have to give that a watch

    scavello,

    @eniko reminds me of this meme

    eniko,
    @eniko@peoplemaking.games avatar

    @scavello it's true

    lulolwen,
    @lulolwen@mastodon.social avatar

    @eniko After reading https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/p_map.c#L686-L695 I honestly started feeling "permission" to just write terrible code as long as it works. Character controllers aren't any more legible 30 years later, and at this point I'm not really convinced they can be.

    oldschoolpixels,
    @oldschoolpixels@mastodon.gamedev.place avatar

    @eniko

    It goes something like this:

    • our designer writes a set of preliminary rules
    • we go over them together, I ask questions to clarify
    • I analyze the result and build a system
    • the designer tries the system, starts to build and test content for it and starts creating exceptions to the original rules
    • aaaand from there it's all damage control 😬
    eons,
    @eons@mastodon.gamedev.place avatar

    @eniko with games, I started to favor easy to refactor (software) designs, so I don't care if code is a mess as long as it makes it easy to do the inevitable constant refactors

    antijingoist,

    @eniko I try to keep it clean by abstracting everything every time I have work around baseline rules.

    In context A you can do B but not C.

    Someone fudges context A, now A is a function and still in context A you can do B but not C. But A, B, and C are not hundreds of lines long and have their own A, B, and C's, and so on and so on and oh no oh god no what have I done?

    eniko,
    @eniko@peoplemaking.games avatar

    @antijingoist yeah it seems no matter how good your intentions it all goes to shit by the time you ship XD

    SnoopJ,
    @SnoopJ@hachyderm.io avatar

    @eniko @antijingoist What is a game? A miserable pile of kludges. But enough talk, have at you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • gamedev
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines