Sprite Animation An exercise on filling circles and polygons to create the animated sprite used in ‘Pac Man’

Slides:



Advertisements
Similar presentations
GAME:IT Junior Learning Game Maker: The Score Tab.
Advertisements

Graphics Shapes. Setup for using graphics You have to import the graphics library You can use either “import graphics” or “from graphics import *” or.
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
VGA Text Mode An introduction to font selection and to reprogramming of the Character Generator ram.
SuperStar Basics Brian Bruderer. Sequence Editors Traditional sequence editors use a large grid to control when channels are turned on and off. This approach.
Creating a Basic Pacman game
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
 graphic organizers in the form of illustrations or images displayed in sequence for the purpose of pre-visualizing a motion picture, animation, motion.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
A code-walkthrough Commentary on our ‘model3d.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
DIGITAL GRAPHICS & ANIMATION
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
An interactive number formation activity
Module Code: CU0001NI Technical Information on Digital Images Week -2.
WMD Creating Animations Flash-5 Zhou Hong. Contents Review 1 Frame Types 2 Frame-by-Frame Animation 3 Action & Shape Tweening 4.
Introduction to Scratch!
Tools for Raster Displays CVGLab Goals of the Chapter To describe pixmaps and useful operations on them. To develop tools for copying, scaling, and rotating.
Triangulation Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
 graphic organizers in the form of illustrations or images displayed in sequence for the purpose of pre-visualizing a motion picture, animation, motion.
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.
Multimedia Animation. Animation Principles Persistence of vision object seen by human eye remains mapped on retina for a brief time after viewing display.
CIS 3.5 Lecture 2.2 More programming with "Processing"
Algorithms Writing instructions in the order they should execute.
Java Dynamic Graphics.
Computer Programming Modeling a Passive Solar Home.
First Project: Dance Dance Sprite  Write a dance with your sprite (You pick or create the sprite)  Incorporate as many of the Motion Commands as you.
Overview  Basic requirements of implementation  Image resource  Texture mapping  Advanced requirements of implementation  KGL sprite class.
Lecture 13: Raster Graphics and Scan Conversion
PyGame - Unit 1 PyGame Unit – – Introduction to PyGame.
Game 4: Pac Man Tutorial. New events/actions to learn: Animated sprites Change instances – allows you to change objects into other objects. Change sprites.
Intro CS – Costumes and Variables Lesson Plan 6. Goals  Understanding Costumes, Ordering, Naming  Switching Costumes with Switch and Next  Using Variables.
Chapter 7 Introduction to High-Level Language Programming.
Reference: What is it? A multimedia python library – Window Management – Graphics geometric shapes bitmaps (sprites) – Input Mouse Keyboard.
Intro CS – Keyboard and mouse input Lesson Plan 7.
Arrays Chapter 7.
Sprites (Images) and Sounds
Intro CS – Costumes and Variables
Graphical Output Basic Images.
Today, we'll learn how to animate our artwork
An interactive number formation activity
Computer Graphics Lecture 3 Computer Graphics Hardware
Intro CS – Loops & Creating Shapes
How to work with your sprite
© A+ Computer Science -
Classwork: Examine and enhance falling drop(s) or make your own.
Polygons, Transformations, and Arrays
An interactive number formation activity
An interactive number formation activity
June 2013 TechConnect Genius Webinar
Otasuke GP-EX! Chapter 1 Menu Screen.
More programming with "Processing"
Graphics Systems SUBJECT: COMPUTER GRAPHICS LECTURE NO: 02 BATCH: 16BS(INFORMATION TECHNOLOGY) 1/4/
Simple Animation in PowerPoint by Gary Fisk
Mod 2 Lesson 2 Repeating Debugging
OpenGL program.
Mod 2 Lesson 2 Repeating with loops
Flappy bird Demo: Lesson 5 Flappy bird Demo:
An interactive number formation activity
Intro to Programming 2/23/2016 Review Sections 1-3
Division Using Arrays.
An interactive number formation activity
PowerPoint is for making high quality presentations
Lesson 4 Graphics in Publications
Game Programming Algorithms and Techniques
Agenda for Unit 4: Graphics
An interactive number formation activity
Chapter 7 The Game Loop and Animation
Presentation transcript:

Sprite Animation An exercise on filling circles and polygons to create the animated sprite used in ‘Pac Man’

What is a ‘sprite’? It’s a small graphics pixmap image It’s normally stored in off-screen VRAM It’s ready to be copied to on-screen VRAM The copying operation is called a ‘BitBlt’ Several sprites can support an animation Let’s see how to create a sprite array, then synchronize BitBlts with Vertical Retrace

The ‘Pac Man’ sprite 1. Fill a circle with the foreground color 2. Fill a triangle in the background color

The ‘Pac Man’ sprite-array Create an array of sprites, arranged in a sequence that matches the order in which they will be drawn to VRAM

Typical animation loop sprite pacman[ 8 ]; // the array of sprite-images int i = 0; while ( !done ) { draw( pacman[ i ], vramptr ); vsync(); // await next vertical retrace hide( sprite[ i ], vramptr ); i = ( ++i ) % 8; // cycle through sprite array }

Multiple sprite-arrays RIGHT DOWN UP

Demo: ‘sprites.cpp’ Study the source-code for this demo Arrange your sprites in an array Write a sprite-animation loop Incorporate movement in sprite’s location Let user control direction with arrow-keys Store your sprite-arrays in offscreen vram