
Jeffrey
Me
Play-Tester
James
DRAGON SCALES UNITY GAME
November-December 2018
Dragon Scales is a three level Unity game I created with two other students over the course of five weeks for CS146: Introduction to Game Design and Development’s final project. Our game ultimately won the award for best visuals at the Stanford Games Showcase. It is a puzzle platformer where a baby dragon that is too young to fly must solve puzzles and avoid drowning in order to get to the top of a mountain where its family is. We wanted to create a visually engaging game that balances challenging puzzles with intuitive functionality.
My primary contribution was creating the game’s visuals, which included working on shaders, creating models and animations, creating particle effects and writing scripts to ensure the visuals behaved correctly. I used Autodesk Maya to create and rig models, and SubstancePainter to texture them. Everything else was done in Unity.

CREATING A SIMPLIFIED LEVEL
To focus on implementing the most important functionality first, we initially created an incredibly basic version of our first level. I primarily focused on defining our game’s aesthetic, working on the water shader and building necessary models. I also collaborated with one of my other teammates on making the dragon move (incredibly derpily at this point) in response to key inputs. I will go into more detail on how I did these things in the following sections.


DESIGNING THE LEVELS
To create our levels, we first designed them on paper, which turned out to be a surprisingly time consuming endeavor. Our goal for the first level was to introduce the user to the basic mechanics of the game, namely pushing objects, save points, riding on floating objects, burning things, and and causing water to drain. Our goal for the second level was reinforcing what was taught in the first level and introducing more complicated puzzles. We also planned a third level as a stretch goal which introduced harder puzzles involving ice, though ultimately we were only able implement the first part of the third level.
![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|
![]() |
MODELING AND TEXTURING
I did all the modeling of the levels and interactive objects in Autodesk Maya and all the texturing in SubstancePainter. The level models themselves were relatively simple paths for the dragon to follow. I also created lower poly versions of the levels that would be used as the ground's collider. However, in retrospect, relying on mesh colliders may not have been the best strategy since dragon tended to clip though them. Creating levels with more consistent shapes or limiting the dragon's movement via script may have been more effective.
I also created a variety of objects like rocks, logs and bones for decorating the level and for use in puzzles. In order to keep the game’s poly count low, I made both detailed and low poly versions of all the models and then baked the normal maps of the detailed models onto the low poly models.
I made nearly all of the textures in SubstancePainter and exported them to Unity. Because I had to create many similar textures for the various models, I also created some custom smart materials in SubstancePainter to make texturing the levels, the rocks and the bones more efficient.

RIGGING AND ANIMATING
To create the player character, I first drew a 2D reference image and then used that to create the dragon’s basic shape in Maya. In order to make the dragon move, I first rigged the dragon in Autodesk Maya and then spent an annoyingly long amount of time making sure the skin was weighted correctly. From there I used keyframe animations in Maya to make, idle, walking, fire breathing, pushing, and jumping animations. The animations were exported to Unity and I altered the player movement scripts to trigger the animations as needed. I specifically designed the fire breathing and pushing animations so they could be combined with the walking animation in Unity to cut down on the number of animations I had to make.
I also altered the dragon's model to create an adult dragon and made a flying animation for it using the same method.

WATER SHADER
Because water was so common in the game and therefore needed to look good, we decided to create a custom shader for our water. No one in my group had written a shader for Unity before so a teammate and I collaborated on it. My teammate first wrote the basic shader which made the the water appear transparent and then moved its vertices over time using a noise map. To be frank, I then messed around with a bunch of different water shader tutorials until I produced a shader I was happy with. Ultimately, I added texture maps to the shaders to alter the material's normals, then used a noise map to distort the normals to imitate water flow. To create the appearance of transparent water that attenuates light, I made the shader read in information from the camera depth buffer to calculate how far light travels after hitting the current fragment. To use this information to affect the color of objects underwater, I added a grab-pass to get a texture of what had been rendered behind the water before the water rendering process started. I then sampled this texture for each fragment and altered the emission color based on how deep whatever behind it was underwater. Finally, I made the water appear to refract light by distorting the sample of the water's background that I got in the grab-pass.
I also slightly altered the water shader to make an ice shader for our game.

SOFTWARE CONTRIBUTIONS
Besides, making sure the animations and particle effects were triggered correctly, I also implemented the scripts for many of the interactive objects, including burnable objects, water draining/rising, and boulders causing water levels to rise. I did my best to make the scripts as modular as possible because of how often interactive objects were reused in similar situations. Additionally, I wrote the scripts (and the visuals) to control the dragon’s tutorial speech bubble using an event system.
I also did some work on the dragon’s movement script. Since two of three levels we created were circular, I created a script that constrained the dragon’s movement to a circle around a given point and rotated the dragon so it was always tangent to the circle. Another challenge with the dragon’s movement was the fact that the dragon would be walking on an uneven surface, which often caused the dragon to tip over. We had to experiment with limiting how much the dragon could rotate by adding torque in the opposite direction of its rotation on every update. Additionally, to get the dragon to only jump when it was touching the ground, we had to draw a ray from the dragon's feet to check how far off the ground it was.

PARTICLE EFFECTS
I created a variety of particle effects including water splashes, snow, and checkpoints, but the most complex was the fire effect. For the fire particle effect I created a simple flame texture sheet and then layered multiple particle effects to get the right look. The particles also have colliders on them to make the fire responsive to the environment. The checkpoint particle effect was implemented in a similar fashion.