Skip to main content

Unity Tutorial 03 (Ruby's 2D Adventure)




Unity Tutorial 03 (Ruby's 2D Adventure)


This was the third part of a project called "Ruby's 2D Adventure".  Continuing on from the last tutorial I did,  I decorated the world and made it more like a game. In this tutorial I added more to the gameplay itself, I started to add collectables in the game which were health add ups and those health add ups were strawberries. In this tutorial as well I learned how to add another important element of a game which is Triggers. And these are the things that allow the characters to collect things which are the strawberry health add ups. 

The way how I was able to make the triggers were, that I made a collectable script, enemy controller and a damage zone script in Visual Studios so that the character would be able to pick up the strawberries on the map, make the enemies move back and forth and do damage etc.

In the other tutorial, I applied the same theory as what I did with the collectables but I used it this time to be able for the character to take damage from certain danger zones.  I also extended that by adding enemies in the game that walk back and forth on the map to make it a bit more challenging.

In the next tutorial, I do next week, I hope to learn how to animate the character and enemy sprites which make them move their arms and legs and not just let it be a picture moving by itself. And I also want to know how to make projectiles shoot from the Ruby character to be able to kill off the enemies.


Enemy on the screen

Player Controller Script

Health Collectable (Strawberries) Script

Damage Zone Script

Enemy Controller Script

The Damage Zone which is a group of bees

Strawberries scattered across the map




Strawberry as a prefab

Comments

Popular posts from this blog

Unity Tutorial 04 (Ruby's 2D Adventure)

  Unity Tutorial 04 (Ruby's 2D Adventure) In this tutorial, I learned how to add sprite animation to my characters so that it gives my characters the ability to move their arms and legs to make them more realistic and I also learned how to fire projectiles at enemy characters to kill and stop them from moving and affecting Ruby.  I learned how to use the animation window, this was the first time I had ever used the animation window it was all new to me, I was just playing around with it at first to get used to the controls. I found some difficulties in trying to get the projectiles to actually shoot, I thought for some time the code was perfect. I put in the code the right way but when I did that, every time I tried to shoot the projectiles the game suddenly freezes which was a problem for about an hour. But I finally fixed it since there was a tiny bit of code misspelt. That was the first problem I had making this game. The things I want to learn in the next tutorial are lear...

Alpha

  Alpha  This is my progress, I have updated the HUD and I added a few more features in the environment What is going good? So far so good, the game is coming along well. There are a few scripts I put in such as collecting coins, player movement, environment design, generating random levels and level boundaries.  The Technical Difficulties  But there are a few technical difficulties I am going through which is every time I try to put a rigid body component into my player when I added the jump feature into my player controller script, the player for some reason falls through the map and I tried many times trying to fix the issue but I will try my very hardest to fix it. I also need to add in collision detection with the obstacles and when the player does collide with one of the obstacles it will say game over and you have to restart again. Those are some of the difficulties I am facing, I will try and reach my lecturer or one of my peers in class to see if they know t...

Introduction to a Future Success

  Introduction to myself :)  This is me Nasim Slavotic :) Hello! My name is Nasim Slavotic, I am 20 years old and I am now a 2nd-year student in TUDublin Blanchardstown doing Creative Digital Media. I am from Dublin and I work part-time in my dad's butcher shop here in Blanchardstown in Coolmine near the post office.  What are my hobbies?  In my free time, I like to go to the gym. Also, I like to go out and take pictures with my camera and make videos on my Youtube channel (NaSiM101) which I took a break from for a while from the pandemic but I do love to brainstorm new ideas for videos and discover new trending things. I also love going out with my friends but now I am starting to go back out again since the pandemic had closed everything before but now everything is coming back to normal slowly but surely. When I'm bored I like to head on Photoshop and Illustrator and just make whatever comes in my mind.  https://pxhere.com/en/photo/1621191 Favourite Foods...