Game development.

Slides:



Advertisements
Similar presentations
Basics of motion. Fluid motion Fluid motion is best achieved with floats, try and work out why: floats have decimal places, which provide more resolution,
Advertisements

physics engine + graphics
Scratch is a Visual Programming Language
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
 First you have to think up a what kind of game are you going to have it can be any thing from a brick breaker to an role playing game.
1 Flash Actionscript Animation. 2 Introduction to Sprites We will now look at implementing Sprites in Flash. We should know enough after this to create.
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
Windows 8 Windows Phone 8 Web Mobile … and WakeUpAndCode.com.
Windows 8 Windows Phone 8 Web Mobile … and WakeUpAndCode.com.
Creating pong in scratch Learning objectives: To learn how to program Sensing via colour and sprite proximity O:\ICT\ks3\scratch\scratch Exercises\Creating.
1 TouchDevelop Chapter 8-10 Presenter: Jing Xu. 2 Outline Interactions Game Board Tiles and Printing.
Introduction to TouchDevelop
Games. learning objectives o writing games! o understanding the built-in 2D game engine o events in games o using art (pictures, sounds)
©Robomatter – Distribution or copying without permission is prohibited. 3B STEM Computer Science 1 ©Robomatter – Distribution or copying without permission.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Game Maker Terminology
Overview of Game Maker. Game Maker Version 7.0 Lite (free version) For MS-Windows platforms
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
2D Platform Game Game Maker Terminology. Object  Item in a game that has behavior, such as a main character who can move.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 17 - Dynamic HTML: Structured Graphics ActiveX Control Outline 17.1 Introduction 17.2 Shape Primitives.
COMPUTER PROGRAMMING I SUMMER 2011 Objective 8.01 Understand coordinate systems. (3%)
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Physics 218: Mechanics Instructor: Dr. Tatiana Erukhimova Lectures 30, 31, 32.
CRE Programming Club - Class 5 Robert Eckstein and Robert Heard.
Text on a CCR Matrix using the SuperStar Sequence Editor Brian Bruderer.
Midterm: Question 1 (35%) (30 minutes) Write an assembly program to draw a rectangle. – (5%) Show a message to ask for information of the rectangle – (5%)
Construct 2 Game Development for Kids Platformer Tutorial: Part 1 Shahed Chowdhuri.
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.
Sprite sets. project of the week: bubble popper o objects appear from the bottom and slide up o player needs to avoid objects to earn points (objects.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Boxes. boxes- learning targets o I will be able to display buttons (boxes) o I will be able to organize boxes o I will be able to create an animation.
Collision testing. learning targets Increase awareness of the struggles that of game development; Recognize computer science elements for game logic;
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Martin Norris Computing Teacher/Leader at Moldgreen Community Primary School, Huddersfield
Boxes. SOUNDBOARD Objective: Tap the boxes to play sounds! Demo:
Transition: Ball possession Opponent > Ball Possession : Quick forward movement, Quick forward passing. Make field as big as possible. SESSION PLAN PRESENTATION.
Sound and more Animations
2D Physics and Camera Systems
Create a Halloween Computer Game in Scratch
MOM! Phineas and Ferb are … Aims:
Scratch for Interactivity
Game development.
Inserting and Working with Images
Angles And Distances.

Basic Graphics Drawing Shapes 1.
EEL 3705 / 3705L Digital Logic Design
Competitive Multiplayer Game
Introduction to.
The Canvas.
The One Where You Scratch
Creating games with game editors
Introduction to TouchDevelop
Digital Media Dr. Jim Rowan ITEC 2110.
Go to =>
2D Graphics Lecture 4 Fri, Aug 31, 2007.
Newton’s third law (lecture 7)
Review: Newton’s 1st & 2nd Laws
Review: Newton’s 1st & 2nd Laws
Transparency & magic pixel
The coordinate system Susan Ibach | Technical Evangelist
CSS Boxes CS 1150 Fall 2016.
Clear the court. Dynamic warmup Legs + Arms
Creating a Simple Game in Scratch
Scratch Racing.
So you want to be a Game Designer
Review: Newton’s 1st & 2nd Laws
Presentation transcript:

game development

board sprite-based objects have speed, gravity, friction (physics engine) game loop (timer event) touch events on sprites

coordinates and units positions are based on pixels X: 480 pixel (0,0) positions are based on pixels Windows Phone 7 platform mandates 480x800 screen resolution origin (0, 0) is top left corner extent (480,800) is just outside of bottom right corner (240,400) Y: (up to) 800 pixel (480,800)

coordinates and units sprite positions refer to center of sprite (makes rotation easy) speed measured in pixels/second acceleration measured in pixels/second2

demo/exercise: static layout X: 480 pixel (0,0) var board: Board action main data->board := media->create full board data->board->create ellipse(20,20) data->board->post to wall run script to see static layout Y: (up to) 800 pixel ellipse +(20,20)

create ellipse w h create ellipse(w, h) w is width of enclosing rectangle h is height w h

gravity gravity is property of board Board→set gravity sets the uniform acceleration vector for objects on the board to pixels/seconds2 sprites are affected when Board→evolve is called typical use of the accelerometer in gameloop: var p := senses→acceleration quick→scale(800) ◳board→set gravity(p→x, p→y)

demo/exercise: gravity X: 480 pixel (0,0) var board: Board action main ◳board := media→create full board ◳board→create ellipse(20,20) ◳board→post to wall event game loop var p := senses→acceleration quick→scale(800) ◳board→set gravity(p→x, p→y) ◳board→evolve ◳board→update on wall Y: (up to) 800 pixel ellipse +(20,20) tilt phone to change gravity Important! Moves things around according to speed/gravity/friction/… Important! Makes changes visible

exercise try replacing with or var p := senses→acceleration quick→scale(800) with var p := senses→acceleration quick→scale(2000) or var p := senses→acceleration quick→scale(100) What is the influence of the scaling factor on the sprite movements?

obstacles by default, board is open, has no boundary; objects moving off the visual part of the board will simply continue moving away. Use Board→create boundary to create reflecting walls around the board use Board→create obstacle(x,y,w,h,elasticity) to create line obstacle with elasticity: 1 means the entire impulse is maintained 0 means full absorption of the impulse (a sprite will stick to the wall).

demo/exercise: boundary X: 480 pixel (0,0) var board: Board action main ◳board := media→create full board ◳board→create boundary(0) ◳board→create ellipse(20,20) ◳board→post to wall event game loop var p := senses→acceleration quick→scale(800) ◳board→set gravity(p→x, p→y) ◳board→evolve ◳board→update on wall Keep sprites within screen! Y: (up to) 800 pixel ellipse +(20,20) tilt phone to change gravity

create obstacle obstacle (x, y) h w (x, y) is upper left corner create obstacle(x, y, w, h, elasticity) (x, y) is upper left corner obstacle is a straight line (w, h) is size of bounding rectangle (x, y) obstacle h w

demo/exercise: obstacle X: 480 pixel (0,0) var board: Board action main ◳board := media→create full board ◳board→create boundary(0) ◳board→create obstacle(100,100,50,50,1) ◳board→create ellipse(20,20) ◳board→post to wall event game loop var p := senses→acceleration quick→scale(800) ◳board→set gravity(p→x, p→y) ◳board→evolve ◳board→update on wall (100,100) obstacle +(50,50) Y: (up to) 800 pixel ellipse +(20,20) tilt phone to change gravity Important! Moves things around according to speed/gravity/friction/… Important! Makes changes visible

friction without friction, ball doesn’t slow down set friction: default setting for entire board custom setting for each sprite “A friction is the fraction of the forward speed that is experienced as a backwards force.” friction of 0 corresponds to no friction at all friction of 1 means the sprite will not move at all example: board→set friction(0.01)

demo/exercise: friction X: 480 pixel (0,0) var board: Board action main ◳board := media→create full board ◳board→create boundary(0) ◳board→create obstacle(100,100,50,50,1) var ball := ◳board→create ellipse(20,20) ball→set friction(0.05) ◳board→post to wall (new code in bold) (100,100) obstacle +(50,50) Y: (up to) 800 pixel ellipse +(20,20)

exercise try replacing with or ball→set friction(0.05) with ball→set friction(0.95) or ball→set friction(0.001) What is the influence of the friction coefficient on the sprite movements?

testing border is the sprite on the left? event gameloop (50,0) is the sprite on the left? event gameloop if sprite->x < 50 then phone->vibrate(0.1) (0,0) (sprite→ x, sprite→ y) (480,800)

exercise is the sprite on the top? event gameloop if …………………………………………… then phone->vibrate(0.1) (0,0) (sprite→ x, sprite→ y) (0,50) (480,800)

extra-exercises is the sprite on the left or on the top? is the sprite on the bottom? is the sprite on the right? is the sprite on the any of the sides? is the sprite in the center?

fun with the board change background color change sprite color board->set background(colors->random) change sprite color ball->set color(colors->random) make sprite bigger ball->set width(200) ball->set height(400)

testing border is the sprite on the left? event gameloop (50,0) is the sprite on the left? event gameloop if sprite->x < 50 then phone->vibrate(0.1) (0,0) (sprite→ x, sprite→ y) (480,800)

testing border is the sprite on the top? event gameloop if …………………………………………… then phone->vibrate(0.1) (0,0) (sprite→ x, sprite→ y) (0,50) (480,800)

testing border is the sprite on the top or bottom? event gameloop if …………………………………………… then phone->vibrate(0.1) (0,0) (sprite→ x, sprite→ y) (0,50) (480,800)

exercise create a game where 1 sprite (called ball) ball moves with the accelerometer ball bounces on the screen boundary ball is red when it is “near” the center of the screen; otherwise ball is blue ball size increases each time it hits the screen boundary (+5)

project pitch 2 min: prepare a 1 minute demo/story why someone should buy your game. At each “beep”, pick a new student and pitch each other’s game. Mark down the other student’s name and whether you would pay .99c to buy his game.

Your Name: _____________________ Student’s Name Buy YES! Buy NO!