OOP

Started by
6 comments, last by GameDev.net 17 years, 10 months ago
Quick question. I'm sure that I know what this means, but I can't put words with the abv. What is OOP?
Advertisement
Object oriented programming.
Okay, I guess I didn't know what it was.

Okay, what is Object Oriented Programming? Things like OpenGL and DirectX?
object oriented programming is a way of keeping your code clean, and almost modular.

so for instance, in your main code you would have you game loop, some function prototypes and such.
then you would include a header file that contained your AI classes and formulas, your graphics rendering functions and so on.

it makes your code much cleaner and IMO makes code much easier to follow and debug

i know this isn't very clear but im at work and can't really type it all out
My tech blogEasy Tech Talk
Quote:Original post by iomanip
Okay, what is Object Oriented Programming? Things like OpenGL and DirectX?
OpenGL and DirectX are APIs.

OOP is a method of programming, dividing imperative functions and state into separate modules called objects. It can help with organization of code, abstraction and encapsulation.

See Object-oriented programming on wikipedia. In C++, C# and Java, OOP is supported with classes and inheritance.

Contrast this with Procedural programming, which OOP is an evolution of, and Functional programming which is quite different from both OOP and procedural programming.
Try reading the Wikipedia entry. It is more thorough than anybody here could be.
Object Oriented Programming is just a paradigm, there are lots of those around and knowing them improves your quality of code. Some of them are made by computer scientist, some by software developers(or by those who are both).

The worst thing you can do with them is to start thinking that one of them is a silver bullet which solves all your problems.

Best thing you can do with them, to learn how to use them, then benefit from them. Use their strong and weak points to your benefit.
~ person who has nothing to say feels itself naked in enviroment where nonsense is hard to camouflage into the nonexistent myriad of noises. ~
OOP is a means to an end ;)

This topic is closed to new replies.

Advertisement