ch00beh

✨ software pretengineer ✨

i'm here to dumb ass and chew bubblegum and i'm all out of bubblegum

name gen: @onomancer

capybara dating app: @capybr

posts from @ch00beh tagged #or maybe not /s

also:

mogwai-poet
@mogwai-poet

which consists of people looking at a screenshot of code that is straightforward and getting angry that it's not more complicated.

I'd just like to posit here that a straightforward solution is an excellent default and you should have a really solid argument for the advantages of a complicated solution before you choose it.



tef
@tef

every time there's a "look at this gamedev code" post, it's usually from a cs graduate, often fresh.

for them, code is a means to demonstrate knowledge

they've never been tested on "making things maintainable" or "exploratory programming", but they have had to spend exam after exam writing code to show that they know fancy tricks. the idea that code can be boring is almost anathema.

this habit continues well into their career: you don't have to look further than a technical interview or code review to see more senior programmers setting up elaborate games to show how clever they are.

that's why when they bump up against gamedev code, be it 5000 if statements, or three state machines lovely crafted into a powerset to handle events, it just feels wrong. the code works, does what it needs to, but no-one gets to feel smart about it. what gives?

"i get it, you've only seen code in a textbook"


lifning
@lifning

i haven't looked at Balatro in particular yet, but 1000 times this.

all the big-O properties of algorithms you learn in college are irrelevant in the world of indie game development. unless you know you're doing a very specific computationally-ridiculous thing as your game's gimmick, your favorite data structure is the Vec/ArrayList. it's simple and it's cache-coherent and it lets you write the game part of the game.

"but I'm supposed to use a linked list if I'm making a lot of insertions and deletions" yeah buddy, enjoy all the allocs and frees that come with it. you'll know you need something different when it becomes an issue and you can replace it then.

refactor your code as you need to in order to stay motivated to keep working on it, but the best data structures and algorithms to use for a game are the ones that get it finished.

think of how many more copies Balatro would've sold if its code were more mathematically pure and elegant!


ch00beh
@ch00beh

ok but like making fucked up little one-liners makes me feel alive and therefore keeps me motivated /s


Β