Writing the Level Creator

Although you could create a fancy 3D graphics version of the level creator for the Blockers game, one thing any good tool developer realizes is that tools need to be functional and written quickly. Why spend all the time making a fancy 3D graphics version, when you can simply use the WinForms controls to get the job done easily? To get started, load the Blockers solution file, right-click on the solution in Solution Explorer, and click Add New Project. Choose a WinForms project, and call it LevelCreator.

This step automatically generates some code, so open the form1.cs file in code view (not in designer view), and replace the automatically generated variables with these:

 private static readonly Color[] BoxColors = {Color.Black, ...

Get Beginning 3D Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.