Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

2319 Excellent

About Alundra

  • Rank
    Advanced Member

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes sorry, it's in C/C++ using a pointer of char containing the valid UTF8 string.
  2. Hi ! I need to check if the UTF8 string ends with the path seperator '/'. So do : if( String[ Length - 1 ] != '/' ) String += '/'; The question is: Is it safe ? Thanks !
  3. Alundra

    Improve Property System

    I talk about a property system like Unreal Editor.. Or any kind of property system. For example settings are minimum, maximum,....
  4. Alundra

    PhysX particle collision

    Hi all ! Looking to add a callback on Actor class when a particle from a particle system component hit an actor. I already have all the collision everywhere using PhysX so I'm looking for a PhysX solution. Create an actor and add/remove/move a sphere collider dynamically is the only solution ? Is it efficient ? Thanks !
  5. Hi all, My actual property system is a class inherit from IProperty with the data stored for each property and settings. It works perfectly but in the final product the settings are not needed, using memory for nothing. Also, allocate on the heap for each data doing "new PropertyFloat" and so on for each type. Also get the memory from the property set is slow compared to access directly. How to improve correctly the property system ? Is it a good idea to have the variable on the class and link this variable by a pointer on this property instead of having the data in the property class ? That means in the editor you have this pointer memory added as memory but then in the final product you don't need it. But then it's needed to still be aware when the property is changed to call all property listener but only in editor mode. Thank you
  6. Hi, I saw an overflow bug on widgets code, I noticed it on the uint32 version when slide down with mouse when it was 0, then I saw it happens also for the maximum value. So I added a fix but I would know if you think about a better fix because I also have an int32 and double version of the widget and could be better to fix overflow here too. const int Delta = event->globalPos().x() - m_LastPos.x(); if( ( Delta > 0 ) && ( value() < getMaximum() ) ) setValue( value() + min( Delta * singleStep(), getMaximum() - value() ) ); else if( ( Delta < 0 ) && ( value() > getMinimum() ) ) setValue( value() - min( -Delta * singleStep(), value() - getMinimum() ) ); Thanks !
  7. Hi all, I'm very picky about names and recently I had to add a meta programming class to have one function which accept char, int, float, double, T& and T*. if it's only reference or pointer you would call it TConstPtrOrRef like that: /*! \brief Constant pointer or reference of T. */ template< class T > struct TConstPtrOrRef { typedef const T& Type; //!< Type. }; /*! \brief Constant pointer or reference of T. */ template< class T > struct TConstPtrOrRef< T* > { typedef const T* Type; //!< Type. }; But if you add char, int, float and double then it's not only ref or ptr. Any opinion of a good name ? Thank you
  8. Hi, I recently thought about size_t vs std::size_t and ended to the conclusion that std::size_t should be used if the code is c++. Is it a correct conclusion about the both ? I then was curious about Unreal Engine and saw this: template<typename T32BITS, typename T64BITS, int PointerSize> struct SelectIntPointerType { // nothing here are is it an error if the partial specializations fail }; template<typename T32BITS, typename T64BITS> struct SelectIntPointerType<T32BITS, T64BITS, 8> { typedef T64BITS TIntPointer; // select the 64 bit type }; template<typename T32BITS, typename T64BITS> struct SelectIntPointerType<T32BITS, T64BITS, 4> { typedef T32BITS TIntPointer; // select the 32 bit type }; typedef SelectIntPointerType<uint32, uint64, sizeof(void*)>::TIntPointer UPTRINT; typedef UPTRINT SIZE_T; Any thought about it ? Is it a good way and safe ? Thank you
  9. Alundra


    Hi, I have a font class loading glyph when you need and add then in a image and then update the texture. The question is now how make the font manager correctly ? Two options : 1) Have a font class who handle multiple font size then the manager only link to one font by name 2) Have a font name with the size in it Another options or better options ? What is recommended ? Thank you
  10. Hi, I use from all the time SafeDelete and SafeDeleteArray macros. I recently seen template version. Is it a bad practice or is it better to use this kind of macro/template ? The only point is to set to nullptr after the delete. Thank you
  11. This is basically an ActorComponent, the renderer look at the ID to use the correct rendering function : StaticMesh / AnimatedMesh / ParticleSystem / Billboard... Theorically it can be called only once when rendering the frame if the code is correctly structured. I changed that 2 years ago and I was just thinking the last day about it and then asked here to have opinion. Unfortunately I didn't looked the performance before and after at this time...
  12. Hi, When you need a factory or identify multiple type you have a function to get the type ID and type name. First I did just a virtual which return the value then I switched to a private variable that the base class constructor set. Using virtual cost more performance, without virtual you have more memory used. Any opinion about this ? Thank you
  13. Hi, This is basically what you want to do if you want to do a look at using quaternion. You simply need to do a cross product of the two vectors and normalize the result. The two vectors must be in the same coordinate space.
  14. Hi, I always was interested into lightmap generation and UV generation (the famous second UV channel). I never found very well doc about it, to generate the lighting and UV correctly, also the lighting has to match the dynamic lighting to be clean. Any links or book chapter or just a discussion there about it ? Thank you !
  15. Hi, I have a behavior tree using a classical design, here the class tree : Behavior Tree Behavior Tree Node -> Task -> Composite -> Selector -> Sequence -> Parallel -> Decorator -> ForceSuccess -> Loop The problem is the Loop Decorator Node, if you loop one node in a composite it has to loop and go to the next node, that mean the composite node has to reset the counter only when all children are processed. What is the best design about that ? The behavior for the reset of the loop decorator is not the same in the parallel, selector and sequence surely. What is the good behavior for each and what is the good design to call the reset on the decorator node ? Also what should return about SUCCESS/RUNNING/FAILED ? Thank you for the help
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!