Jump to content
  • Advertisement

krum

Member
  • Content Count

    333
  • Joined

  • Last visited

Community Reputation

255 Neutral

About krum

  • Rank
    Member
  1. Quote:Original post by Freestyler Firstly Qt is both commercial and GPL, Qt is LGPL. Huge difference.
  2. krum

    C++

    Quote:Original post by Atrix256 Quote:First of all, know that C++ is an overhyped legacy piece of shit. Just so you get a balanced viewpoint, I wanted to say that I disagree with that statement. I also have 10 years professional programming experience, and 3 years professional game development experience. I have 25 years professional programming experience, and 10 years professional game development experience, and I approve of this message.
  3. krum

    SceneGraph Implementation

    Quote:Original post by Kwizatz Scene Graphs seem like a good idea, but they're not, I completely disagree with much of Tom Forsyth's arguments against scene graphs. Scene graphs solves all sorts of problems that can not be easily implemented any other way. I wouldn't use them to solve every problem that can be solved with them (like scene culling), they should be an integral part of any general purpose game engine. If the game engine that I have to use at work had a scene graph, my life would be much easier.
  4. krum

    C++: Strange malloc error with std::string

    Quote:Original post by chrisparton1991 Using Strings(2838) malloc: *** error for object 0x1000041e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap Does anyone know why this would happen? Cheers. This is a bug in the 10.6 SDK.
  5. A hint for you is that quaternions in max are already left handed. I also know I spent a month wrestling with this problem until I found this little tidbit in the documentation. I do not know the answer for certain because all of the engines that I've used are right handed internally, so they invert the quaternion to a right-handed system for use in the engine, then convert back into left-handed by the D3D rendering system. Also quaternions are not z-up or y-up. They are left or right. You can have a right-handed frame that has Y-up - which axis is up is an arbitrary decision of the engine developer.
  6. krum

    Replacement for MFC

    Also, my opinion is that wxWidgets is no easier to use than MFC. The upside to wxWidgets is that it's reasonably cross platform.
  7. krum

    Replacement for MFC

    You might want to check out Windows Template Library. But really MFC is not really that complicated in the grand scheme of things (I've used MFC since the early 90s with VC 1.5 - and would generally discourage its use). But also, it is not uncommon to develop UI systems in C# and use P/Invoke or C++/CLI to integrate with native C++.
  8. Debug::WriteIf(FAILED(hr),kTraceCrit, format("[%s] %s") % "default.fx" % buffer); So, Debug class optimizes out in release mode.
  9. krum

    ROAM + Perlin Noise

    ROAM uses a variance tree. You will need to recompute this tree in real-time. This is no trivial task, but I can assure you that it is possible. I personally prefer SOAR over ROAM as they provide similar results but SOAR can generate the triangle mesh considerably faster than ROAM. To Matt, people do use hardware-optimized implementations of ROAM.
  10. krum

    message loop

    I can not think of a PC game that I've worked on in the last 10 years that had a sleep in the main loop while the game window had the focus. If your fan is kicking on it just means you are CPU bound. FWIW, I have one computer at home with a loud fan on the CPU that kicks on while my kids are playing WoW (I can hear it across the house, which is pretty big). You could also enable vsync on the rendering. The rendering thread will block on the vsync signal if you do this.
  11. krum

    Unknown syntax funtion():x,y

    This is a constructor initialization list.
  12. krum

    smart pointers for directx 10

    The address-of operator in CComPtr renders it unusable in some STL containers. Since my engine uses a COM-like framework, I use my own IUnknown compatible smart pointer class that doesn't have an overloaded address-of operator. Instead I use a method that returns a pointer to the interface pointer. hr = m_spD3D->CreateDevice( adapter, devType, param.hDeviceWindow, D3DCREATE_HARDWARE_VERTEXPROCESSING, &param, m_spDevice.out()); FWIW, there's the source to my class: template<class T> class ComPtr { public: ~ComPtr() { Assign(0); } ComPtr() : m_ptr(0) { } ComPtr(const ComPtr& arg) : m_ptr(0) { Assign(arg.m_ptr); } ComPtr(T* ptr) : m_ptr(0) { Assign(ptr); } template<class U> ComPtr(U* ptr) : m_ptr(0) { Assign(static_cast<T*>(ptr)); } template<class U> ComPtr(const ComPtr<U>& arg) :m_ptr(0) { Assign(static_cast<T*>(arg)); } ComPtr& operator=(const ComPtr& arg) { Assign(arg.m_ptr); return *this; } ComPtr& operator=(T *arg) { Assign(arg); return *this; } template<class U> ComPtr& operator=(U* arg) { Assign(static_cast<T*>(arg)); return *this; } T& operator*() const { return *m_ptr; } operator T*() const { return m_ptr; } T* operator->() const { return m_ptr; } bool operator==(const ComPtr& ptr) const { return ptr.m_ptr == m_ptr; } bool operator==(T* ptr) const { return ptr == m_ptr; } bool operator!=(const ComPtr& ptr) const { return ptr.m_ptr != m_ptr; } bool operator!=(T* ptr) const { return ptr != m_ptr; } bool operator<(const ComPtr& ptr) const { return m_ptr < ptr.m_ptr; } bool operator<(T* ptr) const { return m_ptr < ptr; } operator bool() const { return m_ptr != 0; } bool operator!() const { return m_ptr == 0; } T** out() { Assign(0); return &m_ptr; } void** void_out() { Assign(0); return (void**)&m_ptr; } T* get() const { return m_ptr; } protected: void Assign(T* ptr) { if (ptr != m_ptr) { if (m_ptr) m_ptr->Release(); m_ptr = ptr; if (m_ptr) m_ptr->AddRef(); } } protected: T* m_ptr; }; // -------------------------------------------------------------------- template<class T, const UUID* pUUID> class ComQIPtr : public ComPtr<T> { public: template<class U> ComQIPtr(const ComPtr<U>& arg) { if (arg) arg->QueryInterface(*pUUID, ComPtr<T>::void_out()); } template<class U> ComQIPtr(U* ptr) { if (ptr) ptr->QueryInterface(*pUUID, ComPtr<T>::void_out()); } };
  13. Pointers... Using C# as a dynamically loadable and reloadable scripting language...
  14. krum

    Game structure

    Honestly, I couldn't use a bunch of globals in my engine if I wanted to. Everything is divided into separate DLLs which communicate with each using a global service provider - which incendentally is a global, except that each DLL has it's own instance which is set by a module loader when the DLL is loaded at run-time. This global is defined as extern ComPtr<IServicePool> g_spServicePool; and the interface definition is struct IServicePool : public IJmUnknown { virtual void GetService(const UUID& sid, const UUID& iid, void** ppvObject) = 0; virtual void ShutdownServicePool() = 0; virtual void Assign(const UUID& sid, IJmUnknown* pUnk) = 0; virtual void LogMessage(const wchar_t* message) = 0; virtual bool CreateInstance(const UUID& clsid, const UUID& iid, void** ppvResult) = 0; virtual bool UnloadModules() = 0; }; There was one other game I worked on a long time ago that used a similar system. The system used by the game I will not mention is part of one of the largest franchises of one the largest game publishers in the world, and many of the games produced by the studio use the same framework.
  • 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!