How do games work? Game Workshop July 4, 2006. Parts Sprites/pictures Map/background Music/sounds Player character Enemies Objects.

Slides:



Advertisements
Similar presentations
Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Advertisements

Game Programming Patterns Game Loop
Video Game Design Lesson 1. Game Designer Person involved in the development of a video game Person involved in the development of a video game Usually.
CSCE 590E Spring 2007 Game Architecture and Math By Jijun Tang.
CIS Game Design I Chapter 6 and 7 Blake Farrugia 10/24/2011.
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.
Chapter 3.4 Game Architecture. Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a well-defined.
AGD: 5. Game Arch.1 Objective o to discuss some of the main game architecture elements, rendering, and the game loop Animation and Games Development.
CHAPTER 17 Creating an Interactive 3D Environment © 2008 Cengage Learning EMEA.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
PacMan by Midway, released 1980 CSE 380 – Computer Game Programming Real-Time Game Architecture.
Chapter Languages, Programming and Architecture.
Artificial Intelligence in Game Design Event and Sense Management.
Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0 Key Abstractions in Game Maker Foundations of Interactive Game Design Prof. Jim Whitehead.
By Mr. Lee. Backgrounds The image that appears in the background (duh!). This might be a horizon, or clouds, trees and rainbows in the distance If you’re.
Rethinking Game Architecture with Immutability Jacob Dufault Faculty Advisor: Dr. Phil Bernhard, Dept of Computer Science, Florida Institute of Technology.
Town Defenders Strategy Game prepared by: Osama N
Object Oriented Analysis & Design SDL Threads. Contents 2  Processes  Thread Concepts  Creating threads  Critical sections  Synchronizing threads.
10/9/20151 Unreal Basics CIS 488/588 Bruce R. Maxim UM-Dearborn.
CS 4730 Action vs. Interaction CS 4730 – Computer Game Design Credit: Several slides from Walker White (Cornell)
Funativity CS 426 Fall Team Members David Smits – Lead Chintan Patel – Programmer Jim Gagliano – Programmer Ashleigh Wiatrowski - Artist.
Test Environment Algorithm Program Requirements/ Enhancements Analyze the Problem and Design a Solution Programming Software Translates the Source Code.
CS 4730 Probability and Risk CS 4730 – Computer Game Design Credit: Several slides from Walker White (Cornell)
Scratch Programming Lesson 4 Question asking and answering.
XNA An Introduction. What XNA is… Microsoft® XNA™ is composed of industry- leading software, services, resources, and communities focused on enabling.
Catch the Clown Tutorial Tech Camp Fall 2008 Colorado School of Mines.
Game Maker Terminology

2.1. T HE G AME L OOP Central game update and render processes.
Game Programming Patterns Event Queue From the book by Robert Nystrom
“The perfect project plan is possible if one first documents a list of all the unknowns.” Bill Langley.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
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.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex (can easily exceed 1M LOC) The larger your program,
Team 2: Gamers & Coders Final Sprint Presentation.
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.
Additional Design Patterns for Games For CSE 3902 Matt Boggus.
Programming in the Simple Raster Graphics Package (SRGP) Chapter 2.
11 General Game Programming Approach. The program is event-driven The program is event-driven –Messages = events –So as all windows system (for example.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
Game Programming Patterns Game Loop From the book by Robert Nystrom
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Game program main loop.
CSCE 552 Fall 2012 Language and Programming By Jijun Tang.
T HE G AME L OOP. A simple model How simply could we model a computer game? By separating the game in two parts: – the data inside the computer, and –
Lesson Nine: Miscellaneous Items. Shooting in Both Directions Used when you want your character to shoot things in multiple directions. You need to have.
CompSci 44.1 Game Package Introduction to Jam’s Video Game Package.
XNA Tutorial 1 For CS134 Lecture. Overview Some of the hard work has already been done for you. If you build and run your game now, the GraphicsDeviceManager.
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.
Introduction to Game Programming & Design III Lecture III.
(More) Event handling. Input and Windowed-OS’s Windowed OS’s (Windows, OSX, GUI-linux’s) send messages (events) when the user does something “on” the.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
MORE Genre Specific Physics
Additional Design Patterns for Games
Week 2 - Monday CS361.
Game Architecture Rabin is a good overview of everything to do with Games A lot of these slides come from the 1st edition CS 4455.
Technologies Overview Media files, such as the sounds, are placed in the app’s resource folder res/raw. When an Activity is shut down, its Fragment.
Game Engines By James Tedder.
Managed DirectX Joe Gavin.
First-Person PacMan By Brett Jones.
TerraForm3D Plasma Works 3D Engine & USGS Terrain Modeler
Game Loop Update & Draw.
Tank Game Int 10 Unit 3 – Game Maker.
Games Development Game Architecture: Entities
Presentation transcript:

How do games work? Game Workshop July 4, 2006

Parts Sprites/pictures Map/background Music/sounds Player character Enemies Objects

Game entities Items the player interacts with More precisely, a self-contained piece of logical interactive content Example: Player character Enemies Walls to collide with Not: Background map & music

Game entities in GM In GameMaker, entities are OBJECTS Other items are in the game too Sprites Sounds Backgrounds Tiles

Computer runs the game How? What does it have to do? Draw the background Play music Draw entities Detect key presses Detect mouse Detect collisions of entities Send messages Do calculations (math) Control items: if no lives then end game

When do we do them? How many times a second?

Your computer Draws the screen about times in one second Games do all the tasks we wrote about times a second also

Game loops Games are driven by a game loop that performs a series of tasks every frame Some games have separate loops for the front and and the game itself Other games have a unified main loop

Game Loop Does each of the tasks for running the game Repeats times per second Does the order of tasks matter? Sometimes Sending network messages is important for time-dependent multi-player games

Tasks Handling time Gathering player input Networking Simulation Collision detection and response Object updates Rendering Other miscellaneous tasks

Coupling Can decouple the rendering step from simulation and update steps Results in higher frame rate, smoother animation, and greater responsiveness Implementation is tricky and can be error-prone To do it, we make simple calculations for the rendering, and correct them later when we get the math results

Execution order Most of the time it doesn't matter In some situations, execution order is important Can help keep player interaction seamless Can maximize parallelism Exact ordering depends on hardware

Updating game objects Updating each object once per frame can be too expensive Can use a tree structure to impose a hierarchy for updating Can use a priority queue to decide which entities to update every frame

Loading levels When we change levels we need to load all the resources and objects for the level Also have to load the “game state” – states for all the game objects/entities This can take some time