Once this function is called, it repeatedly does several things over and over, several times per second:

Similar documents
Tutorial: A scrolling shooter

COMPUTING CURRICULUM TOOLKIT

Star Defender. Section 1

CISC 1600, Lab 2.2: More games in Scratch

2D Platform. Table of Contents

SPACESHIP (up to 100 points based on ranking)

Create a Simple Game in Scratch

More Actions: A Galaxy of Possibilities

Scratch for Beginners Workbook

Tank trouble 2 full screen english

Space Invadersesque 2D shooter

A card game for 2-8 players play time mins

BF2 Commander. Apply for Commander.

Explore and Challenge:

Add in a new ghost sprite, and a suitable stage backdrop.

A. creating clones. Skills Training 5

Pong Game. Intermediate. LPo v1

Experiment 02 Interaction Objects

In this project you ll learn how to create a platform game, in which you have to dodge the moving balls and reach the end of the level.

GALAXIAN: CSEE 4840 EMBEDDED SYSTEM DESIGN. Galaxian. CSEE 4840 Embedded System Design

Introduction. Table of Contents. Credits

Programming Project 2

C# Tutorial Fighter Jet Shooting Game

DESIGN A SHOOTING STYLE GAME IN FLASH 8

5.0 Events and Actions

HEY! DON T READ THESE RULES!

SPACEYARD SCRAPPERS 2-D GAME DESIGN DOCUMENT

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Battlefield Academy Template 1 Guide

Before displaying an image, the game should wait for a random amount of time.

VACUUM MARAUDERS V1.0

HARRIS WORLD Control Cool Real UP Jump Walk DOWN Duck Walk LEFT Walk Walk RIGHT Walk Walk ACTION Fire Fire

Of Dungeons Deep! Table of Contents. (1) Components (2) Setup (3) Goal. (4) Game Play (5) The Dungeon (6) Ending & Scoring

Let s start by making a pencil that can be used to draw on the stage.

