Games Development 2 Entity / Architecture Review CO3301 Week 7 - 2.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

COM vs. CORBA.
CS 4730 Game Design Patterns CS 4730 – Computer Game Design Credit: Some slide material courtesy Walker White (Cornell)
Survey of Graphics and Games. Outline Overview of computer graphics – Coursework – Research Programming using game engines Computer game and animation.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Object-Orientated Design Unit 3: Objects and Classes Jin Sa.
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 Programming Fundamentals. 2 Data Structures Arrays – Elements are adjacent in memory (great cache consistency) – They never grow or get reallocated.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
CHAPTER 17 Creating an Interactive 3D Environment © 2008 Cengage Learning EMEA.
The chapter will address the following questions:
UNIT-V The MVC architecture and Struts Framework.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Chapter Languages, Programming and Architecture.
Chapter 7 Designing Classes. Class Design When we are developing a piece of software, we want to design the software We don’t want to just sit down and.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Design Patterns.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Games Development 2 Resource Management CO3301 Week 3.
Games Development Practices 3D Model Import/Export CO2301 Games Development 1 Week 17.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Games Development 2 Text-based Game Data CO3301 Week 4.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Chapter 14 Part II: Architectural Adaptation BY: AARON MCKAY.
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
SCIRun and SPA integration status Steven G. Parker Ayla Khan Oscar Barney.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
Motion Planning in Games Mark Overmars Utrecht University.
Games Development 2 Component-Based Entities
Games Development 2 Review & Revision Strategy CO3301 End of Semester 1.
Games Development 2 Overview & Entity IDs and Communication CO3301 Week 1.
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,
Design Patterns. OO-Concepts Don’t rewrite code Encapsulation Inheritance Write flexible code.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
RealXtend vs. Second Life RealXtend overview  Main ambition Promote the evolution.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
Software Reuse Course: # The Johns-Hopkins University Montgomery County Campus Fall 2004 Session 5 Lecture # 4 – October 5, 2004.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
1 Here are some quotations to get an overview of the kinds of issues of interest.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Basic Characteristics of Object-Oriented Systems
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
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.
Introduction to Design Patterns
Games Development 2 semester 1 Review & Revision
Top Reasons to Choose Angular. Angular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is.
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
Games Development Practices 3D Model Import/Export
Games Development Game Architecture: Entities
Games Development 2 Tools Programming
Games Development 1 Review / Revision
Games Development 2 Entity / Architecture Review
Presentation transcript:

Games Development 2 Entity / Architecture Review CO3301 Week 7 - 2

Generalising Game Code This semester, we have looked at a range of related entity- based techniques: –Use of templates and entities –Entity update and rendering –Entity UIDs & messaging –Resource Management –Text-based data for games – XML –Scripting for high-level game logic – Python, Lua All shift away from hard-coded game data / logic Towards more generalised game code –Rapid iterations, "offline" changes, reusable code etc.

What happened to the Mesh? In year one we introduced the concept of a mesh: –The constant geometry of a scene element –Create models from a mesh to populate the scene Only need to load the mesh once –Many models can share the mesh data There is other invariant data for scene elements: –Concrete features: mesh, animations, sounds –Constant game stats, e.g. max HP, top speed etc. –Scripts: behaviour, interface Store this common data in an entity template –The mesh is now just part of the template data

And the Model? A model was introduced as a mesh instance: –A positionable object in the scene Only encapsulated the renderable aspects –Only relevant to graphics Scene elements also need to –Maintain their own game state (e.g. HP, velocity) –Send / receive communication –Have behaviours / AI Introduced the entity to capture all these aspects –The model is now just part of the data stored by an entity

Names / UIDs vs Pointers Used interface pointers for meshes and models With the move to entities and templates we have added other means of identification –Templates and entities are named –Entities also have unique identifier (UIDs) An entity manager can map names / UIDs to pointers when necessary –UIDs are more efficient (hash-maps) This allows for more abstract game logic: –Messaging and scripts using names / UIDs –Safer and sometimes easier than using pointers

Entity Update / Messaging The behaviour and interaction of models generally used global functions / data: –SceneUpdate –Global arrays of data Entities have individual update functions –Read messages, update state, perform behaviour –SceneUpdate calls entity updates, little global code Use entity class data, little need for global data Entities interact by sending messages –Promotes loose coupling: entities don't need to know about each other's operation

Scripted Behaviour / Logic Entity update functions can be written in a scripted language for several benefits: –Scripts can be simple yet powerful –Rapid iterations, good for testing / tweaking –Can be altered at run-time or after release Entities still need to store some data / interface functions –But much of their functionality can be scripted –Does imply an interface between entity and script [Or maybe not – entire entity system could be in script] Must be careful with performance –Scripts are slow to interpret –But high-level game logic often not time-critical

Data-Driven Scene Setup SceneSetup has previously been hand-coded: –Load each mesh in turn –Create and position each model –Also set up cameras and lights This is just setting up of a database –This code is better replaced by data –We could even store entities in a simple database at runtime Now using XML to capture initial game state Entities and templates are created as they are parsed out of an XML file –Replacing hand-coded SceneSetup

Component-based Entities Alternative approach for entity architecture Allows functionality to be added / removed from an entity piece-by-piece Great flexibility, works well with text-based data Possible performance problems: –Much more messaging –Easy to over-architect for the purist – must be practical Requires very careful planning of: –Component types needed –Interaction between components –Can be too flexible and hence difficult to control

Summary Have moved away from programming a game, towards programming a game engine –Our game code is much more abstract now The game content and logic can captured using text- based data, scripts and assets –Flexible and extensible Only a little game-specific code needed: –A few specialised entity classes / components –Some overall game control, e.g. user interface Just a flavour of possible game architectures –No hard and fast rules here – adapt and innovate