Let’s Make: Traffic Department 2192 – Part 32

Prototyping - Enhancements

Our prototype now resembles the original Traffic Department 2192. This time we'll add some basic enhancements: Make a scalable view during gameplay, and add the ability to skip missions entirely and just watch the storylines. One subtle enhancement we've already achieved is boosting the FPS to 60 by virtue of using GameMaker.

Just to reiterate, When implementing a game design, I prefer to get it working in some basic, small-scale form. Then starting adding features to this prototype. After understand what the full feature set includes, then we go back and design the engine from the ground up.

Objects

We'll be adding a new object that supports skipping missions. It sits between the briefing and the mission start.

Concept Object Notes
Mission Skipping obj_missionskip Gives the player the option to skip the mission gameplay and just go from briefing to debriefing.

 

GML Code

The new object supports mission skipping. We'll edit the camera and keyboard objects to support the view rescaling.

obj_keyboard: Begin Step 1

We'll add these three lines within this event to dispatch new keys for zooming and skipping that are handled in the appropriate objects.

 

obj_camera: Create 2

New variables to support zooming and rescaling

 

obj_camera: Step 1

Handle new keys Z and X. This code snippet includes our old code so just replace the old.

 

obj_camera: Step 2

Actual zooming is done by manipulating the GameMaker views. We do a smooth slide from 1x, 2x, 3x, etc.

 

obj_camera: End Step 3

Here we ensure that the player's ship stays centered as much as possible. Extreme rescaling may break this.

 

obj_briefing: Destroy 3

The final version of our briefing destructor. This time we'll pass control to the mission skip option object

 

obj_missionskip: Create 1

Registration and references

 

obj_missionskip: Create 2

Some variables, which include the target room that we'll manipulate.

 

obj_missionskip: Destroy 1

Deregister and move along

 

obj_missionskip: Step 1

Process input including our new key to skip missions. Any other key to start.

 

obj_missionskip: Step 2

Fading in and out and destroying.

 

obj_missionskip: Draw 1

Draw the mission title banner

 

obj_missionskip: Draw 2

Draw the subtitle instructions