Games Development 2 Entity / Architecture Review

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
Survey of Graphics and Games. Outline Overview of computer graphics – Coursework – Research Programming using game engines Computer game and animation.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
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.
Software Design & Development Software Design & Development Programming Types Event Driven Programming Event driven programming Is a type of programming.
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.
Games Development 2 Entity / Architecture Review CO3301 Week
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.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
Design Patterns.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Games Development 2 Resource Management CO3301 Week 3.
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.
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.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Chapter 14 Part II: Architectural Adaptation BY: AARON MCKAY.
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,
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.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
1 Here are some quotations to get an overview of the kinds of issues of interest.
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.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
What is BizTalk ?
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.
Objects First with Java A Practical Introduction using BlueJ
More (C#) Scripting Day 2, Lesson 1.
CMS High Level Trigger Configuration Management
Chapter 10 Design Patterns.
Systems Analysis and Design With UML 2
Introduction to Design Patterns
Games Development 2 semester 1 Review & Revision
Application Development Theory
Top Reasons to Choose Angular. Angular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is.
Service-centric Software Engineering
Objects First with Java
OOP vs Structured Programming
Software Engineering Lecture #8.
CSSSPEC6 SOFTWARE DEVELOPMENT WITH QUALITY ASSURANCE
COS 260 DAY 2 Tony Gauvin.
Object-Oriented Programming
Class Diagrams.
An Introduction to Software Architecture
Games Development Practices 3D Model Import/Export
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Games Development Game Architecture: Entities
1.3.7 High- and low-level languages and their translators
Games Development 2 Tools Programming
Games Development 2 Text-based Game Data
Games Development 1 Review / Revision
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