Quality Engine coding
I want to start writing an engine the proper way. After looking around, I found the site for the oxygen engine (http://www.mysticgd.com) I think this is definately how I want to write my engine.
The way it''s described, it seems like I''m going to have to learn a lot more about this inheritance stuff. I think it''s written such that there is a base class and all classes inherit from it? Is this right?
Anyway, could I get some information, links, tutorials, etc. on inheritance, proper game engine coding, using DLLs to "plug in" new effects/features, etc.? Anthing that will help is welcome and greatly appreciated.
Thanks in advance!
Here''s an example of the kind of stuff I''d like to know. How could I make a class that was more versatile? Like a linked list class except the data type was a struct, and you could write several different structs for use with the Linked List.
for versiatility, use templates in c++.
templates are just like using variables, except the aspect that''s variable is the type of variables.
if u want, i can e u my c++ ll template, it can create a ll of absolutly any type of data, be it intrinsic, simple, a struct, or an object
basically, if u can write a ll for a single intrinsic type, just change it to a template and replace all of the original intrinsic w/ the template type, and you''ll be good to go (as long as you don''t invoke wrong constructors/destructors etc).
//////////////////////////////
I have no name that you may call me. I am Succinct, so call me as such.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
templates are just like using variables, except the aspect that''s variable is the type of variables.
if u want, i can e u my c++ ll template, it can create a ll of absolutly any type of data, be it intrinsic, simple, a struct, or an object
basically, if u can write a ll for a single intrinsic type, just change it to a template and replace all of the original intrinsic w/ the template type, and you''ll be good to go (as long as you don''t invoke wrong constructors/destructors etc).
//////////////////////////////
I have no name that you may call me. I am Succinct, so call me as such.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-- Succinct(Don't listen to me)
A template is really a good idea. You may want to look at my Linked List template, which can be used as easily as follows:
of course it will work with structs and any other kind of data, too!
-Markus-
#include "TFXQueue.h" class CMyClass { public: int a; int b; CMyClass() { ~CMyClass() {}; void DoSomething(void) { printf("Hello World!\n"); }}; Queue<int> g_pIntList;Queue<CMyClass> g_pClassList; g_pIntList.Add(12);g_pIntList.Add(34);g_pClassList.Add(new CMyClass()); g_pClassList.Reset(); while(CMyClass *pClass = g_pClassList.Cycle()) pClass->DoSomething(); g_pClassList.FlushAndDelete();
of course it will work with structs and any other kind of data, too!
-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
For all intents and purposes, I''d like to use this thread as a resource. Therefore I''d like to add this link to it in case anyone else is doing the same thing.
http://www.gnacademy.org/uu-gna/text/cc/Tutorial/tutorial.html
Great Object Oriented Programming information here.
http://www.gnacademy.org/uu-gna/text/cc/Tutorial/tutorial.html
Great Object Oriented Programming information here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement