MeltDown
Honors Winning Thesis Project
Level Designer / Scripter
GAME: Fallout 4
ENGINE: Creation Kit
DEV TIME: 2.5 Months
GAME MODE: Single Player
Download Level
Download
Design Doc
Scripting
Wave Defense
Even in early planning, it was clear that the concluding defense section of "Meltdown" would be its most complicated element. Furthermore, I knew that, no matter how much planning I did, I would still need to make changes, add additional polish elements, and change functionality throughout the project. To manage this complexity, I kept as much of this section's scripting in a single script hosted on one object. By doing so, I limited the amount of hard-to-track bugs stretching between multiple scripts.
As shown in the abbreviated example, the WaveAttack script handles the spawning of enemies, siren sounds, explosion effects, the state of the level's quest, level hazards, lighting, and more. While the script is long, I maintained detailed comments, which makes the script very readable. Furthermore, most of its functionalities are independent, so new functionality can be added easily, as was necessary multiple times during development.
The diversity of objects and effects the script handled did cause its own problems, however. As development continued, the number of variables linking to external objects become unmanageable. To solve this problem, I reorganized them and added further detail to each variable's comment.
Nevertheless, my original design for the defense section script worked well overall. The defense section is the most memorable and visually impressive part of "Meltdown" because, while scripting it, I was able to focus more on adding functionality and juice and focus less on tracking down bugs or rewriting code.
Teleport Effects
After critical development was finished, I decided to add further juice to the level by adding visual effects to the teleporter the player uses to get to the military base in which my level is set. Thankfully, since I had already learned a lot about scripting these effects from the WaveAttack script, this process was much faster. To begin with, I wrote out the sequence of events I wanted for the teleportation script in comment form.
I then began filling in each commented section with real code one by one, testing at each step. Because I already understood how to accomplish all of the effects due to my experience on the WaveAttack script, this process took much less time. Furthermore, I avoided using vague variable names or over-complicated activation structures. This greatly improved the readability of my code, without requiring verbose comments.
Overall, the scripting I did on this level reinforced the value of simplicity. Often it can feel cleaner to separate code into small, separate scripts, or to over-architect your code before you even begin writing it. However, this kind of cleanliness doesn't actually accomplish what cleanliness is supposed to accomplish; rather than making your code more readable and bugs easier to find, separating functionality does the opposite. By learning to avoid this habit, I was able to complete the teleportation effects show below in an afternoon.