Let’s Make: Traffic Department 2192 – Part 33

Prototyping - Loose Ends & Final Thoughts

Our final part attacks some of the lingering issues:

  • We kill some very evil memory leaks.
  • We add more passable sprites and enhance the minimap by displaying desert sand.
  • We stop the player ship from travelling to the edge of the map.
  • Then I show how to implement night time and infrared in code although we won't bring it in to game play.
  • Finally, I'll add the storyboards for both the briefing and debriefing through mission 5.


Final Thoughts

The code below is the end of the prototype. From this point forward, a developer could continue to add game features and maybe flesh out a new storyline or even a new episode. Eventually, you'll have to feature freeze the prototype and make an important decision: Continue to add the content to the prototype and release a final version using GameMaker. Or move to a custom, more lightweight, engine that implements exactly the features you need and go from there. Since this is a learning experience I highly recommend making this in a custom engine. I may decide to continue this educational project along those lines with C and SDL. We've designed entirely around the object concept, but I assure you that there is a sufficient design by going procedural. Do it!


GML Code

We won't need any new objects for these fixes so let's get right to the code

obj_map: Room End 1

Our map object doesn't automatically free large city background surface even though we call it in Destroy. We need to force destroy when the room ends.


obj_map: Create 4

Add these two sprite indices to the case for passthrough


obj_hud: Draw Begin 1

We'll add a color for the new sand sprites to the minimap


obj_ship: Step 6

Let's add an edge check to block the players ship from going all the way to the edge. We'll respond with a message. This is the whole event including the new changes


obj_hud: Draw 1

This is an example of how we display the night time and infra-red effects using blend modes. This may not be possible in certain HTML5 implementations. In that case, we could pre-process all our graphics with 3 versions (normal, night, red) or we could introduce shaders


obj_briefing: Create 5 (Briefing Storyboards)

This code block expands the briefing storyboards through mission 5. Beyond that, the briefing skips right to the gameplay. Note that the specific sprite names may different from your implementation depending on the order you've imported things in to GameMaker. I'm sure you know that already if you've made it this far.


obj_briefing: Create 6 (Debriefing Storyboards)

And these are the debriefing storyboards through mission 5.