CS 4730 Game Design Patterns CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)

Slides:



Advertisements
Similar presentations
2000 Prentice Hall, Inc. All rights reserved. 1 Outline 3.1Introduction 3.2Game Loop Components 3.3How to Implement in C# 3.4Adding Image to XNA Project.
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
MANIFEST DESTINY 560group3 Abe Kim David Straily Jarrod Freeman Abdul Mod-Rokbi “The future of RTS games...”
Game Project Tuesday Sept 18,  Game Idea  Team  Understanding available engine options  Understanding the Pipeline  Start the process Cycle.
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.
Prototype Creational Design Pattern By Brian Cavanaugh September 22, 2003 Software, Design and Documentation.
By Steven Taylor.  Basically a video game engine is a software system designed for the creation and development of video games.  There are many game.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Story Boards. Creating and using storyboards Storyboards are an essential tool when designing websites. They help keep developers and graphic artists.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Games and Simulations O-O Programming in Java The Walker School
CS 4730 Prototyping CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Game Design For Development Brent M. Dingle 2014 Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin.
Chapter Languages, Programming and Architecture.
Games Development 2 Entity / Architecture Review CO3301 Week
CSE 380 – Computer Game Programming AI & Collision Strategy Erin Catto’s Box2D.
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.
CSE 381 – Advanced Game Programming 3D Game Architecture.
MVC pattern and implementation in java
Games Development 2 Resource Management CO3301 Week 3.
Mark Nelson What are game engines? Fall 2013
VIDEO GAME PROGRAMMING Video Game Programming Junior – DigiPutt INSTRUCTOR TEACHER’S ASSISTANT.
11 A First Game Program Session Session Overview  Begin the creation of an arcade game  Learn software design techniques that apply to any form.
Unit 1 – Improving Productivity Instructions ~ 100 words per box.
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
CS 4730 Action vs. Interaction CS 4730 – Computer Game Design Credit: Several slides from Walker White (Cornell)
Copyrighted material John Tullis 10/17/2015 page 1 04/15/00 XML Part 3 John Tullis DePaul Instructor
GEMVC. The Setup Folders Views Value Objects (VOs) Custom Events Service CFCs Controller Model Application Main MXML.
CS 4730 Probability and Risk CS 4730 – Computer Game Design Credit: Several slides from Walker White (Cornell)
CS 4730 Game Architecture CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)
XNA An Introduction. What XNA is… Microsoft® XNA™ is composed of industry- leading software, services, resources, and communities focused on enabling.
Recap form last time How to do for loops map, filter, reduce Next up: dictionaries.
“The perfect project plan is possible if one first documents a list of all the unknowns.” Bill Langley.
Game Maker – Getting Started What is Game Maker?.
CS2110: SW Development Methods Inheritance in OO and in Java Part 2: Topics: Forms of inheritance Interfaces in Java.
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,
Design Patterns. OO-Concepts Don’t rewrite code Encapsulation Inheritance Write flexible code.
On the data side of the application… In the beginning, we needed to translate the ideas for the game’s dialogue progression and how the player would interact.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
20081 Converting workspaces and using SALT & subversion to maintain them. V1.02.
CS 4720 Model-View-Controller CS 4720 – Web & Mobile Systems.
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
11 Writing Text Session 5.1. Session Overview  Show how fonts are managed in computers  Discover the difference between bitmap fonts and vector fonts.
11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover.
Designing Design Tools. What is design tools? Why do we need them?
How to do a great Power Point Document. The Principles 1. The audience should focus on YOU, not the screen 2. Keep it simple! Both text and visual layout.
Coding – Week 2 Functions, Arrays, and Objects. Functions  Functions are not a new concept – you’ve been using them already.  void setup() {} and void.
/16 Final Project Report By Facializer Team Final Project Report Eagle, Leo, Bessie, Five, Evan Dan, Kyle, Ben, Caleb.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
ECS – Storyboarding and Introduction to Web Design
CSC 108H: Introduction to Computer Programming
GRASP – Designing Objects with Responsibilities
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.
CMSC201 Computer Science I for Majors Lecture 11 – Program Design
MVC Framework, in general.
Designing Design Tools
Dynamic Web Pages JavaScript Jill Thomas Oct 14, 2003.
Organize your code with MVC
GCSE Computing Databases.
Genome Workbench Chuong Huynh NIH/NLM/NCBI New Delhi, India
Game Loop Update & Draw.
Creating and Using File Folders
It’s All (just) Bits 1) Numbers are bits 2) Text is bits
Games Development 1 Review / Revision
Games Development 2 Entity / Architecture Review
Presentation transcript:

