Principles of Computer Game Design and Implementation. Lecture 3

Similar documents
Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++

Game Development for

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory

Patterns Of Enterprise Application Architecture

Scripted Components: Problem. Scripted Components. Problems with Components. Single-Language Assumption. Dr. James A. Bednar

Scripted Components Dr. James A. Bednar

Java FX 2.0. Dr. Stefan Schneider Oracle Deutschland Walldorf-Baden

Patterns and Testing

Seminar report Software reuse

01 INTRODUCTION TO COURSE

CHAPTER 5 GENERAL OOP CONCEPTS

Product Features. Web-based e-learning Authoring

An Introduction to Tilde

CS354R: Game Technology

Programming Fundamentals of Web Applications

Expanding Our Horizons. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 9 09/25/2011

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

CHAPTER 1. Objects, UML, and Java

Edexcel CiDA Course Overview

Long term Planning 2015/2016 ICT - CiDA Year 9

Cross-platform software development in practice. Object-Oriented approach.

Learning to Provide Modern Solutions

The Legacy Bridge Problem. Douglas Lyon and Chris Huntley

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy

Game Architecture Revisited

A script is a computer program that automates the sort of task that a user might otherwise do interactively at the keyboard.

TITLE CLOUD BASED VIDEO ANIMATION RENDERING MANAGEMENT SYSTEM INVENTOR: Thomas Ryan Mikota, of Orem Utah

,

Summary of the course lectures

XBS Application Development Platform

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

INTRODUCTION TO THE COURSE

Front-End Web Developer Nanodegree Syllabus

Multimedia Information Systems Design Patterns & Web Frameworks (Part 1) VU ( ) Christoph Trattner

Django with Python Course Catalog

Eight units must be completed and passed to be awarded the Diploma.

<Insert Picture Here> JavaFX 2.0

XVIII. Software Architectures

Spring It takes a really bad school to ruin a good student and a really fantastic school to rescue a bad student. Dennis J.

Visual Basic Primer A. A. Cousins

Design Patterns for CGI Web Applications with Visual Basic

White Paper: Delivering Enterprise Web Applications on the Curl Platform

Support notes (Issue 1) September 2018

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

Object Oriented Programming

Case studies: Outline Case Study: Noughts and Crosses

Anaglym: A Graphics Engine Providing Secure Execution of Applications

Rethinking VDI: The Role of Client-Hosted Virtual Desktops. White Paper Virtual Computer, Inc. All Rights Reserved.

Chapter 1 Introduction to Computers, Programs, and Java

Project: Standard Framework of Video Content Processing

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Introducing Computer Programming

Design Patterns. Gunnar Gotshalks A4-1

SketchUp. Website:

Software. CPU implements "machine code" instructions. --Each machine code instruction is extremely simple. --To run, expanded to about 10 machine code

"Web Age Speaks!" Webinar Series

MIDDLEWARE A Brief Overview

Mobile Game Programming

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Object oriented programming Concepts

Beginning Android Tablet

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Introduction CHAPTER1. Strongly Recommend: Guidelines that, if not followed, could result in an unusable application.

CG: Computer Graphics

ITM DEVELOPMENT (ITMD)

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

17. GRASP: Designing Objects with Responsibilities

CSC 222: Object-Oriented Programming. Fall 2015

Design Pattern Detection

Introduction to Software Engineering

,

Concepts of Programming Languages

Key Features and Benefits

LECTURE 3 ADMINISTRATION SECTION -A

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

PHP and MySQL Programming

CS 153 Design of Operating Systems

Chapter 3: Operating-System Structures

Programming. Languages & Frameworks. Hans-Petter Halvorsen, M.Sc. O. Widder. (2013). geek&poke. Available:

An Approach to VoiceXML Application Modeling

JSish. Ryan Grasell. June For my senior project, I implemented Professor Keen s JSish spec in C++. JSish

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

Programming in Visual Basic with Microsoft Visual Studio 2010

Fast Track to Core Java 8 Programming for OO Developers (TT2101-J8) Day(s): 3. Course Code: GK1965. Overview

Microsoft PowerPoint level 1 course content (1-day)

PSICon Daniel G. A. Smith The Molecular Sciences Software molssi.org

Principles of Computer Game Design and Implementation. Revision Lecture

1. Write two major differences between Object-oriented programming and procedural programming?

the gamedesigninitiative at cornell university Lecture 13 Architecture Design

Comparative analyses for the performance of Rational Rose and Visio in software engineering teaching

the gamedesigninitiative at cornell university Lecture 12 Architecture Design

What is the Best Way for Children to Learn Computer Programming?

Technical Game Development II IMGD 4000 (D 11) 1. having agents follow pre-set actions rather than choosing them dynamically

The Design and Implementation of a Modern Lisp. Dialect

SMK SEKSYEN 5,WANGSAMAJU KUALA LUMPUR FORM

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

CHOOSING THE RIGHT HTML5 FRAMEWORK To Build Your Mobile Web Application

