Unity (Session 1,2) Ruby's Adventure

 Unity is a versatile software that works with C# laguange to develop games 2D or 3D. This software is also used for creating AR(Augmented Reality), MR(Mixed Reality), VR(Virtual Reality).

This application is supposed to play a major role in creating the metaverse. 

The UI is very intuitive and good beginners can learn easily in a short period of time and can create basic 2D games easily.


We started the session by discussing the same information in class and looking at the unity layout. We had projects handouts from the canvas so we could know what are we building. The first project is a small 2D game called Ruby's Adventure. 

The link to Project handout Ruby's Adventure 

To start we created a project using a 2D template. We imported the tutorial resources (project files) into the assets folder in unity. We had to install some packages from the package manager. We installed a 2D tilemap editor, Sprite, and Sprite editor. 

Thereafter we created a new scene and saved it in the assets scenes folder. Then we imported Ruby our character into the scene and turned that png into a sprite and dragged it into the main scene. After this, we had a short explanation about coordinates in 2D and 3D and how they work, and their importance. We created a new script folder in asset and added a c# script onto Ruby. We opened the code and learned about various functions and variables and how it helps to make Ruby interactive with the keyboard. After some hassle, we were able to move ruby on the x-axis and we were given the task to do the same on the y-axis. We learned about frame rates, motion per unit time, and how to script them. 


The other part was interesting because we had to design the environment. We created a new tilemap(installed package) and added a new tile to it. Tilemap is basically a grid in which our sprites of environment can be placed easily. We assigned a sprite from the asset folder to a new tile and added it into a tile pallate which exactly works like a brush tool in photoshop. We can add any sprite in tile pallate and brush it on tilemap keeping in mind the pixel ratios.

We got more excited when we were able to design the whole environment just by using this and providing sprites. We can cut up any sprites in wanted parts and make it a new sprite from the sprite editor. which was of great help. We painted our whole environments like this. Keeping in mind the order of layers and pivots of the sprites.

This part was very crucial because it cuts corners to much work. We came to know about prefabs. Prefab is basically a folder in which we can add any game object from the hierarchy and it would be saved with the same settings so we can multiply or add any components to it and this would be applied to all same objects without copying and pasting each thing in all of the objects it would take a load of time if there were many objects. 

Then we learned about world interactions and blocking moments. The physics systems play a major role in games to make them believable. We added Rigidbody 2D component on Ruby and started the play mode ruby fell down which insures the component. We changed the gravity to zero so ruby doesn't fall. We added colliders and box colliders to ruby and other objects to ruby can interact with them. We faced the jittering issue to overcome this we used coding. Then we added a tilemap collider which creates boundaries so ruby can not walk over it and it can make more sense.

The last part of the Session was the interactions and collectibles. This was mainly code based part in which we had to give Ruby a health status and drop a collectible item by which Ruby's health can increase. We added a new script to the collectible health sprite which was a strawberry. We mainly worked on code in this and added a trigger so it can add health to ruby. We added a destroy function so when it interacts with ruby it can disappear making sure we collected the health.    


Comments

Popular posts from this blog

Degree Project Ideas......

Making of the Planets..

The Davinci Result and Part 1 Post Production