Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

skillfreak

argH!.. engine dll confusion

This topic is 5586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making a game engine ( arn''t we all ) and i am going to put the engine in an engine.dll. My reason for this is so i can create a game which would interface this engine as well as a wysiwyg map editor ( wc3 like ) without rewriting any code. My problem is the structure of the engine. Currently it is setup something like class engine : public application { graphicsDevice *gd; inputDev *id; run(); } // please excuse my pseudo code ok.. i''ve had an epiphany. Maybe i should create an interface class ( much like the article on this site describes ) .. well here. lemme write some code again class Engine { // all functions that would be called from engine virtual LoadModel( ~~~ ); virtual RenderScene( ~~~ ); virtual SetGameTime( ~~~ ); // day night cycle virtual CreateMap( width, height, baseheight ); } then the engine would simply extend this interface class. class CoreEngine : public Engine { graphics *gd; LoadModel( ~~ ) { asdfasdf }; } I think this would work. So in the mapeditor or the game, i would just be provided a slew of functions ( kinda like quake ). But in the coreengine, the code would be clean and oo. hmmm.. i''m now wondering if this is the best implementation. Feedback pls. ignore my tangent. Thanks .. andy

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!