Animation & Games Module

Slides:



Advertisements
Similar presentations
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
Advertisements

Create a Simple Game in Scratch
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Create a Simple Game in Scratch
Breakout in Greenfoot Barb Ericson
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
This game is loosely based on the Whack-A- Mole arcade game.  Each game starts with 45 seconds of play.  Moles randomly pop out of holes on the landscape.
Game Rules Implementation Lecture 5 1. Revisit 2  Lab 4 – Other Input Methods  Touches Basics  Relationship between TouchesBegan, TouchesMoved, and.
CSE 113 Week 5 February , Announcements  Module 2 due 2/15  Exam 3 is on 2/15  Module 3 due 2/22  Exam 4 is on 2/25  Module 4 due 2/29.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Game Design Creating a game called PING Phase 3: Steps for building basic game.
Game Maker Day 2 Making a Maze Game.
Locally Edited Animations We will need 3 files to help get us started at
VIDEO GAME PROGRAMMING Video Game Programming Junior – DigiPutt INSTRUCTOR TEACHER’S ASSISTANT.
©Robomatter – Distribution or copying without permission is prohibited. 3B STEM Computer Science 1 ©Robomatter – Distribution or copying without permission.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
GAME:IT Pinball Objectives: Review skills from Introduction Introduce gravity and friction Introduce GML coding into programming.
Programming Video Games
Game Maker Terminology
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
By Mr. Putnam. In Catfall, the goal of the game is to touch the falling cats with the mouse. Every time you touch a cat, your score goes up by one point.
VG101 RECITATION 8 By TAs. CONTENTS Brief review of class Strategy for assignment 9 Questions about assignment 7, 8.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
GAME:IT Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a simple.
Learning Javascript From Mr Saem
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
School of Computer Science Space School 2015 Programming a Lunar Lander Game.
Scratch Programming Cards
Creating a UFO Rescue Game in Alice
Sound and more Animations
The Laws of Exponents Animated floating petals (Difficult)
Create a Halloween Computer Game in Scratch
MOM! Phineas and Ferb are … Aims:
Intro CS – Screens and Variables
Scratch for Interactivity
Setting up Categories, Grading Preferences and Entering Grades
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
Exploring Mathematical Relationships Module 5: Investigation 2
Barb Ericson Georgia Institute of Technology June 2007
Control Structures
Creating a UFO Rescue Game in Alice
Scratch for Interactivity
Project Snake. Project Snake Snake For this project, we’re going to make Snake This includes Making the overall game logic (using a 2D array) Handling.
به نام مهربانترین In the name of the most compassionate
The One Where You Scratch
Fly-in marquee lights at picture entrance (Intermediate)
PC02 Consolidation Loading a witty quote…. PC02 Consolidation Loading a witty quote…
PC01 Term 3 Project Snake. PC01 Term 3 Project Snake.
Tank Game Part 6 of 6.
Arrays
Adding a paddle (1) We now have a code, which will run forever and just have a ball bouncing around the screen until we shut down the program. To make.
Breakout in Greenfoot Barb Ericson
موضوع بحث: تعریف علم اصول جلسه 43.
اشاره به نتایج قیاس های فقهی گاهی، حکم شرعی است
علم اصول، «نفس قواعد» است نه «علم به قواعد»
Notes Solving a System by Elimination
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
Game Over Module 4 Lesson 2.
Creating a Simple Game in Scratch
قاعده لا ضرر، تنها در شبهات حکمیه جاری است
جلسه 34.
Catch Game Cards Catch Game Cards Make a Card Go to the Top Fall Down
1 ج : اشاره بعضی از اصولیون به تعریف ترکیبی آخوند با «یک لفظ»
Presentation transcript:

Animation & Games Module Project: Breakout Exercises: Bricks (easy enough) Ball & Paddle (trickier) Breakout (for A+ kids only)

Exercise 1: Bricks Your goal in this assignment is to create a breakout game. We will start by making the bricks. There are NUM_ROWS rows of bricks, with NUM_BRICKS_PER_ROW bricks per row. You should write everything in terms of these constants, and use loops and functions to avoid redundant code. More tips in the exercise tab!

Plan Bricks Exercise: i = rows; J = columns. You’re given these global variables Start function i = rows; J = columns. Look closely at lines 25 & 26 On line 25 it’s saying to create each of the rows one by one, with each rectangle being placed at X: BRICK_SPACING + J+1 (which is the amount of spaces already created for the row) + BRICK_WIDTH*j (which is the total width for the rectangles already created), Y: the rectangle gets placed at BRICK_TOP_OFFSET+BRICK_SPACING + i+1(which signals that the a space above the rectangle of a certain height, plus the amount of spaces already created for the column, and adding to that the total height of the bricks created in that column) Adding colors

Exercise 2: Ball & Paddle Overview Add the ball and paddle. The ball should bounce around the screen. The paddle should move with the mouse. Add Ball and Paddle The first step is to add the ball to the center of the screen and the paddle to the bottom of the screen. The next step is to get the paddle to move when you move the mouse. The paddle should be centered under the mouse, and should not go offscreen. Move Paddle, Bounce Ball The next step is to get the ball to bounce around the screen. We may have done this exact problem before...

Plan Ball & Paddle Part 1: Add these global variables Add to Start function (the -20 on line 23 is to raise the paddle a little above the bottom of the canvas paddleMove function – see -20 on line 32) draw function

Plan Ball & Paddle Part 2: Function checkWalls Remember Teleporting Ball?? Copy/paste from there. Copy/paste drawBricks from Ex. 1

Exercise 3: Breakout (1 of 2) The last part of the game is to get collisions working. You should remove bricks when the balls collide with them. This is VERY similar to bouncing the ball. You just need to use the getElementAt(x, y) function to see if there is an element where the ball is. If the element is not null, then you can remove it with the remove function. You also need the ball to bounce up if it collides with the paddle You want to check the four corners around the ball to see if there is an element there.

You Try: Breakout (2 of 2) You want to check the four corners around the ball to see if there is an element there. Last, there are just some miscellaneous things you can do: Pause the ball when it gets reset until you click. Kinda like the Pause Ball exercise. Stop the game after the ball falls to the bottom 3 times. Stop the game when all the bricks are removed. Display messages on the screen when you win or lose. Then, you can just go crazy with extensions like these: Display a score. Add powerups. Add cheat codes. Add multiple difficulty levels. Anything else that you can think of

Plan Ball & Paddle Part 1: Copy/paste Start & paddleMove from Ex 2 Add line 17 to checkWalls Copy/paste CheckWalls from Ex .2

Plan Ball & Paddle Part 2: Copy/paste drawBricks from Ex 2 Function checkCollision