Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

172 Neutral

About Extremophile

  • Rank
  1. Extremophile

    UE4, CRYENGINE, and UNITY 5: Will it work?

    Crytek is interesting, but does it offer the full C++ code ? Otherwise I would go with Unreal.
  2. Extremophile

    You Don't Need to Hide Your Source Code

    Suppose you worked hard on a very unique game feature that makes your game feel different (for example, the gravity in Mario Galaxy), would you really want to share that with Zynga ? And saying that programming is not art is totally wrong especially in object oriented design.
  3. Extremophile

    Encapsulation and composition ?

      I used unique_ptr to express ownership in the example (or if scene was polymorphic), but it would be similar to having it as value type and GetScene() returning a reference.     That what I'm wondering. If I'm a OO taliban, would engine be the only guy who can manipulate a scene ?      No, I only use unique_ptr for polymorphism and pointer ownership.      Yeah that's what I thought but it sounds evil. Overall it seems if I want to manipulate a scene from another object, I have to either make it public (or returning a reference / pointer), or duplicate all of Scene methods into Engine for delegation.
  4. Encapsulation is obvious when I have some basic class with a few ints, floats, etc (return by copy). But often I have to either :   1- deal with bigger objects where I can't afford copying, or copying wouldn't make sense 2- polymorphic object which has to be a pointer / reference, so it can't be returned by value.   For example,   class Scene {     std::vector<Entity*> m_Entities;     //...     //Some other big data public:     //some member functions     void InitSkyBox(const SkyboxInfo&); };   class Engine {     std::unique_ptr<Scene> m_CurrentScene; public:     void LoadScene(const std::string& sceneStr);     void UnloadScene();     Scene* GetScene() const {return m_CurrentScene.get();} };    void clientCode(...) {     Scene* curScene = engine->GetScene();     curScene->InitSkyBox(skyboxinfo);     //... }   Engine is responsible for the life time of the scene, as it manage loading / unloading etc. Many objects may need to access the scene. For example if I have an object that controls the skyboxes, I could need to get the scene, retrieve the current skybox and modify it. I could also need the scene object to raycast and query a list of entities.   What would be the best approach for this ? If I understand correctly Encapsulation is broken since I returned the scene ptr (handle to internal data) and the client code can do whatever it wants without Engine being aware.   My options would be :   Option A : "Copy" every member function of scene in engine and use delegation instead :   void Engine::InitSkyBox(const SkyboxInfo& info) {     if(m_Scene.get())     {         m_Scene->InitSkybox(info);     } }   Now Engine has better control over the scene, but that wouldn't scale well, it could duplicate every methods of scene.      Option B : Return a const pointer instead.   const Scene* const GetScene() const {return m_Scene.get();}   Seems a bit better, but I'm still returning an "handle" to an internal (see Scott Meyers effective c++), and can't call a non const operation.     So, if Scene is a well encapsulated object, how bad is it to return it from the class that is responsible for its lifetime ? I know that objects that refer to the scene could have dangling pointers if the Engine dies before it, but that would be unlikely.   In a game engine, unfortunately, you would also need to retrieve entities / components from everywhere, breaking your scene's encapsulation of entities.   I'm curious to see how you deal with this in your code. Not sure if there is a silver bullet for this :)   Thanks,   X    
  5. Extremophile

    So I want to make an MMORPG

    I was thinking about building a boat alone. It would be as big as the Black Pearl. Where do I start ?
  6. Super Meat Boy, Angry Bird, Braid, none of these games used a game engine. They used libraries. I think it's the best compromise, you learn a lot more and aren't stuck with closed source and licenses.
  7. Extremophile

    Game Engine, How do I make one

    Are you interested in learning how a game engine work ? Or you just wanna make a game as fast as possible ?   With Unreal/Unity you can make a game faster, but you have no access to the source code, have limited code reuse (especially with Unreal where you are stuck with their homemade scripting language :( ) and often urged to upgrade. I have a couple of friends who use Unity and they often end up writing / buying third party software because Unity lacks what they want, like NGUI or the sprite manager.    If you go the brute force, C++ way, you'll have to code a lot, but the good new is that there are amazing libraries that you can get, like Ogre (I'd wait Ogre 2.0 though), CEGUI, FMOD, PhysX, Qt etc.. (don't write everything from scratch). I choose this approach because I value code reuse and ownership. At long term I think it's the better choice. It's not THAT long if you just code what you really need for the game.
  8. Honnestly, between VS express and QtCreator, I choose QtCreator, even for non Qt projects :   1- uses GCC (or clang), have full C++11 features, which VS still lacks even in 2013 (full compliance will likely be on vs 2014-15) 2- Impressive intellisense, partial features of VAX like switching from .cpp/.h (but not as good as VAX) 3- Cross platform. I can work on my project at home or on my Ubuntu laptop 4- Well, it's Qt. You probably will need an editor. Qt now has QtQuick, a way to build GUI similar to WPF. It's more mobile oriented, but I think desktop components are coming.
  9. Extremophile

    the games with the most influence on your life

    Considering my "gaming peak" was in the mid 90s :   My favorite game of all time is Chrono Trigger.   Very close are : Zelda : A link to the past Super Mario World Final Fantasy VI(III US) Seiken Densetsu 3   The last game that really impressed me is Bioshock Infinite.  
  10. Extremophile

    Remember the Virtual Boy?

    Haha Mario Tennis and that red line game... Memories.
  11. Extremophile

    What library to choose to write games in C + +

    Do you want to make games in 2D or 3D ?   For 2D, as other said, SFML is pretty good. If you are interested in C#, I heard Monogame is hot these days.   For 3D, you could use Ogre3D (it's very OOP). It's pretty easy to have a model on your screen. Just follow the basic tutorials on the site and you should be up pretty fast. However Ogre is only a rendering engine, so you will have to plug other stuff like UI (CEGUI), PhysX, FMOD, etc.   I don't know what your programming level is, looks like you are a beginner. Before tackling Ogre, you should read a C++ book, like Principles and Practice Using C++.   Be patient ! C++ is hard to learn but it's very rewarding.   
  12. It's not about NOT writing an engine; ultimately the end product WILL be an engine, albeit very specific to the game. You can then reuse aspects that are generic in the next game and so on until you end up with software that could be made generic enough for a family of game styles (or whatever). And this is the key issue: the description you gave of the components you feel you need are very game-centric because there is a very clear and specific goal to the project (Torchlight clone). Already the direction is focused and the design anticipations are reasonable for an actual end product, rather than trying to guess what you think you'll need for the Super Uber MegaEngine (tm) that will do every game style on the planet, kill CryTek dead in the water and even make you coffee whilst you're at it (and on your first coding attempt to boot!). It's a philosophical position rather than a literal, immutable rule.     All right. The article was aiming at people who want to remake a complete engine like Unity even if a high percentage of features will be useless for the game they had in mind. Then I guess I agree with it, it would take a decade.
  13. I would like to make the game and not the engine, but say I wanna make some Torchlight clone. I need to build game maps, so obviously I would need to write an editor. To save data I need to add serialization, then if I want more complicated objects I will need gameobject + component architecture, and it goes on... Finally that pile of code becomes an engine, depending of what is your definition of an engine.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!