unit 71 object oriented design for computer games
TRANSCRIPT
![Page 1: Unit 71 object oriented design for computer games](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/1.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/2.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/3.jpg)
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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/4.jpg)
• 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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/5.jpg)
Classes, Objects, Inheritance
![Page 6: Unit 71 object oriented design for computer games](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/6.jpg)
• 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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/7.jpg)
• The ability to protect some components of Object from the external use.
Encapsulation
![Page 8: Unit 71 object oriented design for computer games](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/8.jpg)
• 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](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/9.jpg)
![Page 10: Unit 71 object oriented design for computer games](https://reader036.vdocument.in/reader036/viewer/2022082813/55c629e4bb61ebc5488b457d/html5/thumbnails/10.jpg)