Wednesday, December 20, 2017

Final Project on STI

STI Final Project

Group Member/NRP:

1. Bagas Yanuar Sudrajad / 05111740000074
2. Samuel Marcellinus/05111740000074

1. Game Description

Title

"Zombie Escape"

Objective

Killing enemies, buying weapons, earning cash as much as possible.

Control

Moving player left/right: A/D
Moving player up/down: W/S
Aiming: mouse pointer.
Firing/Choose weapon to buy: left mouse click.
Changing weapon: number button 1,2,3,4,5 (pistol,machine gun, sniper, laser, machine gun).
Openning the shop/pausing the game: B.

Software used

Scratch

Copyright and Disclaimer

All assets in this game was made originally except for sniper, laser, and mini gun designs and the sounds used in this game.

 Assets Sources

https://youtu.be/vJaAy3jmEx8 (Game Over Sound).
scratch.mit.edu (start screen BGM, game play BGM).

2. Game Refferences


3. Assets List

Sprite


Start:

Black Screen on Start












Start Button
Start Button 



Game Play Background:












Players:

Pistol
Machine Gun

Sniper





Laser
Mini Gun










Enemies:

Normal Zombie
Strong Zombie

Mini Boss
Big Boss




















Hearts and Dollar Sign:
Live(s)=1

Live(s)=2  


Lives=3











Digits:
Zero
One
Two
Three
Four
Five
Six
Seven
Eight
Nine





Shop:

Shop


Sniper









Laser
Minigun


White Screen (Bluring Everything Behind Shop)












Game Over:










Sounds:

Game Over 
Dance Slow Mo
Cave

4. Scripts

Start Screen:

Black Screen













When green flag clicked it will appear and when start button clicked (broadcasts "start") it will hide.


Start Button

When green flag clicked, it will set volume to 10%, play the BGM, and show up. It will show costume 1 (yellow) and when mouse pointer is on it it will change to costume 2(blue) and will broadcast "start" if it clikced and stop all the script here.














"Zombie Escape" writing

When green flag clicked it will show and forever switching from costume 1 to costume 2 to costume 1 again and so on and will hide when start button clicked












Gameplay:


Player


Player

When green flag clicked it sets lives variable to 3.
when start is broadcasted it will go to middle left of screen (-213,-3) and set the variable gun to pistol and damage to 2. 
There are 3 foverer loops, and in all of those there are conditional statement checking if shop open variable open equals no (it is to make sure that when we open the shop all the code will paused).
The first forever loop is to make bullet (sprite2) shoted when left mouse click clicked and it sets the firespeed of every gun used. The second one is to substract lives variable by 1 if player (sprite1) touched enemies. The last one is to set the aiming according to mouse pointer, setting the control (A,W,S,D) and guns changing (some guns can be used only it already bought from shop, making its variable equals yes).




















Hearts and Dollar Sign
When start button clicked it will set volume to 5% and forever playing the BGM until the game end (lives are less than  1). and forever it will switch its costume according to the lives variable's value. When we open the shop it will go to front. If lives<1 (the player is dead) it will set lost variable to yes nad hide and stop scripts.

Digits
It sets the digit to show numbers according to cash variable, and where it will be shown in the screen.


Bullet

Bullet

When it starts as clone the first time it does is go back 99 layers. this command is just for to make sure the bullet can't be seen, so it actually doesn't need to be 99. Then there is the ones setting the recoil of the weapons, for instance machine gun doesn't shoot in line, it can sometimes shoot the bullet a bit to the left or right. Move 25 steps is to make the bullet start seen in front of the player and the gun (or exactly in front of the gun). The repeat loop sets the bullet moving speed, the fastest one is the sniper, which is moving 30 steps. After touching enemies or wall it will be deleted.



Zombie

When start clicked it will first hide then forever every 1.2 seconds it will spawn. I will take random number from 1 to 4 and every if the random number taken is 1 it will spawn strong zombie (the chance is 1/4). 

Zombie
It is to make sure that when it start as a clone it will spawn the right zombie according to the zombie variable (strong or normal) and sets the zombie lives. Then, it will show in the right side of the screen, the oordinate where it is spawn is random, (x,y)=(240,-170 to 170). 

