Game 1: Mr. Happy’s Quest For our original canvas, we had designed a child’s background using simple shapes. For this project, we will add objects that.

Slides:



Advertisements
Similar presentations
Microsoft® Small Basic
Advertisements

Mr. Happy Hits the Cloud It is important that the canvas has a game that is challenging to the user. Thus far, Mr. Happy has been able to move around and.
Mission Technology Introduction to Scratch! June 2007.
Introduction to InDesign Understanding the Basics DTB203 Interior Visualisation
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Flappy bird guide for Scratch
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
 By carefully incrementing the X and/or Y values of our set of lines, we can create a game board for a boat game.  Lines that go from left to right are.
Tic Tac Toe size(600,600); Aim: How can we set up our canvas and display for a Tic Tac Toe game? 1. Sketch the two drawings and write the two code.
Microsoft® Small Basic
Introduction to Animation Programming Our next set of exercises will look at animation on the following link:
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
Aim: Use the given examples to record examples and our own ideas in our journal 1.Write technical examples in journal and/or participate in full.
Initializing The HTML Our initial HTML calls upon the API (application programming interface) and sets up the body of the page for use. We can make improvements.
Battleships Recognize Impact In this example, we will establish a Boolean variable (true or false) to decide if the boat has been hit. Then, we will adjust.
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Alice Learning to program: Part 1 Scene Setup and Starting Animation by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke.
PROCESSING Animation. Objectives Be able to create Processing animations Be able to create interactive Processing programs.
Responsive Battleships The battleship animation we created needs to respond to user input to be considered a game. The user will be able to launch an attack.
A Prezi presentation is like creating a mind map. It is created on a blank canvas and you decide where the information goes on this canvas.
Using Coordinate Geometry to Create Moving Images In unit 29 we created a simple drawing for the background of a children’s game. We are going to start.
INF1090 Part Deux Photography- Photomanipulation.
Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0 Key Abstractions in Game Maker Foundations of Interactive Game Design Prof. Jim Whitehead.
HTML, HTML5 Canvas, JavaScript PART 3 LOOKING MORE CLOSELY AT FULL BLOWN GAME DESIGN A PATTERNED BACKGROUND (CREATED WTIH LOOPS) WITH A MOVING OBJECT CHALLENGES.
Animating Coordinate Geometry In this unit we will expand upon our knowledge of using counters to create motion pictures. By using incremental mathematics,
Introduction to Scratch!
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Animating Graphics and Text Boxes Hands-on Approach to Animating Elements on a Slide by Dr. Steve Broskoske.
Locally Edited Animations We will need 3 files to help get us started at
Alice Learning to program: Part Three Camera Control, Invisibility, and 3-D Text By Ruthie Tucker and Jenna Hayes, Under the direction of Professor Rodger.
One point perspective. One-point perspective images have a tendency to draw the viewer along the lines to the vanishing point. This effect can be used.
Artificial Intelligence in Game Design Behavior Trees.
KeyListener and Keyboard Events Just as we can implement listeners to handle mouse events, we can do the same for keyboard events (keypresses) –to implement.
Keyboard and Events. What about the keyboard? Keyboard inputs can be used in many ways---not just for text The boolean variable keyPressed is true if.
KeyListener and Keyboard Events Another type of listener listens for keyboard entry – the KeyListener which generates KeyEvents –to implement KeyListener,
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.
A guide to creating a power point display Essentials Ctl M =New Slide: a new slide can be inserted. It is placed after the slide that you are viewing.
Creating Art With Simple Shapes By carefully implementing simple shapes to an HTML canvas we can create useful graphics. With enough time, lines, ellipses.
Games Cultures ‘Kat Snatch’. Background story Nanny Mc Phee is a senile 82 year old lady living in the suburbs of Pleasant Ville. As a very forgetful.
Game Maker – Getting Started What is Game Maker?.
Shooters in GameMaker J Parker.
2-D Shapes, Color, and simple animation. 7 Basic Shapes Ellipse :: ellipse() Arc :: arc() Line :: line() Point :: point() Rectangle :: rect() Triangle.
 A plan of attack for your games content  Or (more specifically)  A detailed description of all games mechanics, objects, characters, stats, ect… that.
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.
CPSC 217 T03 Week II Part #1: SimpleGraphics.py Hubert (Sathaporn) Hu.
Learning to Program: Part 1 Scene Setup and Starting Animation by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
Adobe illustrator. Lesson Objectives To familiarise yourselves with the illustrator interface To use symbols and basic shapes to create a logo All students.
Making a Flappy Birds Game PART 2 – MAKING THE BIRD FLAP AND FALL – AND DEVELOPING THE GAME FURTHER (ADDING ADDITIONAL CHARACTERS, GOODIES, ENEMIES AND.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Figure Drawing. How many of you have tried to draw a realistic figure before? What challenges did you face or what problems did you run into?
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
One-point perspective images have a tendency to draw the viewer along the lines to the vanishing point. This effect can be used to greater advantage by.
Index Background Costumes Making object walk smoothly Controlling an object with the keyboard Control an object with the mouse Changing costume when hit.
PROPERTY OF PIMA COUNTY JTED, 2011
Alice Learning to program: Part Three Camera Control, Invisibility, and 3-D Text By Ruthie Tucker and Jenna Hayes, Under the direction of Professor Rodger.
p5.js mouse, keyboard and if’s
Creating Vector Graphics
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
Chapter 7 Functions.
Chapter 7 Functions.
Chapter 10 Algorithms.
Chapter 10 Algorithms.
Introduction to TouchDevelop
This Power Point show counts the first 24 days of December.
Basic Input and Output CSE 120 Winter 2019
Learning to Program: Part 3 Camera Control, Invisibility and 3-D Text
Chapter 10 Algorithms.
Chapter 4, Variables Brief Notes
Creating a Simple Game in Scratch
Presentation transcript:

Game 1: Mr. Happy’s Quest For our original canvas, we had designed a child’s background using simple shapes. For this project, we will add objects that a game player (child) can move around using the arrow keys on the keyboard. In the example, a smiley face has begun to be created

The Draw Function and Mr. Happy size(800,600); var x = 400; var t = 5; var hx = 200; var hy = 200; //draw mr happy noStroke(); fill(255,255,0); ellipse(hx,hy,100,100); stroke(0,0,0); ellipse(hx-20,hy-20,10,10); ellipse(hx+20,hy-20,10,10); //ADD A MOUTH WITH A BLACK ELIPSE AND A RECTANGLE TO ERASE THE TOP HALF OF THE ELLIPSE }

Bouncy Obstacles Example void draw() { background(100,100,100); //bouncy ball designs fill(255,255,255); ellipse(x,150,200,200); fill(0,0,0); ellipse(x,450,200,200); x=x+t; if(x>800) t = -t; if(x<0) t = -t; text("Hello!", 50, 50);

keyPressed() Function Example void keyPressed() { if (keyCode == UP) hy = hy - 20; if (keyCode == DOWN) hy = hy + 20; //ADD LEFT RIGHT }

 Take what has been done in project 31 and expand upon it to add a figure, character and/or face that moves around the screen with the keyboard arrow keys.  Make certain that the screen:  Has moving objects that the character must avoid  An aesthetically pleasing background  A goal to get to (golden treasure?)  And a place to return to (home?)

Guiding the Movements of the Star For the second example, the end user (game player) will use keys to adjust the path of the star. The game will need something for the star to attack, gather, and/or avoid. Use the work done in our previous unit and expand upon the canvas with examples and original designs.

var x = 300; var y = 0; var t = 5; void draw() { background(255,255,255); //top left part of star stroke(255,0,0); line(x,0,300,300); line(x,20,280,300); line(x,40,260,300); line(x,60,240,300);

x=x+t; if(x>600) t = -t; if(x<0) t = -t; } void keyPressed() { if (keyCode == LEFT) x = x - 25; if (keyCode == RIGHT) x = x + 25; //ADD UP AND DOWN }

 Implement an improved and fully capable keyPress function that will enable the star to move in all 4 directions based on the game players use of the arrow keys.  Add game objects that the player should move the star towards and/or avoid so that there is an eventual obtainable goal for the game player.

Review Guiding the Movements of the Star Code Example Practice 2

 The car has already been designed to be drawn with simple shapes and the illusion of movement based on the roadway’s movement in the opposite direction.  Our goal for this part of the project will be to enable the car to move around the road in 4 directions and to add objects that can be obtained and/or avoided for points (to be implemented in a later version).

size(300, 800); var keyX = 0; var keyY = 0; var y = 0; var x = 0; var t =.1; void draw(){ background(100,100,100); stroke(255,255,0); strokeWeight(10); line(150,y+0,150,y+50); y = y + 3; if(y>50) y = 0;

//car vrooom noStroke(); fill(0,0,0); rect(keyX+x+20,50,90,200); fill(255,255,255); rect(keyX+x+50,50,30,200); x = x + t; if(x>8) t = -t; if(x<0) t = -t; } void keyPressed() { if (keyCode == LEFT) keyX = keyX - 15; if (keyCode == RIGHT) keyX = keyX + 15; //ADD UP AND DOWN }

Practice 3: 20% Create a keypress function that enables the game player to move the car around the screen in a way that looks realistic. Add moving objects that the car can obtain and objects that the car must avoid to create a game.

 Car Game  Example Code  Practice 3: 20%

Making the Plane Fly (WITH LASERS!) In the previous project animations were created that enabled an object to appear to fly across the screen. In this section, the animation will be expanded upon to have the keyboard move the plane. The plane will also have a LASER that is fired with the spacebar.

size(800,600); var keyY = 0; var laserOn = false; var laserTimeOut = 20; var timeCount = 0; tx = 400; x = 0; void draw(){ background(0,255,255); //tree noStroke(); fill(150,75,0); rect(tx-10,500,25,200); fill(0,255,0); ellipse(tx,475,150,100); tx = tx - 10; if (tx < 0) tx = 1200; //cloud noStroke(); fill(255,255,255); ellipse(tx-250,90,166,127); //jet strokeWeight(5); noStroke(); fill(255,0,0); //LASERS!!!!! stroke(255,0,0);

if(laserOn) { line(x+300,300+keyY, x ,300+keyY); timeCount++; if (timeCount > laserTimeOut) { timeCount =0; laserOn = false; } x= x+3; if (x>800) x = -200; } void keyPressed() { if (keyCode == UP) keyY = keyY - 15; if (keyCode == DOWN) keyY = keyY + 15; if (keyCode == LEFT) laserOn = true; if (keyCode == 32) laserOn = true; //ADD UP AND DOWN }

Practice 4: 20% The airplane should look like it is really flying. It should be controllable in all 4 directions. The airplane should have a functional and aesthetically pleasing weapon (the laser). Objects should move around the screen that can either help the plane or provide something for the plane to shoot at.

 Making the Plane Fly WITH LASERS!  Example Code  Practice 4: 20%

Improving Canvas 1 Make certain that the canvas has something to get, a place to take it and a nice design of the avatar (thing the player moves). The canvas should have items moving around that are both good for the avatar and bad for the avatar such as treasure and slime. Choose your own ideas and make it into an original looking game.

 The star has to be part of a game that can enable the user to interact in a meaningful way.  Make the star bigger or smaller.  Make more than one star.  There should be objects for the game player to obtain and/or avoid.

Improving Canvas 3 The car game has a lot of room for improvement. The car its self can be more realistic. More drawings can accompany the side of the road to move by quickly and more drawings can be on the road. The car will need moving objects to obtain and avoid such as other cars and “power ups.”

 The aircraft its self can be made to look more modern, sleek or realistic.  The items in the sky and ground can become more varied and more detailed.  The aircraft has a laser: give it something to shoot at!  Objects to avoid and/or shoot and/or obtain should be added.

Review Improving Canvas 1 Improving Canvas 2 Improving Canvas 3 Improving Canvas 4

Gabrielle's Fun Games size(800,600); var x = 400; var t = 5; void draw() { background(0,255,255); fill(0,0,0); ellipse(x,450,200,200); x=x+t; if(x>800) t = -t; if(x<0) t = -t; stroke(255,0,0); strokeWeight(5); line(0,0,800,600); stroke(255,255,0); strokeWeight(5); line(800,0,0,600); } size(600, 600); strokeWeight(1); var x = 300; var t = 5; void draw() { background(255,255,255); //top left part of star stroke(255,0,0); line(x,0,300,300); line(x,20,280,300); line(x,40,260,300); line(x,60,240,300); line(x,80,220,300); line(x,100,200,300); line(x,120,180,300); line(x,140,160,300); line(x,160,140,300); line(x,180,120,300); line(x,200,100,300); line(x,220,80,300); line(x,240,60,300); line(x,260,40,300); line(x,280,20,300); line(x,300,0,300); line(x,0,300,300); //top right part of star stroke(255,255,0); line(x,20,320,300); line(x,40,340,300); line(x,60,360,300); line(x,80,380,300); line(x,100,400,300); line(x,120,420,300); line(x,140,440,300); line(x,160,460,300); line(x,180,480,300); line(x,200,500,300); line(x,220,520,300); line(x,240,540,300); line(x,260,560,300); line(x,280,580,300); line(x,300,600,300); x=x+t; if(x>600) t = -t; if(x<0) t = -t; } size(300, 800); var y = 0; var x = 0; var t =.05; void draw(){ background(100,100,100); stroke(255,255,0); strokeWeight(10); line(150,y+0,150,y+50); line(150,y+100,150,y+150); y = y + 3; if(y>80) y = 0; noStroke(); fill(50,50,50); rect(x+15,100,100,30); fill(0,0,0); rect(x+20,50,90,200); fill(255,255,255); rect(x+50,50,30,200); x = x + t; if(x>5) t = -t; if(x<0) t = -t; } size(800,600); tx = 400; x = 0; void draw(){ background(0,255,255); //tree noStroke(); fill(150,75,0); rect(tx-10,500,25,200); fill(0,255,0); ellipse(tx,475,150,100); tx = tx - 10; if (tx < 0) tx = 1200; //cloud noStroke(); fill(255,255,255); ellipse(tx-250,90,166,127); ellipse(tx-150,100,95,77); ellipse(tx-350,100,95,77); ellipse(tx-350,90,166,127); ellipse(tx-275,100,95,77); ellipse(tx-450,100,95,77); //jet noStroke(); fill(255,0,0); triangle(x+100,100,x+100,300,x+300,200); fill(150,75,0); triangle(x+200,100,x+200,300,x+400,200); fill(255,192,203); triangle(x+300,100,x+300,300,x+500,200); x= x+3; if (x>800) x = -300; } AAAAAAAA