We’ve got a working game, but we’re getting tired of watching cubes shoot other cubes with cold medicine. It’s time to swap out these placeholders with real assets.

But, even though our flying cubes and capsules are pretty drab, compared to our aspirations, they are a much easier thing to…


For our game, we want to shoot at enemy ships. We do not want to shoot at only one, though. We also do not want to shoot at five thousand of them all at once. We need a way to spawn a number of enemies that is challenging but not…


The ability to create game objects for the player to to destroy is a key component of this game. At this point in development we have the player object, the enemy and lasers. So, we now need to build a function that will create the enemy ships. Because, no enemies…


Now that the Enemy gameObjects can be destroyed with collisions and fire from the Laser, we’re now going to add lives and damage for the Player.

The process for this is a simple one. Basically we want to give the player some lives that can then be taken away as…


We have a ship. We have lasers. We have enemies to shoot at with those lasers. Now we need things to BLOW UP when they are hit. Enter trigger events.

For this to happen we are going to need for the different prefabs to recognize when they run into each…


…in the game, not in life, of course.

To continue developing the space-shooter game we’re going to add enemies. To start they are just going to be cubes, like our main character, and they will be what we’re shooting at throughout the game as we progress through with play.

We…


Put simply, a cooldown system is used to restrict the rate of fire that the player is capable of. Without one the player could just fire as fast as they are physically capable of or that the hardware they are using will allow. …


In my previous article I mentioned spawning the Laser from the Player object. Here we will talk more about spawning, or instantiation as well as the process for getting rid of objects that are no longer needed or are no longer in view of the player or the game view.


With this article I am going to continue with my build of a space shooter game and set up the laser for my player object.

First we set up the object that will represent the laser in game, a 3D capsule and naming it Laser. We then create a prefab…


Pseudocode
“ A notation resembling a simplified programming language, used in program design.”

That is the shortest definition I could find that covers the basic idea and nothing more. There are plenty of other definitions, some of which are far, far more detailed than the one I have presented here…

David Little

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store