=:::=;;;; : _,, :.. NIGHT STALKER : - COMMAND MODULE. Texas Instruments Home Computer ---;::::::::::::;;;;;;;; (.

A - Debris on the Track

Clone Wars. Introduction. Scratch. In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Introduction. The basics

Monte Carlo based battleship agent

READ THIS FIRST, IF YOU HAVE NEVER PLAYED THE GAME BEFORE! World of Arch, First Days of Survival F.A.Q.

Starting from LEARNER NOTES edited version. An Introduction to Computing Science by Jeremy Scott

SPACE EMPIRES Scenario Book SCENARIO BOOK. GMT Games, LLC. P.O. Box 1308 Hanford, CA GMT Games, LLC

Blend Photos Like a Hollywood Movie Poster

Beginning Game Programming, COMI 2040 Lab 6

Step 1 - Setting Up the Scene

A retro space combat game by Chad Fillion. Chad Fillion Scripting for Interactivity ITGM 719: 5/13/13 Space Attack - Retro space shooter game

Project 1: Game of Bricks

NOVA. Game Pitch SUMMARY GAMEPLAY LOOK & FEEL. Story Abstract. Appearance. Alex Tripp CIS 587 Fall 2014

"The Lottery Shotgun Method:

GAME PROGRAMMING & DESIGN LAB 1 Egg Catcher - a simple SCRATCH game

Let s start by making a pencil, that can be used to draw on the stage.

Advanced Strategy in Spades

Ghostbusters. Level. Introduction:

Memory. Introduction. Scratch. In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

Create a "Whac-a-Block" game in Minecraft

Welcome to Family Dominoes!

Introduction to Turtle Art

Space Smugglers Version 0.9

Creating Journey In AgentCubes

Page 1 of 32. E.T. Table Guide By ShoryukenToTheChin

Down In Flames WWI 9/7/2005

CS 354R: Computer Game Technology

[Title] MINECRAFT CAMP. System Administrator s Guide

Game Maker Tutorial Creating Maze Games Written by Mark Overmars

ApeZone's Battleship Chess. The side with the most points at the end of the last battle is the winner.

Comprehensive Rules Document v1.1

Paul Wright Revision 1.10, October 7, 2001

Tutorial: Creating maze games

TEMPLE OF LOCKS V1.0

The five possible actions from which a player may choose on every turn are:

In this project you ll learn how to create a game in which you have to save the Earth from space monsters.

Creating Computer Games

Girls Programming Network. Scissors Paper Rock!

Microsoft MakeCode for

Alright! I can feel my limbs again! Magic star web! The Dark Wizard? Who are you again? Nice work! You ve broken the Dark Wizard s spell!

Add Rays Of Sunlight To A Photo With Photoshop

Cannon Ball User Manual

American Dad Table Guide By ShoryukenToTheChin

Your First Game: Devilishly Easy

Whack-a-Witch. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

In this project you ll learn how to create a times table quiz, in which you have to get as many answers correct as you can in 30 seconds.

Medieval Wars Alpha Fix - PSP

Video Game Books, Inc.

THE WORLD CONQUEST PLAYER'S MANUAL

Programming with Scratch

The Caster Chronicles Comprehensive Rules ver. 1.0 Last Update:October 20 th, 2017 Effective:October 20 th, 2017

CREATURE INVADERS DESIGN DOCUMENT VERSION 0.2 MAY 14, 2009

Defenders of the Last Colony

Star Trek Fleet Captains FAQ version

OZOBLOCKLY BASIC TRAINING LESSON 1 SHAPE TRACER 1

UNDERSTANDING LAYER MASKS IN PHOTOSHOP

A - Debris on the Track

A - Debris on the Track

1 Shooting Gallery Guide 2 SETUP. Unzip the ShootingGalleryFiles.zip file to a convenient location.

Made by Bla Map War 2 Manual Version 6 ( ) Page 1. Map War 2 Manual

Kodu Lesson 7 Game Design The game world Number of players The ultimate goal Game Rules and Objectives Point of View

Lesson 2: Choosing Colors and Painting Chapter 1, Video 1: "Lesson 2 Introduction"

Chapter 1:Object Interaction with Blueprints. Creating a project and the first level

Kodu Game Programming

Create Your Own World

Transcription:

Alien Invasion Oh no! Alien pixel spaceships are descending on the Minecraft world! You'll have to pilot a pixel spaceship of your own and fire pixel bullets to stop them! In this project, you will recreate a classic arcade game. You'll use Minecraft blocks to simulate the iconic pixelated appearance of older video games. Use the bot to place and remove the elements of the game, detect the presence of a "button" to steer the player's ship, and manage everything in a game loop that runs periodically.

How the Game Works To recreate this classic game in Minecraft, you will "draw" the visuals of the game--ships and bullets- -with blocks. You need to repeatedly draw and redraw these blocks as the game's state changes. That way you can animate the movement of the player's ship, enemy ships, and bullets. In the code given to you, look for the "game loop" function: Once this function is called, it repeatedly does several things over and over, several times per second: Determines which direction the player's ship should move next Starts accepting instructions for the Minecraft bot, which is used for all "drawn" elements Draws the player's ship Draws the aliens' ships, but only every 10th time through the loop Draws the bullet that the player's ship has fired Sends all bot/drawing instructions to the server Adds 1 to a counter that keeps track of how many times the loop has run Waits for a short period

Try playing this game as is. Punch the glass blocks to move the player ship (the emerald box) left and right. The player ship will fire at the alien ships (redstone boxes) automatically. Add the Win Condition As it is right now, the "game loop" function will keep running forever. There's no point to leaving the game running after the player has beat it, though! Let's add a "win condition" to the loop so that if the player has won, the game ends. 1. Drag the above "if-else" block into the loop, in between "draw player bullet" and "change by." 2. Inside the "if-else" block, attach a "game over" function block. For the game over message, write something like "Congratulations, you won!" 3. After the "game over" block, attach a "break" block. This will stop the game loop. Your edited code might look like this:

Once you've added this code to your game loop, try playing the game again. After you beat the game, you should see the game area vanish and a victory message appear. Add a Challenge So far, you can shoot down the alien ships, but there is no danger to you! Let's make the game more dangerous by making the alien ships fire back. Drag the "draw alien bullet" function into the game loop, right after the "draw player bullet" function, so that the loop looks something like this:

Test your game. Notice that the first alien ship will periodically fire a bullet downwards toward the player. Add a Loss Condition The aliens are attacking now, but there's no danger yet; the alien bullet doesn't actually harm the player ship. Let's fix this so the game is actually challenging. 1. Drag the above "if-else" statement into your game loop, after the "draw alien bullet" function. Its conditional detects whether the player has not been flagged as "alive" (i.e. the player has been hit/"killed") in the game's background code.

2. Inside the "if-else" block, add another "game over" block. 3. This time, add a loss message instead of a win message. 4. Add a "break" block next so that the loop will stop running. Your code should look something like this now: Test your game. Now, if you allow the player ship to be hit by an alien bullet, the game should disappear and display a loss message.

Change the Aliens' AI You might have noticed how it is always the first alien that fires a bullet at the player, even if that alien has already been destroyed! Let's make this behavior more interesting, so that it is always a random (living) alien that fires. Scroll down to the "draw alien bullet" function at the very bottom of the code area. It's complex, but don't worry too much about how it works. Find the last section of the function, which looks like this: 1. Find the code block in this section that sets the "alien" variable to "get aliens[0]." 2. Remove the "get aliens[0]" and discard it. 3. Replace it with the "get random alien" function that we have provided you: The code section should now look like this instead:

Test your game. Notice that different aliens fire at the player now! Bonus: Make the Game Your Own Awesome! Your game is working pretty well now. Have fun playing it! If you feel brave, you can play with the game's underlying code and try to make even more improvements, such as... Adding a second "game over" condition: when the aliens reach the ground, you lose. Try checking the value of the "game step" variable. Enhancing the "draw alien ship" and "draw player ship" functions to make more interesting ships. Make sure to adjust "erase entity" as well. Increasing the number of aliens created in the "game setup" function. Challenge: Adding more alien bullets. Challenge: Adding "shields" above the player ship.