Jump to content
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    387718

Objects for dummies

Sign in to follow this  
Stompy9999

180 views

Well, I'm going to recode the engine for Stompy this weekend. Here is a screenie of the origional one:



The origional used pure C code and was a mess of procedural code. This time I'm using some OOP to handle all of my game objects. All game objects will be inherited from a single abstract base class with this prototype:


class CObject
{

public:

SObject m_Sdata;

virtual CObject();
virtual ~CObject();

virtual void m_Handle() = 0;
virtual void m_Draw() = 0;

};





This my first time using classes in my game so we'll see how it goes...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!