Posts

Showing posts from November, 2020

CATCH THE CRAB

Image
  In this blog, we will try to create a simple point and shoot game. We will be needing the following assets: First, place the crosshair and player in the main game scene. Design the game according to your choice. Since we will use the crab as our enemy, we will use a beach background. Make a script and copy the code below. In this example, we named the script PointAndShoot. Add this as a script component of the Main Camera . For creating the projectile/bullet prefab, drag the asset to the scene panel. Add Rigidbody2D and Circle Collider 2D as a component. Drag it back to the asset panel and you'll see the prefab of the projectile is created. The left crab is the regular asset, the right crab is the prefab asset. Do the same for the web/bullet asset. Create an empty scene and name it as PlayerHolder. Make the player as a child and add another empty scene named bulletStart. Place the bulletStart just right into the player canon. This is where the web/bullet will come from.  Now, ass

SIMPLE MAZE GAME

Image
  Now that we have learned most of the basics of using Unity, we will try to apply these concepts and make a simple maze game. Layout your desired maze design. It should have a player, enemies, hearts, two canvas texts containing "GAME OVER" and "SAVE", and a life display at the upper center. Example below. Now for the scripts: PLAYER. Player Script and Life Script. Player Script Life Script ENEMIES. Assign positions for the movement of the enemies in the game. Done previously in this lesson . Refer to the robber movement. HEARTS. Create a parent for the hearts. This is where we will add the Life Counter Script. 6 hearts. 3 for the actual maze. another 3 for the life display. Life Counter Script And we're done. Just make sure to assign all Game Objects to its corresponding variables (look at the Inspector Panel) to make the script function accordingly. The game should look like this.