CIS 487 - Game Design I Chapter 6 and 7 Blake Farrugia 10/24/2011.

Slides:



Advertisements
Similar presentations
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
Advertisements

Code Club Session 3 Shark Eats Fish. Picture of finished product here.
CIS Game Design I Chapter 4 and 5 Blake Farrugia 10/24/2011.
How do games work? Game Workshop July 4, Parts Sprites/pictures Map/background Music/sounds Player character Enemies Objects.
CIS Game Design I Sprite Sheets Blake Farrugia 10/10/2011.
SCA Introduction to Multimedia
Windows 8 Windows Phone 8 Web Mobile … and WakeUpAndCode.com.
UFCEKU-20-3Web Games Programming Tile-based and Isometric Worlds.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
© 2011 Delmar, Cengage Learning Chapter 8 Building Complex Animations.
2 What is pyGame? A set of Python modules to make it easier to write games. –home page: –documentation:
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
Game Maker Day 2 Making a Maze Game.
11 A First Game Program Session Session Overview  Begin the creation of an arcade game  Learn software design techniques that apply to any form.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
CS 4730 Action vs. Interaction CS 4730 – Computer Game Design Credit: Several slides from Walker White (Cornell)
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
Tutorial 7 Planning and Creating a Flash Web Site.
SuperChair Productions proudly presents… PYGAME © 2006 SuperChair Productions. All rights reserved.
Test Environment Algorithm Program Requirements/ Enhancements Analyze the Problem and Design a Solution Programming Software Translates the Source Code.
11 Adding Tomato Targets Session Session Overview  We now have a game which lets a player bounce a piece of cheese on a bread bat  Now we have.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
Game Maker Terminology
Sprites, User Input, and Collision COSC 315 Fall 2014 Bridget M. Blodgett.
Guide to Programming with Python Chapter Twelve Sound, Animation, and Program Development: The Astrocrash Game.
Team 2: Gamers & Coders Final Sprint Presentation.
1 Frisbee Physics Simulation Charles George Advisor: Brian Postow 03/05/05.
Overview of Game Maker. Game Maker Version 7.0 Lite (free version) For MS-Windows platforms
Guide to Programming with Python Week 15 Chapter Twelve Sound, Animation, and Program Development: The Astrocrash Game.
Team 2: Gamers & Coders ‘ The Last Warrior’ Android Game Application By Chinmay Kulkarni, Darshan Shinde, Matt Frey, Peng Ye, Satoshi Inoue & Shachi Chandrashekhar.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Object Oriented Analysis & Design Game Patterns. Contents  What patterns are  Delegation  Game Loop  Scene Graph  Double Buffering  Component 
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
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.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
Game Maker Evil Clutches.
Construct 2 Game Development for Kids Platformer Tutorial: Part 1 Shahed Chowdhuri.
CS F EBRUARY 9, 2016 P ARTS G AME A RCHITECTURE, M EMORY, AND I/O S YSTEMS G AME T IMING G AME T IMING G AME P ARALLELISM G AME P ARALLELISM.
PyGame - Unit 1 PyGame Unit – – Introduction to PyGame.
Introduction to Animation In animation, a series of images are rapidly changed to create an illusion of movement.
Stencyl Visual Programming Dr. Gary Liu. Sections: 1: Game Development Concepts 2: Stencyl and Game Mechanics 3: Stencyl Story and Aesthetics 4: stencyl.
Computer Programming with Scratch JAOIT 8. Scratch Scratch is a programming language that makes it easy to create your own interactive stories, animations,
GAME:IT Mario Creating Platform Games Level 4 with GML Game Maker Language (GML) allows users more flexibility in game design. GML is similar to how real.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
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.
Flash Session 4: Importing Assets
MORE Genre Specific Physics
Creating a Flash Web Site
Graphical Output Basic Images.
2D Graphics and Animations in Unity 3D
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
Background Shapes & Collision Resolution (Top-down and Side-scrolling)
Creating a Tank Game in Scratch
Game Engines By James Tedder.
EEL 3705 / 3705L Digital Logic Design
Animate Workspace. Objective % Utilize appropriate tools and methods to produce digital animation.
Creating actors and scenes
INTRODUCTION TO FLASH ANIMATION
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
Tank Game Int 10 Unit 3 – Game Maker.
Unity Game Development
ANIMATE WORKSPACE Stage Timeline Properties Panel Library Panel
Game Programming Algorithms and Techniques
Unity Game Development
Unity Game Development
Presentation transcript:

CIS Game Design I Chapter 6 and 7 Blake Farrugia 10/24/2011

Chapter 6 – No Tanks The next game focuses on projectile shooting using tanks. You play a green tank, killing blue tanks and gaining treasure to complete the level. This game incorporates everything the book has covered so far. New changes include tiles, sprite sheets, maze logic, moving enemy AI

Setup The last chapters talked about sprite sheets in general, but they implemented the assets in a separate image manner This chapter uses an actual sprite sheet (one full picture) to animate the player, enemies, and explosions Sprites are all 32x32 pixels; the map is set up as a 20x15 grid of tiles created using GIMP

