This thread is going to be explaining the current gametype scripting system, called Megalo, and how it impacted Halo 4’s gametypes, and what 343 can and possibly will do for Halo 5. This is meant as a learning guide for the community to understand the hardships it is to write scripts from scratch, and for the 343 devs to understand the community better, and to improve upon their scripting.The OP will be broken up into 2 sections: the Setup section, and the Improvements
section. Setups section will focus on explaining to the community why certain aspects of gametypes can never come to life due to aspects of the game engine itself are presented to the player. The Improvements section (2nd post) will be community-wide suggestions for improvements, on top of one’s I’ve accounted myself that would help the system out as well.
So, read on if you’re ready.
Megalo: Setting up the Gametype
Megalo is known as the scripting system and logic that 343 uses for writing their gametypes. Halo: Reach was the 1st Halo game to use this scripting logic in order to define a definite amount of interactions the system can handle between players, objects, timers, etc and letting those things interact with each other and the physical engine of the game.
The first thing the community needs to realize, is there’s limitations to this system. Only so much data can be introduced and read via the scripted part of a gametype, which therefore limits the amount of things the 343 devs can do with a gametype. To put into perspective, Invasion from Reach used up nearly the max amount of resources and space for scripting.
Initial Gametype Setup:
Each gametype has what I’m referring to as the “setup.” The setups section basically tells the engine what’s going on. It tells the player what teams are available to play as, what the Damage Boost, Speed Boost, and Overshield powerup traits do (yes, they’re actually traits), and among a bunch of other things, the gametype’s specific settings and all their language translations. I’ll be heavily discussing the gametype settings factor of the script further down This section is by far the easiest for the developers, because they already know what they plan on doing with the gametype and how they want to set it up. That’s what this section is for, and the next section involves the execution of script data that the gametype runs on.
Assigning Functionality:
The thing with the scripting is, anything and everything that will have functionality, must be assigned by the script in order to be functional. Player’s will be assigned as the immediate player being referred to in basic functions. Objects that are objective-oriented (flag stand, capture plate, etc) are assigned as GlobalObjects. Timer’s can be assigned as well.
Actions and Conditions:
Another limitation, is the fact that there’s what’s known as Actions and Conditions. This is essentially a “Cause and Effect” clause. Throughout the script, the game assigns objects variables. Those variables are called into conditions that the gametype checks in order to determine whether or not to execute an action. These actions can range from picking up a flag, to starting a countdown timer on a waypoint, and even how to handle scoring on an individual basis. There can only be so many of these Actions and Conditions in a script due to limitations. This is another reason why scripting for 343 is hard. There are conditions and actions that, in our minds, would seem easy, such as “If I’m within 3 meters of the flag, then pick it up”. While in essence this is true to an extent, it gets heavily complicated. There’s many other actions when that certain part of the script executes that must be done as well, such as adding the waypoint to the carrier, what icon the waypoint is, what the waypoint says, giving the carrier the flag carrier trait set, giving the carrier his Flagnum weapon, etc.
There can be 1 branch of conditions (easily 3, 4 or more) that can happen simultaneously to determine just 1 action. That 1 action can set a variable that is used in another condition down the road to call up other functions such as awarding medals. An example, is when a player grabs a flag and becomes a carrier, the system calls the player, for this purpose “GlobalPlayer0”. The system identifies this as a person holding a flag. Down the road, this condition is checked to award medals like flag kills, jousts, Flagsassinations, etc. When the carrier dies or captures a flag, the system “unchecks” that player as a “GlobalPlayer0”. This is a very light and shallow explanation of it, but objects, timers, and players can all be set with variables this way to interact with each other and when the script asks if something is true or false, it can execute a branched part of the script or bypass it depending on what the devs want.
Initialization and Host Migration Triggers:
These 2 things are huge factors in gameplay mechanics. Initialization Triggers set up the beef of the gametype. It sets up the callouts, the gametype name, countdown timer, the objects that need spawned (like oddballs, waypoints on objects, and timers). This is what you see happening when the blurry screen and 10 second countdown occur before a game starts on Halo 4.
Host Migration. We all know this as the dreaded blackscreen when the host leaves, host changes, or when the hosts’ connection falls enough behind in sending/receiving client data that it can stop the game entirely. I beleive this is because the script is ran from the host box, only. Now, the trigger here is usually used to copy data from clients and store them in the system to “hand off” to the next host. A lot of times it doesn’t work 100%, but it works well enough in most cases. The less scripting a gametype has, the easier it is for the Migration hand-off to occur without issue.
Finalizing:
Take everything I put above with a grain of salt. If this didn’t make your head wanna twirl, just imagine what 343 does DAILY. Not only is it daily, but it’s also 50 times harder than how I explained how it works. I left out a bunch of details not only for the community’s sake of understanding, but for 343’s sake in that it doesn’t become a blown-out WikiLeaks case. This portion was intended for the community to understand the hardships 343 works on when dealing with the gametype. The GAMETYPE. The “easiest” thing that the community thinks 343 has to deal with, isn’t so easy.
I explained a lot of major areas, and not only does 343 have to guarantee that it works, but that there’s no overlapping problem areas. No areas of the script that break, don’t function as intended, or just don’t work period. All the testing that goes into their gametypes is very time consuming, and finding the root cause of an issue may seem simple, but it could trace back through multiple areas due to how the scripting may be set up. Give 343 a break with the gametypes. It was their first run at it and for that, they did very well with things not breaking.
To cover that last sentence, the next post will be regarding gametypes that people claim are “breaking”, which isn’t even entirely 343’s fault. I’ll also cover issues the community has been forthcoming to 343 about fixing. This deals primarily with the Gametype Settings and missing settings players have felt empty without.