Ship Shooter 1.0 Android

Ship Shooter Android on GitHub

Ship Shooter on Google Play

I have officially put Ship Shooter on the Google Play Store! Right now I consider it Alpha Testing, but the testing will be open Alpha so that anyone can download and play.

Please, if you have any feed back let me know. It’s not perfect, and I doubt that it ever will be. The reason that I am doing this is because I want to get more education and have more experience with the game development production pipeline. I have already learned a lot about pushing to Android and some of the problems that you can run into when it comes to conflicting APK’s. It is very easy to have conflicts, just having the same version number will not allow it to be published.

screencap
screenshot of ship shooter

I am very excited to say that I have an app on the Play store, and even more excited to get some actual feedback on this game! This started out as something I spent a couple hours on one day, and then rolled into me constantly tweaking it and trying to add more features. Definitely expect some more from me on this game soon, and hopefully one day I will be able to look back on this moment with a smile on my face.

Thanks for checking out what I have to say today

Best regards

-Ben Hoffman

Random Distribution Demo

Random Distribution Demo on GitHub

random demo screen capThis is a school project that I did a lot more than I had to do. The main goal of this project is to show my understanding of using different random distributions in code.

I used Perlin noise to generate the terrain, and I can change it to whatever kind of shape I want just in the editor. For the dinosaurs, I used a non-uniform distribution to make it so that there are more towards the front, and less in the back. The leaders(little animated guys standing on two legs) are scaled in the Y axis using a Gaussian distribution. The walk pattern that they have is also randomized to the left and right a little bit. The trees and rocks are just randomly generated within the bounds of the terrain itself. There is a problem with that which I have not fixed yet, which is that they spawn inside of the rocks and other things too.

What made me go above and beyond on this project, was that I turned it into a small game. I added a first person controller from Unity, and gave the player a basic shoot/reload sequence.

For the shooting I used ray casts. Each dinosaur has 3 hit points, and on the third hit they are destroyed. To play the animation of the small explosion going off, I used the RaycastHit variable’s point property to make a new explosion wherever the raycast hit.

I also did more than I had to when it came to aesthetics. I added in rocks around the border of  the terrain. Because the terrain is generated randomly, and the Z value will always be different, I had to make a small script so that every time the game starts, the transforms of anything with that script on it will be set to the terrains Z value at the X and Y coordinates of that object.

All assets that I imported or used in any way for this project are listed in the documentation file for it on GitHub.

Trigonometry Demo

Trigonometry Demo on GitHub

Trig Demo on YouTube

trig demo screen capThe is a simple little demo that I did for one of my programming classes which shows that I know how to use basic trigonometry in code. There were two main goals for this project.

  1. Have the hand on the clock follow the mouse cursor through code.
  2. Have the numbers of the clock be generated through code as well.

To have the mouse follow the cursor hand I used the following code:

void RotateToMouse()
{
// Gets the mouse location from the screen
Vector3 mouseWorldPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
// Use the Mathf.Atan2 function to get the angle at which we need to rotate
float angleFromCenter = Mathf.Atan2(mouseWorldPos.y, mouseWorldPos.x);

// Since the angle input from Atan2 is returned in radians, we have to
// convert it to degrees in order to use the Quaternion.Euler method.
float degrees = angleFromCenter * Mathf.Rad2Deg + 180;

transform.rotation = Quaternion.Euler(0, 0, degrees);
}

As you can see from the YouTube video, both of my goals were achieved. How I generated the angle interval for between the numbers is like so:

angleInterval = (-1) Mathf.PI / ((numberOfObjects) / 2);

The reason that I multiplied by -1 in order to get the numbers to go in a clockwise direction when instantiating them, instead of a counter-clockwise direction.

I also have a float called startAngle, which is (PI/2), so that the generation starts at the top like a clock would. Obviously this is adjustable through the code.