CS 4730 Game Design Patterns CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)

CS 4730 Architecture Big Picture Credit: Walker White 2

CS 4730 OO to MVC We’ve discussed how OO doesn’t quite work for games –Not that we have to throw it all out of the window, but class bloat can be a problem We have also discussed MVC in which –We have a lightweight model representing world objects –We have a heavyweight controller in the game loop –We have a drawing method 3

CS 4730 The Decorator Pattern Remember when we discussed the decorator pattern? The idea was that we could have objects that we “hung” various functionality bits on that would handle how that object behaved in the world What if we could take that to the extreme? 4

CS 4730 Entity-Component-System Another game architecture pattern is Entity- Component-System First really described by Scott Bilas of Gas Powered Games and then by Adam Martin ECS is a pattern in which each object in the world is completely unique (as in, is represented by a single “primary key” integer) In fact, ECS works kinda like a database… 5

CS 4730 What is an Entity? This might be a bit hard to swallow for OO programmers What is an Entity? –An Entity is a globally unique number –For every discernible thing in your game-world, you have one Entity (not one class, one actual Entity) –Entities have no data and no methods 6

CS 4730 What is a Component? A Component provides an aspect of state to an Entity –Want an Entity to have position in the world? Give it a Spatial Component –Should the Entity have health? Add a Health Component –Does it have velocity like a bullet? Fantastic – add the Velocity Component 7

CS 4730 What is a Component? Martin: “ALL the data goes into the Components. ALL of it. Think you can take some “really common” data, e.g. the x/y/z co- ords of the in-game object, and put it into the Entity itself? Nope. Don’t go there. As soon as you start migrating data into the Entity, you’ve lost. BY DEFINITION the only valid place for the data is inside the Component” Why is this? 8

CS 4730 Abstraction Everything is abstracted away! An Entity is just a “place to hang” stuff It’s the combination of Components that creates a unique in-game object! The Entity is simply a “primary key” that holds all the Components together Then how do things get updated? 9

CS 4730 What is a System? A System is a cohesive set of functionality that does all of one thing in the game (i.e. it holds all the behaviors) –Collision Detection –Player Input –Enemy AI and Movement –Rendering –Enemy Spawning –Physics 10

CS 4730 Systems 11

CS 4730 What good does this do? It makes the game MUCH more modular You can plug-and-play pretty much anything You can change out functionality without affecting the rest of the game And most importantly, it can make your design data-driven 12

CS 4730 Data-Driven Design Who is involved in making a video game? 13

CS 4730 Data-Driven Design Who is involved in making a game? –Programmers –Level designers –Dialogue writers –Visual artists –Musicians –Sound effects designers –Etc… Not all of these folks are programmers… 14

CS 4730 Data-Driven Design The idea is that all content is NOT hardcoded into the game system This includes: –Art –Music –Levels –Dialogue –AI scripting –Etc… 15

CS 4730 Data-Driven Design Why? –Optimize the game creation pipeline; multiple folks working on different things –Makes your job of creating content MUCH easier in general (put all the levels in one folder – when the game starts, it loads all the levels in that folder!) –Could support the community to create their own content –Easier to reuse code later (not tied to the specifics of that game) 16

CS 4730 Formats How should you create your data files? Art assets should be standard formats Scripts, dialogue, and other text info? –XML is a reasonable option and C# has libraries to parse it –JSON could be an option as well, but might require more parsing 17

CS 4730 ECS meets Data-Driven Users can have more control over the game if you let them Steam Workshop, for example And your process should be a lot easier as well Consider… 18

CS 4730 World of Warcraft – Stock UI 19

CS 4730 World of Warcraft – Modded UI 20

CS 4730 A Game Within A Game I can’t tell you how much time I’ve spent finding WoW mods… Example lua code for WoW: function HelloWorld() print("Hello, World!"); end 21

CS 4730 A Game Within A Game XML Document that goes with it: <Ui xmlns=" xmlns:xsi=" instance" xsi:schemaLocation=" HelloWorld(); 22

CS 4730 StarWarrior Example See the StarWarrior MonoGame example using the Artemis ECS Framework! 23