I published the 2D mobile game I have been working on to the play store. The process was fairly simple.
You create a key store file for the game and then build the game for android. Create a google play account and add a new project. After the game is approved it will be added to the game store.
With the player moving around and aiming it is time to get them firing.
The first thing I did was add a reticule to the center of the screen. To do this I used a custom asset called Filebase created by GameDevHQ. From Filebase, I downloaded a reticule pack and chose the one I liked. I then created a UI image and added the reticule image to it.
I have my player moving and now I need the camera to follow them.
The first thing you can do is set your camera to where you want it and parent it to the player. This will get the camera to follow the player.
In unity, you will find that you will work with either local space or world space.
World space is the position of an object in the overall space of unity. Think about when you add a game object to your scene in unity. That game object will be using world space. If you zero out its position it will be in the center of the scene.
The observer design pattern is a behavioral design pattern that allows an object to notify another object about changes to its state. This allows objects to subscribe and unsubscribe to events happening from objects in an application or game.
As an example, I have a scene create in unity that has three cubes.
The command pattern is a behavioral pattern that allows you to record the actions or events of your application. A good example of this is in tactical games when a player can plan out multiple moves for multiple characters and then play them out and rewind if they are bad moves.
To set up an example of the command pattern I have set up a simple scene with three cubes and some buttons.
Object pooling is a design pattern that will allow you to reduce the amount of garbage collection you have when working with instantiating multiple objects. One of the easiest examples of when this could be used is for bullets in a shooter game.
To set this up you will create an empty game object that will be the pool manager for your game. You will also create the pool manager script and attach it to the pool manager game object. …