Skip to main content

Object Oriented Programming (Theory)

Welcome! This page will be explaining Object Oriented Programming with examples. The examples are theory only but a code example will be released soon (if not already).

What is Object Oriented Programming?
Object Oriented Programming (OOP) is commonly used in programs which require doing the same things over and over again. Much like a function or method can be ran multiple times, OOP classes can be ran multiple times, simultaneously.

When is OOP used?
OOP is used in games and some other software. The reason it is used in games is because the game requires the same things to happen over and over again at the same time, for example...

Example (Theory):
In games there are entities (characters, animals, keys, doors, etc). Each entity has its own class with it's own variables which is where OOP comes in to play. Say if we had one class which controlled the doors in our map, the objective of the game is to get the specific keys for each door. If we just had one class handling all of our doors, once we got a key it would set the door variable "open" to true and it would open all of the doors in our map. Whereas if we use OOP to control the doors in our map, we still only have one class but all the variables in the class only refer to a single door. Therefore giving us the ability to control seperate doors, with the same amount (or less) of code than that without using OOP.


Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.