Friday, April 3, 2015

Minesweeper

This week I made the end of level rings smaller. A complaint we had during our last presentation was that they seemed too large and didn't match other assets in the game. Just changing the size made it look much better in game.

I removed the bobbing animations from ghost models that replace character models on death. Ghosts should be bobbing to the music... they're dead!

I added outlines to the block and hexagon backgrounds I came up with previously. They look much better now. You can tell they are made up of shapes instead of looking like camouflage.

One issue we had was that after moving the player to a checkpoint on death, the game started up again too quickly. I added an asset for a drum-clap sound and now after four claps the player resumes gameplay (counting them in the way you do with music).

The coolest thing we added this week was a mine.


No, not that kind of mine! A mine-looking thing like this:


Alan came up with this model and I scaled it and colored it to fit into the game. I colored it red because the general rule for our game is that 'red means dead.' I also thought it would be cool to have it spin around and move towards the player (like the spinning spikes). This is an object the player has to slide under.

And now I'm sliding into another week. Thanks for reading. :D

Friday, March 27, 2015

Material Woes

There was more work to be done with cycling through colors this week. Non-technical people can just skip the following paragraph...

First, I modified the update function in our cycling script to prevent renderer.materials from being called with each update. Second, I had to make sure to destroy materials when they weren't needed anymore. Daniel Sanders, a member of my group, discovered that if you don't dispose of materials properly it can cause memory leaking. This really brings me back to the days when I first started learning C++. :D

I was focusing on another course I'm taking (Algorithms) so the above is all I worked on for Ritmo this week. But I did get a chance to start playing a new game. I know it's been out for a while now, but I bought Rayman Legends. Doesn't it look amazing?


This was my first time playing a game in the Rayman series, but it had such excellent reviews I thought I'd give it a try. I fell in the love with the gorgeous art design right away. It's one of the best looking platformers I've seen. Then I quickly got sucked into the addicting gameplay. I love having to free all of your friends and collect enough trinkets to get all of the trophies on each level. They did a great job gradually making levels increase in difficulty. I expect a lot of fun hours will be spent finishing the game.

In short, it's a fantastic. If you haven't played it I highly recommend it.

Ooooook!

Friday, March 20, 2015

Optimization Prime

Ritmo has been having some performance issues. To find the source(s) of the problem we ran Unity's profiler to see where things could be optimized. One section that needed work was the color cycling scripts I worked on.

To fix them, I had to do the following:

  • Make a copy of all the materials that change colors and replace the materials with their copies for their corresponding objects (at runtime). This is necessary because there are only two ways to modify a material's color. The first way is to call renderer.material, but this makes a copy of the material each time it is called (for each object). The second way is to just change the color of the material at runtime and all objects that use the material change color as well. The problem there is that the change is persistent. In other words, it changes the meta file for the material in the Unity editor (which is bad news when you're working with a repository). Instead we created a copy of each material and modified that instead.
  • Reduce the number of prefabs used per platform. Each platform is a multiple of three in length and was made up of 3x1 pieces. That's a lot of pieces for 255x1 platform. Instead I modified all of the platform prefabs to be made up of only three pieces (left, stretched center, and right). This prevented too many update calls from being made.


It was tedious and time consuming work, but now the game is running at more optimus optimal speed.




I had to sneak that picture into a post. I loved transformers as a kid. Happy gaming!