Tile Set with ID Numbers

Map Setup Each tile ID is stored a 20x15 2D array of ints The game uses this information to set each tile as needed to be in the map No Tanks creators used a tile map editor called Mappy to make their map setup easier Arrays for map setup are stored in the Level1 class derived from Level

Map Sprites and Object Sprites The map itself is made of environment tiles, but object sprites are made of their own separate tiles Some are in sets (idle sprite, animation sets) Icons such as ammo upgrades and extra lives have their own sprites Object sprites are stored in a 2D array within the Level1 class

Using Tile Data Mappy exports code usable by ActionScript, but some work has to be done to make that code functioning Mappy creates 2D arrays for Level1.as to use

Map Setup backGroundMap = [ [26,24,25,0,26,26,26,26,26,0,0,26,26,26,26,26,0,24,25,26], [27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27], [29,0,28,0,0,0,24,25,0,24,25,0,24,25,0,0,0,27,0,29], [27,0,28,0,27,0,0,0,0,0,0,0,0,0,0,27,0,29,0,27], [29,0,0,0,29,0,0,30,0,0,0,0,31,0,0,29,0,0,0,29], [0,0,28,0,26,0,0,31,0,0,0,0,31,0,0,26,0,26,0,0], [0,0,0,0,0,0,0,31,0,0,0,0,31,0,26,0,0,0,0,0], [26,26,26,0,0,26,0,30,30,30,30,30,30,0,0,0,0,26,26,26], [0,0,0,26,0,0,0,0,0,0,0,28,0,0,0,0,26,0,0,0], [0,0,0,0,26,0,0,27,0,27,0,27,0,28,0,26,0,0,0,0], [27,0,0,0,27,0,0,29,0,29,0,29,0,28,0,27,0,0,0,27], [29,0,0,0,29,0,0,0,0,0,0,0,0,0,0,29,0,0,0,29], [27,0,0,0,0,26,0,28,0,28,0,28,28,0,26,0,0,0,0,27], [29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29], [26,24,25,0,0,26,26,26,26,0,0,26,26,26,26,0,0,24,25,26] ];

Map Setup spriteMap = [ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,9,0,0,20,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [1,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,9,0,9,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,9,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,9,0,23,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ];

Using Tile Data TileSheetDataXML.as to store all tile data and some frame data from XML package com.efg.games.notanks { public class TilesheetDataXML { public static var XMLData:XML= …… ; } // end class }// end package

Using Tile Data The GameDemo class parses and assigns tiles and creates all level properties This class will be extended incrementally to build the complete game Complete game is contained in GameDemoIteration6.as

Flash Region Drawing The sprite blitting used in No Tanks combines bitmap redrawing with Sprite class screen invalidation techniques that Flash does so well Want to see Screen Invalidation? Right click most Flash applications and click the option “Show Redraw Region” Individual object sprites (tanks, upgrades) will redraw themselves separately rather than drawing to background constantly

New Level Creation New levels are hardcoded on top of a Level class. This is due to the fact that the author wants to keep all resources within the SWF and not have any external resources This changes as needed, but the first (and only) level is called Level1

Chapter 7 – Game Implementation This chapter focuses on: – AI Logic Line-Of-Sight firing Pathfinding – Individual Sprite Blitting Rotation Smooth Movement

Tile Movement Tile-By-Tile movement used to be the norm for tile-based games. It’s rickety and not too pleasant to view Smooth tile movement will be used in No Tanks Cornering will only work when sprites are in the center of a given tile

BlitSprite.as A class that extends Sprite while adding frame animation functions A reference of TileSheet is passed to it, and the held bitmap is redrawn individually using the copyPixels method Rotation functionality is appended into this class and will be utilized by the next class, TileByTileBlitSprite.as

TileByTileBlitSprite.as A class extending BlitSprite, so BlitSprite functionality can be used for non-tile games Holds additional direction, movement, and destination logic Sprites that are not environment will use this class

Game Setup The majority of the game is run through NoTanks.as A majority of the game’s setup is run through GameDemo.as NoTanks handles much of the event code after GameDemo’s initial setup

Iteration Testing Within the project, there are several versions of the GameDemo class Each class adds new functionality and incrementally builds the entire game These were general tests for successful integration of all parts of this game: – Sprite Rendering/Collisions – AI Logic – Movement – Sounds

Iterations Iteration 1 – adds the player avatar coide Iteration 2 – add key logic to move the player Iteration 3 – updates states for player moves Iteration 4 – Rendering player movement Iteration 5 – Adding and moving enemy tanks also divides game platform into regions Iteration 6 – Game AI added for enemy tanks (targeting, movement, collisions), sounds added to game

Region Tracking and Chase Objects Regions are quadrants of the level that the game focuses calculations on As the player moves, the contents of a given region begin to react Chase Objects are managers which point a predator object towards the path of a prey object Chase objects handle pathfinding/attacks for enemies