Ogay, real shit. All that talk about how garbage Mald's code is made me, a complete knuckledragger who doesn't understand programming and considers it black magic, curious.
Lay it out in the most simplistic, retardproof way. Tell me how and why it's bad and how would you improve it. Provide examples. Any insight helps. I am paying in

s.
View attachment 7598850
lemme try
when you load up an array like mald does, it gets stored in memory. you know how you have some gbs of ram, when you load the game, all that stuff gets put somewhere in your ram for future use
that's not a huge deal, but you dont have, or shouldnt have to, store things in memory youre not using. its a bad practice, but not a huge deal
the huge deal is that he puts all his entries within the array as numeric indexes. imagine you have a shopping list with ten thousand items. you also have a reason for buying those (for example large dark chocolate to make cake with)
instead of going
dark chocolate bar: make cake with
you go
0: make cake with
and then in a completely different list, where you keep your recipes, you go
next ingredient: 0
you have no fucking idea it's dark chocolate. neither does mald, so he puts comments (code used as a reminder rather than instructions for the computer). if this sounds retarded, it's because it is. remember the example above? the "dark chocolate bar: make cake with"
you can have something called a json rather than a array, which uses a alphanumeric key index
and instead of loading that json, you put it on a saved file, and reference it as needed, rather than loading things in memory you dont need
the key problem is: what if youre doing a strawberry cake instead? when you look for "to make cake with", you now have two different values, say
0: make cake with
324: make cake with
one is chocolate, the other is strawberry. the way you comment it is
0: make cake with //thjis one is chocolate
324: make cake with //thjis one is strawberry
which is colossaly fucking retarded. on a json structure, you could go
cake_chocolate: make cake with
cake_strawberry: make cake with
and just looking up cake_ gives you a more clear picture
the reason it's a key problem is that it makes debugging after a few months (or in malds case, almost a decade) an uncessarily complicated chore that can take from a couple of minutes to a few hours if you hit a blocker
those entries are, by the way, in an rpg/advnture game, every single line of dialogue the game has. every.single.one
say a character wants to make cake and they're gonna reference the cake dialogue. they then say butt gnome instead. thats when it becomes tricky to figure out which dialogue is the chocolate one, if, say, you forgot to put a comment on it, and don't remember what the dialogue is supposed to be
i bet several shekels there's dialogue in that array that maldy forgot about and will never be referenced. still gets loaded into ram tho
no need to semper fi tho, hopefully this makes more sense. i'm gonna have some cake now
EDIT: instead late me 'cos fuckin dude already thanked enough answers