Copyright Khronos Group Page 1. Vulkan Overview. June 2015

Transcription:

Principles of Computer Game Design and Implementation Lecture 3

We already knew Introduction to this module History of video High-level information for a game (such as Game platform, player motivation, game structure, player-game model, character archetype, game genres 2

Outline for Today Overall architecture Game structure scripting language 3

Game Architecture

More than Code Until the 1980s programmers developed the whole game (and did the art and sounds too!) Now programmers write code to support designers and artists (content creators) The code for modern games is highly complex With code bases exceeding a million lines of code, a well-defined architecture is essential 5

History Initially, games were written as a monolith entity Ad-hoc manner Low-level programming languages (Assembly, C) Low resource requirements Atari 2600 VCS only had 4K memory for the entire game! Rapid development of hardware lead to poor code reuse 6

History id Software games (Doom and Quake) were so popular that other developers preferred to licence their 3D manipulation code rather than develop it from scratch Leads to a better design in computer games 7

Overall Architecture: Ad-hoc No organisation Code grows organically Subsystems not identified nor isolated Works for small projects (used in the past also for efficiency) 8

Overall Architecture: Modular Subsystems clearly isolated Well-defined module interfaces Reuse and maintainability Dependencies between modules are not controlled 9

Overall Architecture: DAG Modular + no cycles Classify modules Higher-level E.g. Game-specific code Lower-level E.g. Platform-specific code 10

Overall Architecture: Layered Rigid layers Can only interact with modules directly below Can lead to code duplication Give MODULE A access to MODULE I Improves portability and best for code reuse 11

Perils of Modular Architecture We want something like this AI Graphics Physics We want something like this for this game No silver bullet 12

Game Subsystems Input Networking Rendering Sound Script Loading Front-end HUD Physics AI/Gameplay Ideally, we wan them to be as independent as possible Each system as a black box with controlled communication But Renderer, Physics, Networking, sound, AI all need positions of objects 13

Inspiration: MVC Pattern In business applications, Model-View- Controller design pattern is quite popular Model: data View: UI Controller: links the two World model Graphics Game Engine 14

Game State A collection of information that presents the state of game entities in a particular moment Position, orientation, velocity Behaviour, intentions, Geometry Putting it all together (global state) may not be a good idea 15

Game Structure 16

Large Projects Game code Anything related directly to the game Game engine Any code that can be reused between different games Tools In house tools Plug-ins for off-the-shelf tools 17

Game Code Everything directly related to the game Camera behaviour Characters AI entities Choices C, C++, but increasingly scripting languages used 18

Scripting Languages Why use scripting languages? Ease and speed of development Short iteration time Code becomes a game asset Offer additional features and are customizable Can be mastered by artists / designers 19

Scripting Languages Drawbacks Slow performance Limited tool support Dynamic typing makes it difficult to catch errors Awkward interface with the rest of the game Difficult to implement well 20

Scripting Languages Popular scripting languages Python Lua Custom scripting languages UnrealScript, QuakeC, NWNScript 21

Game Engine To isolate game from hardware To encourage code reuse To simplify game development Tasks: Rendering (2D or 3D), physics, sound, animation, networking AI Interface to game code 22

C++ Initially, there was no alternative to the Assembly language (performance, resources) Then, C became the most popular language for games Today, C++ is the language of choice for game development especially in game engines 23

C++: Strengths Performance Control over low-level functionality (memory management, etc) Can switch to assembly or C whenever necessary Good interface with OS, hardware, and other languages 24

C++: Strengths High-level, object-oriented High-level language features are essential for making today's complex games Has inheritance, polymorphism, templates, and exceptions Strongly typed, so it has improved reliability 25

C++: Strengths C Heritage C++ is the only high-level language that is backwards-compatible with C Has APIs and compiler support in all platforms Easier transition for experienced programmers 26

C++: Strengths Libraries STL (Standard Template Library) Comprehensive set of standard libraries Boost: widely used library with wide variety of functionality Many commercial C++ libraries also available 27

C++: Weaknesses Too low-level Still forces programmers to deal with low-level issues Too error-prone Attention to low-level details is overkill for highlevel features or tools 28

C++: Weaknesses Too complicated Because of its C heritage, C++ is very complicated Long learning curve to become competent with the language 29

Java for Game Development Why use Java? It's a high-level OO language that simplifies many C++ features Adds several useful high-level features Easy to develop for multiple platforms because of intermediate bytecode Good library support 30

Java for Game Development Performance Has typically been Java's weak point Has improved in the last few years: still not up to C++ level, but very close Uses Just-In-Time compiling and HotSpot optimizations Now has high-performance libraries Also has access to native functionality 31

Java for Game Development Platforms Well suited to downloadable and browser-based games Dominates development on mobile and handheld platforms Possible to use in full PC games More likely to be embedded into a game Not currently used in consoles 32

Java for Game Development Teaching Java game development Java is taught to all our students We can concentrate on game development issues rather than on the study of a new language Knowledge can be used in broader context We will use a Java game engine, jmonkeyengine 33