I wish Terry A. Davis was alive so he can review PS's code and call him nigger cattle.
I'm not the greatest programmer who ever lived but I looked over his code (post #483). I just prayed to God to have Terry send me a message and Terry responded with "he's grade A nigger cattle with bird ideas"
This may be possible using OpenGMK (gamemaker 8 tool) from the github repo using a cursory glance. I'm not willing to buy his game to test this though.
I tried decomping his game and I couldn't find a decomp tool that supported the version he was using, I did manage to decomp his demo for shartbound but it was old and didn't have anything of use because it was tiny and short as fuck.
[video of maldy being grade a nigger cattle]
Source: 59:34-1:00:22
Jason explains how one long switch case statement is efficient because "switches turn into a jump in the compiler"
Literally pointless in GameMaker Studio. It's like shaving all your hair off so you can run faster or weigh less. It will not make a lick of difference in either scenario. Since this narrative switch can only ever be called once for each narrative choice, the performance impact on the game will be negligible, and likely immeasurable. It's so pointless I am having trouble thinking of something more pointless, the only thing I can think of is caching small or non-expensive computations like math.sqrt(4) or 2 + 2., but even this is on the same level of pointlessness...
The way I understand it is that in GameMaker Studio, it will compile the GML code into an intermediate bytecode that is executed by the runtime interpreter. The bytecode may optimize switch statements to use lookup tables, binary search, or simple jump tables, depending on the nature of the cases (dense or sparse case values -> Dense: O(1) or Sparse: O(log n) or O(1) for hash maps). Also he has no way of knowing what it will reduce to, unless he decomps his own game and ensure it's translated into a jump table and not a binary search or lookup table. (which there is no way in hell this fucktard is doing so) Like I said in my original post about his code, Data-Driven Design is the choice here using something like JSON. Also, if he truly wanted something like a jump/lookup table, he could have programmed the game as such. But he's way to retarded to do so.
The performance of the switch would only matter if:
- It were being called in a tight loop or frequently during gameplay. (it's not)
- You were targeting extremely constrained hardware (retro consoles, embedded systems). (he isn't)
- The switch is so large and unoptimized that it noticeably slowed the game (unlikely with GameMaker's runtime optimizations). (it doesn't)
also i called it in post #483
Someone told him switch-cases are performant and mald decided "omgwtfbbq switch-cases for everything!"
"I spent 10 years optimizing a switch case statement with 1000+ choices. Now it runs in 0.0000001 seconds instead of 0.000001 seconds. The players will definitely notice this during their 2-minute furry fueled gooning break!"
Problem isn't that the code is bad. Honestly, who even really cares. The problem is when you role-play as the greatest programmer to ever exist while writing shit code. This ruffles feathers and causes this reaction.
Exactly.
--
I've been away for awhile working and seeing what this has evolved into since the original thread posting, my god. fucking kek.