Post on 04-Jan-2016
Games Development 2Review & Revision Strategy
CO3301
End of Semester 1
Today’s LectureToday’s Lecture
1. Exam Overview2. Exam Structure 3. Module Overview
– Entity IDs & communication, update & rendering– Resource Management– Data for Games / XML– Scripting for Games / Python– Tools for Games / C# – Concurrent Programming– Component-based Entities
4. Example Questions
Exam OverviewExam Overview
• Third year exams have a different focus than your second year exams:– 2nd year: Explain process X; Describe concept Y– 3rd year, some of the above – But also: Evaluate process X for use in situation Y; Compare
techniques A & B
• Some marks for explaining module content• But many more marks for being able to evaluate what you
have learnt– Discussing topics rather than repeating them
• Applies to a greater or lesser extent to all exams
Exam StructureExam Structure
• Structure of this module’s exam:– Answer three questions out of four– Covering semester 1 material– Two hour exam + 10 minutes reading time
• Many questions are focused on comparisons between techniques– E.g. Compare use of entity pointers with UIDs– Case studies often used as basis for discussion
• Use notes and experience from labs / assignments to provide an intelligent discussion
• Will be a similar exam at the end of semester 2– On AI material
Topics: Entity IDs & Comms Topics: Entity IDs & Comms
• Need for and examples of entity identification• Identification alternatives:
– Entity pointers, named entities, entity UIDs– Usage of each of the above– Discussion of relative merits
• Implementing UIDs; Hash tables• Enitity interaction alternatives:
– Direct entity-entity class interaction• Use of member functions
– Messaging system; implementation issues– Pros and cons
Entity Update and Rendering Entity Update and Rendering
• Unique update function for each entity type– Contrast with single scene update function– Pros and cons
• Rendering functions, including pre- and post- rendering• Comparison with Model / Mesh approach
• Presented turning & movement work in week 2– Supports Gareth's material
• Method is examinable– With formulae
Resource ManagementResource Management
• Loading resources– At scene setup– Using setup script (c.f. XML)– Resources from templates– Streaming resources (large environments)
• Resource Manager– Dealing with shared resources / resource destruction
• Reference counting
– Late loading of resources
• Resource IDs– Kinds of resource
Text-based Game Data / XMLText-based Game Data / XML
• Hard-coded data– Examples– Limitations– Consider manual scene-setup & similar
• Rationale for using structured data language in games– Flexibility– Future-proofing
• Contrast between scripting and data languages• XML as a game data language
– Pros & cons, alternatives
Scripting for Games / Lua / Python Scripting for Games / Lua / Python
• Explanation of game scripting• Rationale
– Ease of use, iteration time, scripts as assets, flexibility
• Drawbacks– Performance– Clumsy interface code– Need for shared data between main code and script
• Consideration for use of scripting or not– Case studies
• Scripting languages• Lua / Python
– Key features– Simple programming
Component-based EntitiesComponent-based Entities
• Limitations of entity hierarchy / OO approach– Rigid hierarchy - inflexible– Tight coupling between parent & child etc.
• Component based alternative:– Components represent entity properties or abilities– Add / remove components dynamically– Entities become simple containers
• Pros & cons– Hierarchy much simplified– Great flexibility– Much more message passing– May be difficult to control precisely
Concurrent ProgrammingConcurrent Programming
• Explanation of concurrent programming– Distinction from parallel programming
• Processes & Threads– Difference
• Data / Resource Coordination– Example problem situations– ‘Race’ Conditions
• How to resolve
• Synchronisation techniques– Critical Sections, Mutexes, Semaphores– Timers, Events
• Deadlocks
Tools for GamesTools for Games
• Tools programming– Tool types and uses– Tool development
• Tool chains– Examples
• Increasing use of other high level languages (e.g. C#)– Rationale for use in games tools
Material not on ExamMaterial not on Exam
• The mathematical detail of camera picking will not be examined– An overview of the process involved may be required though
• Extensible factories will not be examined• The console development / middleware lecture will not be
covered
• Both Lua and Python may be covered– Especially comparative questions– However, any short scripts you are required to write will be in Lua
Example QuestionsExample Questions
• i) Evaluate three methods for entity identification
ii) What are the advantages and disadvantages of component-based entities
• i) Discuss the rationale for scripting in a large-scale commercial game
ii) Suggest a scenario when “.ini” files would be a justifiable alternative to XML files for text-based game data
• Further examples provided on past paper and worksheet