Jump to content
  • Advertisement

Alundra

Member
  • Content count

    906
  • 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. 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
  2. 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
  3. 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
  4. 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...
  5. 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
  6. 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.
  7. 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 !
  8. 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
  9. 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
  10. 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
  11. 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
  12. Alundra

    Fifth Engine

    Haha, awesome
  13. You can compute the angle using atan2 or dot product which will gives you an angle in [-PI, +PI]. Using this angle you can select the 2 animations and then compute the blend factor of the two. Mirroring is a tricky thing, you have to set the mirror bone + set the mirror axis, mirror the quaternion using that.
  14. For that you can simply have 4 animations : N,S,E,W and then do a blend by direction. For that you can do mirror of animation, but it's a tricky thing to have it working and you also need to do a mirror bone setup to set each mirror bone.   You can do a masked blend to animate the bottom part and animate the upper part, simply combine the pose.
  15. Good point, I simply clicked on the home page and answered.
  • 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!