10
Unit 71 – Object Oriented Design for Computer Games. Outcome :- 01 – Understand the purpose of OOD for games. 02 – Understand OOD Elements. 03 – Understand OOD Modeling. 04 – Be able to use OOD modeling technique to design a game element.

Unit 71 object oriented design for computer games

Embed Size (px)

Citation preview

Page 1: Unit 71   object oriented design for computer games

Unit 71 – Object Oriented Design for Computer Games.

Outcome :- 01 – Understand the purpose of OOD for games.02 – Understand OOD Elements.03 – Understand OOD Modeling.04 – Be able to use OOD modeling technique to design a game element.

Page 2: Unit 71   object oriented design for computer games

Object Oriented Design

• A game design based Object Oriented Principles.

• Object Oriented Principles are,– Simplified Understanding.– Reusability.– Maintenance.– Efficiency.– Real-world.

Page 3: Unit 71   object oriented design for computer games

OOP - Simplified Understanding

• Completely readable as english sentences.• Example

Variable enemy as GameObject.i.e. var enemy : GameObject;

Enemy’s health decreases by 15.i.e. Enemy.health -= 15;

Page 4: Unit 71   object oriented design for computer games

• Code with reusability in mind.• Never, ever copy and paste code.• Find a general implementation and reuse

- Function and class templates.

OOP - Reusability

Page 5: Unit 71   object oriented design for computer games

Classes, Objects, Inheritance

Page 6: Unit 71   object oriented design for computer games

• Classes :– An association of data structure with the

attributes and function that acts on the data.

• Object :– Objects is created based on a class i.e. instance of

a class.

• Inheritance:– The ability for a class to extend or override

functionality of base class.

Page 7: Unit 71   object oriented design for computer games

• The ability to protect some components of Object from the external use.

Encapsulation

Page 8: Unit 71   object oriented design for computer games

• The ability to create a variable, a function or an object that has more than one forms. i.e. Function Overriding.

Polymorphism

Page 9: Unit 71   object oriented design for computer games
Page 10: Unit 71   object oriented design for computer games