Introduction to Game Design and Developtment

Get Louis

 Sample game for activity 1



O B J E C T I V E 
HELP HARRY (THE CHARACTER) TO SAVE LOUIS FROM THE PIGEONS BY JUMPING TO AVOID AND DEFEAT  THEM.

Jump: Space bar
Move: left and right arrows


STEP BY STEP TUTORIAL HOW TO MAKE A GAME IN UNITY(2D)

Introduction

Unity is a cross-platform game engine for creating games in both 2D and 3D. Unity supports building games for many platforms such as iOS, Android, Windows, PlayStation, Oculus Rift, and many more.

After downloading and installing unity with the compatible version to your unit. Get ready and explore the tools and know the function so you will be able to follow this tutorial.
-----------------------------------------------------------------------------------------------------------------------------------------------
As I create my new project and set it in 2D, I put the images that I needed in creating such as the characters and the setting ground.



I move in scene and dragged the ground, and the characters inside the box and arrange them on how it is supposed to look in the game. For the ground, add the Box Collider 2D Component and for the main character. Add the Box Collider 2D component and the RigidBody 2D. After that we can finally open a c# script by right clicking on the assets panel - click create - then c# script, and that will bring us to visual studio.



This is the code for you to able to move your character left and right.


And now that your character is moving left and right. We will do the coding for jumping which will make the first code as a parent  for our second code. Make sure to create another c# script, and that will bring us to visual studio again.


You are now able to make your character jump but as long as you hit the spacebar it goes up, and now we we're a limit for it. Now open both of the c# script so we can edit it.



Once you finished debugging and typing the codes, you can go back to unity and the speed to 5 and jump to 450

That's all. Thank you for reading it. God Bless.



Comments