Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

107 Neutral

About inquisitor34

  • Rank

Personal Information

  • Interests
  1. inquisitor34

    Comment on wrapper for memory management functions

    Thank you for the input.   I am writing a game engine as a school project. One of the main objective is to design something that is extensible; efficiency is towards the bottom of the totem pole (largely immaterial but not completely irrelevant)   My rationale for creating the PMemoryBase class is to show that I foresaw the need for custom memory management. Does this make sense?
  2. inquisitor34

    Comment on wrapper for memory management functions

    At the very least, class MemoryManager could secure a big chunk of memory from the heap at start-up, then allocate memory from said chunk instead of going to the C++ runtime everytime. Doesn't that make sense?   I have access to the PhyreEngine code and they are doing something similar (can't be any more specific or post code because that stuff is proprietary).
  3. Hello all   I want to have some basic control over memory allocation in my game engine. I use the classes IAllocatable and MemoryManager.   All classes in the engine derive from IAllocatable. Whenever objects of these classes are instantiated, they automatically call the MemoryManager which in turns calls the standard C/C++ memory functions. Does this make sense? Am I doing something wrong? Any pitfalls I should watch out for? #ifndef IAllocatable_H #define IAllocatable_H   class IAllocatable { public: void* operator new(std::size_t sz); void operator delete(void* ptr); };   #endif   #include "IAllocatable.h"   void* IAllocatable::operator new( std::size_t sz ) { return MemoryManager::malloc(sz); }   void IAllocatable::operator delete( void* ptr ) { MemoryManager::free(ptr); }   #ifndef MemoryManager_H #define MemoryManager_H   class MemoryManager { public: void* malloc( std::size_t sz ); void free( void* ptr ); };   #endif   #include "MemoryManager.h" void* MemoryManager::malloc( std::size_t sz ) { return std::malloc(sz); }   void MemoryManager::free( void* ptr ) { std::free(ptr); }  
  4. inquisitor34

    How to determine whether OpenAL is installed?

    @Infinisearch   No, I am doing conditional compilation using preprocessor directives and wondered whether I can detect, at compile time, if OpenAL is installed.
  5. Hello everybody   How can I determine whether OpenAL is installed? Is there a #define equivalent of _WIN32?   Thanks
  6. inquisitor34

    Create a tunnel in 3D space

    Thanks for the reply. Your solution is very elegant.   I think I understand it but I'll enumerate the steps anyway.   1. Form a 3D curve from a series of control points. 2. At 'n' interval, pick a point on the curve and calculate the tangent to the curve, then the unit normal. 3. Using the unit normal, form a circle around the initial point (of radius 'r') that consists of a fixed number of points. 4. At 'n+1' interval, repeat the process above. 5. Use the points on the two successive circles to form patches of geometry (quads or triangles). 6. Repeat for the entire length of the curve.   I do need code (or pseudocode) for this because the devil is in the detail.
  7. inquisitor34

    Create a tunnel in 3D space

    Thanks for the reply. What kind of information do you require?   I want to implement an algorithm that creates a tunnel in 3D space that bends and curves. The tunnel's (i.e. cylinder's) geometry is generated procedurally. Some module X takes the series of cubic/quadratic Bezier curves as input and produces the tesselated surface area of the tunnel which I can then render.
  8. Hello   I am trying to create a tunnel in 3D space as follows: 1. Use a series of 3D control points to form a 3D curve. 2. Use some algorithm (?) to produce geometry for its surface, assuming a constant radius.   Is it possible, what's the level of difficulty and where do I start?   Thanks in advance for helping out.
  • 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!