Dragon Escape

by njsalzman in Circuits > Computers

258 Views, 1 Favorites, 0 Comments

Dragon Escape

intro.jpg

This will be coded on code.org. The whole basis of the game is to avoid the dragons and capture the ghost a certain number of times to win. you can amaze you friends with this cool game idea that can be changed to your liking

Supplies

a computer

The Set Up

Untitled+Project+-+Play+Lab.jpg

In the begging you have to create the actors.(you are able to change the actors to what ever you want but you have to change some code down the line)

Next you have to change actor 1 and actor 2 size.

Next you have to move actor 2 200 over and 200 down

Next change the speed of actor 1 and 2(these can be changed to make the game harder or easier)

Next make it so actor 2 chases actor 1

Next make it so actor 3 flees from actor 1

Movement

step 2.jpg

first make 4 different code blocks for each different arrow on the keyboard

then under each connect a code block for movement and set it to 10 and set the actor number to 1

The Scoring and Losing System

step 3.jpg

The first step is that you have to make how you lose you have to get the code block that detects if a certain actor touches a certain character set the actor to one and the character to the type of character actor 2 is

Next drag the block that says end game in win and put that under the detecting block then change win to loss (this has made it so once you touch actor 2 your game is over

Next repeat the first step but change the character type to what actor 2 is

Next add score a point in the detect block (this means any time you touch actor 3 you score a point)

Next get a repeat forever block and put a if score = _ block in it change the number to whatever you want the goal to be

Next put in the block you just made a end game as a win block then you are done and can enjoy your game.