Fight Till the Last Breath

by Proprogrammers in Outside > Survival

976 Views, 5 Favorites, 0 Comments

Fight Till the Last Breath

Screenshot 2020-12-07 182458.png
Screenshot 2020-12-07 183557.png
Hi, everyone this is my first project in which I used code.org game lab and block code technic for making this 2D game ,I used this platform as it's easy to code in this way .

Supplies

As I told that this is made using code.org so you must sign into code.org and then go to game lab.

Step 1 Signing Up to Code.org

Screenshot 2020-12-07 182616.png
As I told you that we are going to use this platform for block coding first thing we must do is to sign up there is a option on top right corner to sign in click on that to sign in and then go to game lab.

Step 2 Starting to Write Code on Game Lab

Screenshot 2020-12-07 182745.png
Once we have signed in you can use all features of code.org so, go to game lab and then start writing code using blocks in left side first create some sprites, I created 3 walls to divide the screen in four parts and then I created the player but it won't be fun to play without enemies so, I have created some sprites at all divisions of screen.

Step 3 Giving Animation

Screenshot 2020-12-07 182904.png
As I said before to create some walls for dividing screen player, enemies at each division of screen etc. now all sprites are ready to be created but it won't look good if they are just some square objects on screen so, I added animation using some images of thieves and terrorists for enemies and for player I chose robot's image .

Step 4 Adding Some Functions

Screenshot 2020-12-07 183002.png

We created sprites gave images to them to make game more lively but it would be completely boring if the player isn't moving and controllable by us so we will add some functions to make the game controllable I added some functions which make it more interesting and thrilling game such as you can control the robot's position using arrow keys, if the robot touches any terrorist, tnt, lava or enemy robot the player's life decreases by 1.

Step 5 Testing the Game

Screenshot 2020-12-07 183112.png
Screenshot 2020-12-07 183144.png

Once you have created the sprites added functions then only thing remaining is testing which is done by clicking on run, if it doesn't work the error will be displayed on the screen. To try again you have to click on reset and then make all necessary changes to make the coding working.

Step 6 Final Output !

Screenshot 2020-12-07 183420.png

The most important thing and exciting thing after coding is the output of code, this is why I felt important to show you the output of our survival game. I have made this game just for entertainment and you will find it really interesting and exciting game .

I am sharing the code and game of game-

code- code for game

game- Fight till your last breath