Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

144 Neutral

About decsonic

  • Rank
  1. First of all, i would drop the global pointer. /* Synatic Sugar */ Object* instance = Object::getInstance(); instance->setFoo(1); int i = instance->getBar(); Having a global pointer to a singleton makes no sense to me, the point of the singleton pattern is to have safe access to a global instance of an object. (e.g, scenario) class Manager : public Singleton<Manager> { public: void registerObject(Object* obj); void unregisterObject(Object* obj); protected: Stack<Object> objects; }; /* The dark side */ Manager* instance; class Object { public: Object() { /* You have no guarantee that instance is infact valid, shure you could check it, but again then there is no point in using a singleton. */ instance->registerObject(this); } }; /* And now for something slightly different. */ class Object { public: Object() { Manager* instance = Manager::getInstance(); instance->registerObject(this); } }; uhm and thats all that comes to mind right now.
  2. decsonic

    best option for rendering.

    Quote: which is the best option for 3d rendering opengl? or Direct X ?? i mean i find opengl pretty clear and straight coded api First of all, it's a personal preference kinda thing, And you should also consider what's your target platform, and there's no reason why you cant support both either. Performance wise, it's up to your graphics card drivers. Quote: but i think directx is better for handling gamestates and things like that. Depends on what you mean with gamestates, as thats not the job of a 3d api at all. Quote: why most of the new games use directx library? About 50/50 there, atleast from the games i've played.
  3. decsonic

    Writing my own 3d engine

    Quote: btw - I don't know what's a physics engine, so if you could explain that too... Hmm, Suppose you could explain it as, a physics engine applies how things would react in the real world to your 3d enviroment. If your not shure where to start writing, API Abstraction, Math library and a scene graph is a good start. One thing that helped me alot was actually just diving into a 3d package(eg, blender, lightwave, maya, ...), it's easier to see the concepts in action, leaves you thinking of ways to implement that feature in your engine. </2 cents>
  4. decsonic

    Time Function?

    SDL Wiki
  5. decsonic

    OpengGL with SDL

    nehe for opengl tutorials [smile] and of course [google] Edit: And no, you cant mix SDL's 2D framebuffer with OpenGL, however doing 2D in OpenGL is neat.
  6. decsonic

    Isometric landscape

    Hehe yea nice work on mornings wrath, alot of progress since i first saw it :) 2D can still give good results( I Still prefer 2D ), but in general a 3D Api preforms better :( cant seem to get away with good looking lighting without loosing to much speed =/ Edit, You should release the source EDI :P
  • 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!