April 29, 2016 Student Spotlight: Glass Tower Ascent
Yiyi Zhang
Yiyi Zhang

I have just completed a 2 month long Unity class with PlaycraftingNYC. I started out knowing next to nothing about C# or 3D modeling, but I learned a lot over the past 8 weeks! My previous forays into game dev involved a ton of design and concept and very little coding ­ first messing around with Flash/ActionScript in the late 90s and now fiddling with a JavaScript game: www.scribbleships.com. I’ve always been a front end girl at heart. But think what fun would be missed if everyone’s caboose stayed planted firmly in their respective comfort zones? Cabooses, in both trains and people, are best when in motion.

Getting Started

Unity is a powerful and highly versatile 3D game engine that has become a must-have for any aspiring developer’s toolbox in the last couple of years. And I couldn’t have asked better teachers than Sam Eng and his TA Roman Sharf. Sam’s background as a game developer, as well as his experience teaching middle school kids the basics of his craft, make him an excellent instructor.

Sam started with the simple stuff and helped us learn some of Unity’s more advanced features by building three small games with us, until we were finally able to each put together an original game of our very own!

To start with, Sam assigned the class some pre­work to get everyone’s toes moderately damp with respect to coding. We were told to “drop any ego” and work through these Code.org exercises.

Code.org is a phenomenal resource because its fundamental purpose is to make coding accessible to everyone ­ specifically the ever so ubiquitous JavaScript. It’s marketed toward children, sure, but the basic computer science, math, and logic principles it develops can absolutely benefit anyone. Its curricula are easily digestible and gamified to minimize the pain of repetitive exercises. After each mini-game/exercise, you can look at the source code of the little program you designed and organically start to recognize, digest, and internalize fundamental elements of JavaScript. Swell!

The best thing about it, though, are the videos that demonstrate how CS and math concepts are found in a vast array of different fields – in making chocolate, dance, gymnastics, car racing…everywhere!

Helloooo Unity

At first, I was apprehensive about messing around with 3D/3D animation. I’m not much of a geo­spatial thinker. Turns out, as with thinking with portals ­ it can be learned!! We covered a great deal of material in a few short hours: creating/manipulating objects, lighting/shadows, and even started delving into physics!

Yi1

Our first HW assignment was to create an interior room of a house. I didn’t know how to use meshes or textures, etc, so this was really an exercise in creative work with simple shapes. Turns out you can make quite a lot using simple shapes!

Yi2

Our first game

was a Flappy Bird clone. We wrote some scripts to control the three major objects: the bird (our illustrious protagonist), obstacles, and an obstacle spawner. It took some time to wrap my head around C# syntax and calling specific functions, etc. but this project gave me a good start!

Here’s my rather daft version featuring a cupcake trying to evade a parade of Kirbys. Inspired, non?

Yi3

To complete the daftness, I added a scrolling background + a couple new mobs. I’m pleased with my silly flappy bird clone: Don’t Eat Me feat. IP Violations Galore. The background features the bloody, devoured corpses of our protagonist characters – the cupcakes.

I definitely had to watch a couple of tutorials on how to add a scrolling background. Surprisingly, even in a 2D game it needs to be added as a texture to a Quad or a Plane to function properly.

Next up:

an Asteroids game that somehow evolved into an assembly line shooter game, starring Joe (yes, of “hello my name is Joe and I work in a button factory”). I enjoyed incorporating some of the new functions, parameters, and techniques that we had learned about that week including:

Random.Range => For randomizing button jitter to make them go outtacontrol!! and for randomizing spawn rate of the buttons

Destroy() => For destroying objects upon certain events (in this case, upon collision with bullet needles)

Creating prefabs (templates) and background.
image

Yi4

For the first time, I decided to make my own 2D sprites of Joe, his needles, and the buttons. I also designed my own background ­ using a combination of free graphics from the interwebs and some hand­drawn ones. #mostpleased

UI Challenges:

I missed 1 day of class and of course it was a critical day: intro to UI. Unfortunate. I puzzled through as best I could by watching the tutorials and made a couple buttons that toggle off obstacles for my next game: Escape from the Museum.

On the plus side, I was pretty pleased to have figured out animations and to have created my own custom animated sprites to go with my museum background.

Yi5

This game features a girl trying to escape from a haunted museum ­evading poltergeists and rather excitable security guards.

Fun With 3­D Environments

We then made a pretty shallow but wide dive into 3D environments. We imported assets, loaded up some nice trees, created planes with pretty texture, then added some raycasting to make objects smaht! And topped it off with some very lovely nav mesh action with levels and mobs that follow the player.

Yi6

I discovered that game dev in Unity is very different from in­-browser game dev with native Javascript. As a game development platform, it comes with assets, functions (”magic” methods + gifts), UI elements, etc. that smarter devs in the past figured out for users. It’s pretty awesome.

Final Project Time!

Before I knew it, it was time for my final project: An original game!

Glass Tower Ascent is a 2P ­versus game written in Unity (C#) where players play as individuals in a minority class, trying to “climb” (jump up) the corporate ladder and get ahead of the competition.

Players can fire writing utensils at each other from below only, to knock down their opposition. Falling debris makes the ascent nearly as time­-consuming and frustrating as actual corporate hierarchy can be.

Watch out when you reach the top!

It was little awkward designing a platform game as someone who is pretty terrible at playing platform games. Makes testing difficult. But you live and learn. 🙂

All in all, this project took 2 weeks from conception to finish.

And here’s how it started out:

Yimissing

I was pleased to have my jury-­rigged multiplayer system (2 sets of key maps, essentially) up and running back in the very early stages when the game was little more than some one­sided platforms with the camera tracking one of the players.

P1 maps to WASD, P2 maps to directionals like so:

Yi8

Then I made the background + sprites! I rather enjoy 2D pixel arting :3 This was my first time doing any kind of 2d drawing and I found it to be very relaxing and not too difficult to pick up.

Yi9

And for a bit of added PvE action, I created a Mob that drops from the top (moving obstacles so it’s like they’re trying to move up a pachinko map) and has a random force range applied to it so it doesn’t drop along the same path each time.

Sam & Roman also helped me write a nifty bit of code that makes the camera pan slowly (a.k.a. lerp) to the player who is further up on the y­-axis (follows the lead player, so that the player who is behind feels pressure to catch up)

Later, I added a “bump” sound that plays when players or mobs bump into each other and wrote some code to determine distances between platforms.

Now it was time to Animate my two PC sprites + make animations responsive to key presses (sprite faces left and right according to key input, or stays motionless) See? Cute little animated avatars that walk and jump:

Yi10

Yi11

As a lifelong gamer, it feels pretty good to have made my very own game! Here it is in all of its Technically Working glory:

Yi12

Now that the base game is done…boy, will there be a ton of tweaking coming up before any kind of “release.” However, I’m confident that the Playcrafting course equipped me with the fundamental knowledge and skills to do my own tweaking and playtesting to get it to a nice polished point. COMING SOON TO ITCH.IO 🙂 In the meantime, my game blog is here.

Thank you Sam & Roman, and thank you PlaycraftingNYC!