Dark Souls uses global variables for progress flags (and worse: reuses variables for different parts), and there are places where this in fact causes a conflict. This kind of thing can lead to security issues, but usually indirectly. I can think of contrived scenarios where it causes an issue directly, but it's more that spaghetti code is really hard to make secure.
Seeing devs behind things I look up to do shit like this makes me a hell of a lot less self-conscious about my own code.
He's 100% bullshitting with the global array in Heartbound though. A sane way to do that is to assign IDs to strings, refer to IDs in the code, and have an i18n library pull data from a text file. That preserves the benefit of being able to quickly edit text, but prevents you from going insane having to remember which array index you store that particular string at, if you use descriptive identifiers.
Yeah, I think a lot of people miss the forest for the trees on the many reasons why this is bad coding - something that annoys me a little bit is when a bunch of people repeat "this code is bad" without understanding why. For the audience:
The funniest thing about this to me that shows how much of a rookie Jason is despite how many years of experience he professes to have is that
GameMaker has native JSON support. Even if he wants to have a lookup table, there's no reason he needed to build one that's so primitive and opaque, rigidly coupled, and hostile to change.
The great thing about the sorts of key/value pair structures behind things like JSON is that they're completely arbitrary in their definition and access. Naming an event key something like EV_Act1_Steve_FuckedAss isn't just that it's very descriptive (and it is very descriptive, made better by the fact that you can build more prefixes in to subclassify if you need to), it's that, say, if you're conceptualizing of Steve's events being in this part of the array (for cleanliness and reference), you can merely add another section to the table with a new name. You can structure game events that need to rely on this event to point to this name, and it's such a specific name that nobody will ever need to compete for it, and the nature of the list doesn't mean that anything has to fight anything else for a "place".
On the other hand, if you have this godforesaken nightmare Jason has built that's just a list of numbers, you have aspects of your code pointing to hardcoded references to numbers in that table. That is, if I have entires 114-160 being the events I've coded in for interactions with Steve, and then later in development I want another Steve event, I can't just move events 161 and on down to make room for it. Every single event is referring to those numbers relying on the assumption that they are what they claimed to be. That means that I need to find every bit of code calling for event 161 and change it to 162, every bit of code calling for event 162 and change it to 163, and so on, which encourages Jason to instead add the new event at the end of the list, so now it's all fucked up and everything is everywhere.
It basically guarantees your set of event flags is going to be a scattershot nightmare of inconsistency, and again
GameMaker has support for a better tool for this built-in. It's just an abstract example of Thor's narcissism - I'm not even blaming him for not knowing something, the first time is ignroance, not stupidity, but at no point does he look at something clumsy and have the catalyzing thought of "maybe there's a better way I should be handling this". He assumes he knows all there is to know, and so you end up having a man who's done 3 months of learning in the allegedly 20+ years he's spent doing this job.