So I’ve decided to start a new tutorial series on how to create a Pac-Man Clone in Unity 5.5. The tutorial like all others can be viewed on the Weekly Coder YouTube channel. You can click the link below to watch.
Be sure to stop by weekly for new videos in the series.
Below are the assets available for download.
So I’ve been working on a game to release to the new AppleTV store and found myself needing some artwork. To be more specific, I needed an image of the new Siri Remote so that I could label the buttons for the players.
In fear of my app being rejected for using any of Apple’s own artwork, I created my own drawing to represent the new Siri remote for the AppleTV.
Please feel free to use this however you like. There are 2 attachments. One is a PNG and the other is PSD.
Great little script for Unity that makes a LineRenderer component shape into a circle or ellipse, given the number of line segments along with x and y radius.
Earlier today I stumbled upon a perfect little script for extracting audio data from an audiosource component in unity. It does all the calculation for getting the RMS value, the decibels, and frequency.
This script can easily be applied to make things behave to the music being played in the Audiosource component. Like making an object bounce or move back and forth with the music.
Don’t worry, this isn’t going to be a whole Trig class. I will however, go over one very useful trigonometric function that is easily overlooked by beginner, and even veteran game developers. The Sine Wave. Hopefully this will fuel your own curiosity to learn more about trigonometry and how applicable it is to the world of game development.
If you know what the Sine function is, fantastic, if not, I’m sure you’ve heard the term. You may have encountered it in high school geometry or trigonometry, and it’s applied in just about every field that involves some kind of math.
Sine waves are a graph of the Sine function, and given a basic form, as the input value changes, the output will oscillate between 1 and -1. Here’s what that looks like:
Note: You may notice that the sine wave perfectly maps to a circle of radius 1. That form of circle is called a Unit Circle. Understanding it is helpful but not necessary. As I said this is not a trig class. Moving on.
While working in Unity I found it difficult to figure out how to get an object to rotate. If you’re reading this, you probably did too. Right now I’m just talking about 2D game object rotation. The concept works in 3D as well, just turn on a different axis, but I won’t go into that here.
If you don’t feel like reading the article and just want the Full Script… skip to the bottom.
Add this to the property section of your class:
public float degreesPerSec = 360f;
This will be the variable that tells the script how fast to rotate around the axis. It’s in degrees per second. Feel free to play with the number as see how it affects the rotation speed.