Zombie
The forever loop here is contained command to make the zombie aiming player (sprite1), to sets zombie moving speed (strong one is slower), to sets if it touching sprite1 it will be deleted (there are delay 0.1 secs to make sure the player lives decrease first.). If touching bullet (sprite2) its lives will be substract by the bullet damage according to the gun used. Every time its shoted it will be twinkling. This is done by using brightness effect everytime it touches bullet. If the zombie lives reach the value less than 1 it will give the player some cash according to the zombie type and then it will be deleted.

Mini Boss
After the game start, it will wait until 60 seconds first before it starts spawning every 15 seconds. Just like the zombie, it spawn in the random oordinate in the right side of the screen. It aims player 1 (sprite1), if touching player it will be deleted, and if touching bullet its lives will decrease by the damage of the bullet, twinkling, and when the lives reach value less than 1 it gives player 30 cash and will be deleted.


Big Boss
After the game start, it will wait until 120 seconds first before it starts spawning every 15 seconds. Just like the zombie, it spawn in the random oordinate in the right side of the screen. It aims player 1 (sprite1), if touching player it will be deleted, and if touching bullet its lives will decrease by the damage of the bullet, twinkling, and when the lives reach value less than 1 it gives player 50 cash and will be deleted.




Shop:
Shop

When te green flag clicked it hide. When the game started it sets 3 variables, shop open to no, done? to yes, and yvel to 0. Initially, it will always be on the middle bottom of the screen (3,-400). The forever loop is to change the Y of the shop according to yvel variables. B button clicked effect is set here. If shop is opened already then B button will close the shop, otherwise it will open the shop. The ones started when it received shopopen broadcast is to make the shop moving from bottom to the middle of the screen. It adds the yvel valiable by 1.5 ten times and then decreases it by 1.5 ten times also (make it back to zero/still). Setting yvel to 0 is just to make sure that it is really contain 0 value. The same happens when we close the shop. The different is that when we closed we make it moving to the bottom by decreasing the yvel first then adding it untill it reach 0. The done? variable is just to make sure that even if we pres the B button many times, the opening and closing system will still work well.

Sniper
When green flag clicked, sniper variable is set to no, and the shop sniper sprite is hide in the (-105,34) position. Forever, if we open the shop, and cash is more than or equals the sniper price (100), and if the mouse pointer is on it and we click the mouse left click, it will decrease the cash by 100, setting the sniper variable to yes (it can be used now), and hide.


Laser
The same goes here, just like the sniper one. when green flag clicked it hide in its position in (8,124), and forever, if we open the shop and our cash is more than or equals 250 we can buy it then it will hide. Later if we open the shop, the items we have already bought will not show.

Mini Gun
Just like the others two, again, it hide in its position when the green flag clicked and will show up if the shop is openned and the gun haven't been bought. And if we have enough cash we can buy it by clicking it while the shop is open and it will decrease our money by 300 and set the minigun variable to yes, then it will disappear.

White Screen

When the shop is openned all the gameplay will be paused and everything behind the shop will be blured by a white screen. It done by make the white screen appear when the shop is openned and set the ghost effect (transparency) to 60%.

Game Over
The game over screen consist of "Game Over" writing, and black screen behind it. It done by make it hiding all the time in game, and just when the player lose, that is when the lives < 1, and lost variable is set to yes, it will appear, game over sound will be played until done, and the everything in the system will be stop.


5. Gameplay

Controls:

Moving player left/right: A/D
Moving player up/down: W/S
Aiming: mouse pointer.
Firing/Choose weapon to buy: left mouse click.
Changing weapon: number button 1,2,3,4,5 (pistol,machine gun, sniper, laser, machine gun).
Openning the shop/pausing the game: B.

Here you can try the game.




Least but not last, we also have uploaded on youtube our video about this game, about the gameplay and how it made.





That's all about my Final Project on STI, thanks for visitting this blog and watching the video. Hope theese can also help you all to learn more about scratch. If there's anything to ask or tell, just comment below :).

No comments:

Post a Comment