Remember John? He’s paired with instructor Jason as part of Game-U’s Accelerate program. To learn game design, coding, and 3D modeling, John’s been working on a sidescroller game that involves customized collectible models and a dash of patriotism.
In the past, John modeled 3D numbers in TinkerCAD – a web-based modeling tool – and imported them into his game for the player to collect. Today, John used TinkerCAD to import the letters L, I, B, E, R, T, and Y into his Unity sidescroller. As the player runs along the game path, he uses his abilities to collect the letters. Check out the environment background! Recognize the American flags from the last lesson?
To make the game consistent, John changed the Game Objective message at the beginning of the game to tell the player to collect all the letters rather than all the numbers. So the player could complete his objective, John coded the letter models as collectibles. While he ran into some trouble with the letter I, a bug that will keep for another day, he and Jason used comments to fix a second bug – a rotation problem that caused the letters to move in a way John didn’t want them to. Since each of the letters had a different center point, setting the models to “rotate” made them rotate around a pivot point rather than in place. Comments to the rescue! Comments, used by game developers and software engineers to explain code in their program, are lines of text that the computer ignores. By changing the rotation code into comments, John caused the computer to stop executing that section of the program. Problem solved! Next week, the guys have plans to make all the letter models a consistent size. Plus, they want to add a “Congratulations!” message at the end of the game if the player succeeds in collecting the letters.
Thanks for updating us on your progress, John. You’ve got a cool game in the works! Jason will show you all the ropes when it comes to the Unity gaming engine. Once you’re finished, we’re looking forward to playing your game for ourselves!