Jump to content
  • Advertisement

Alundra

Member
  • Content Count

    910
  • Joined

  • Last visited

Community Reputation

2319 Excellent

About Alundra

  • Rank
    Advanced Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

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

  1. 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 !
  2. 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
  3. 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 !
  4. 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
  5. 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
  6. Alundra

    FontManager

    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
  7. 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
  8. 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...
  9. 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
  10. 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.
  11. 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 !
  12. 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
  13. Alundra

    STB Image

    Hi, Long time ago I had to use FreeImage to replace STB Image because some files failed to load. We are now in 2018 and looks like STB Image never ended to be updated. Is it safe to use STB Image / STB Image Writer nowadays ? Thank you
  14. Hi, I always align memory in my custom array class but I would opinion. Is it really better or not because that ends to have empty memory used too. What is your opinion about it ? Thank you
  15. Hi, I try to solve this but it looks to be a difficult task : Animation 2D Blend Basically the first step is to have a delaunay triangulation to avoid to do the triangle manually, classical delaunay or special cases ? The second task is to set each vertices from the delaunay an animation, I have actually no clue how set them. The last task is then to find the barycentric from parameters to then compute the weight of each animation. Is it possible to have some help about it ? Thank you for the help
  • 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!