Events in a game (Basically cutscenes) ?

           I've always thought that games had a class for each individual level, and then in that class file it hard coded every single thing that happens once you reach a certain area. So pretty much cutscenes, explosions, etc. Am I correct in this? It seems that you would need tremendous organizational skills to do it this way and keep track of each individual point in which stuff happens. Is there a better way to do this? I figured a built-in level editor would help tremendously in making this, but then you'd also have to create a level editor that suits your every need. Any help is appreciated on the correct/most efficient way of doing this.

Assuming I’m understanding your question correctly, I’d say that no, that’s not typically how it’s done.

Generally the idea is to make games data-driven to the degree that it’s practical to do so. To a certain extent, how important this is depends on the programming language(s) used and the build process for the application. For a large C++ application, for example, generally you want to keep builds to a minimum, so the last thing you want to do is hard-code all of your game logic, since this would require rebuilding the application every time you tweak something. For Java it’s not as big a deal, but the same principles apply (if to a lesser degree).

Also, as you may know it’s common to embed scripting languages in game applications to facilitate easier tweaking of game content and to move game logic out of the main code base. The kinds of things you describe (e.g. what happens when you enter a certain area) are exactly the kinds of things that are often scripted. (In Java, for example, you can incorporate scripting via JavaScript using a library like Rhino or Java 8’s Nashorn.)

Again, apologies if I’m misunderstanding your question, but based on what you wrote, it seems like data-driven design and possibly scripting is what you’re after.

Exactly what I was looking for, thank you! Welp, I’m off to spend a month trying to figure out how all of this fits together! ;D