-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ version #5
base: master
Are you sure you want to change the base?
C++ version #5
Conversation
* Works like C# for the most part, except for DomainBuilder not using fluent style. * Most Unit tests were ported, barring some which tested for null pointers in various places where the C++ version does not have them.
…for UE4 (and a common practice in games)
Stl replace
* Converted to using templates. There isn't a clean way to make a UE4 Plugin otherwise. A typedef of WORLDSTATEPROPERTY_TYPE etc. is a bad idea because that makes the Plugin dependent on the main game code. * make some BaseContext functions non-overrideable. These relate to the core state of a Context. * - move headers into directories so that include paths must be specified from the root of the project directory. This keeps naming conflicts with other headers to a minimum by forcing a sort of "namespace" - added some virtual destructors which UE4 complains about. * - move pch back to root. It should not be included by consuming projects - Moved STLTypes.h out of pch so that consumers are not forced to include pch.h * remove all CPPs. IContext is a proper interface so there are no circular includes any more.
* replace vector as well since #defines (expectedly) cause havoc in UE4's unity builds. * change preprocessor define to be less generic. * task.h needs to include stlttypes.h * fix compiler warning about void return value * dont return references, could potentially be locals
* allow replacing std::rand
I was thinking of integrating this in Godot Engine. Doctest is better than GoogleTest and CPPUnit. Not sure how updates from c# will work. Any comments, questions or jokes? |
Any updates from C# have to be done manually, which is not a very sustainable approach, but adequate for my personal needs. Doesn't godot support C# ? As far as test frameworks go, I dislike having to install additional software (especially with C++ where you don't have a nice clean story like NuGet) so I went with MSTest. Feel free to fork and do whatever you like though :) |
I personally don't use c#. Godot supports C# but it's not the default and there are proposals to move C# support to a shared library rather than a secondary official build. Are you aware that Doctest is a single c++ header and only the header is required in a program? https://github.com/onqtam/doctest/blob/master/doctest/doctest.h My goal of this conversation is to collaborate as much as possible. |
In the end, I think having a proper cross-platform test framework is a good idea. There is no valid reason to keep it tied to MSTest for ever, just my own preferences. However, the project I did this port for is on the back burner and may end up being canned. If your intention is to have a well-supported version that is properly updated it may be best to fork my repo and maintain it yourself. Not trying to be a jerk, I just cannot provide the commitment needed in order to be a good steward. You can even make your own PR as a more sustainable C++ port and I will have no objection to closing this one. |
2. Fixed: Improper adding to stackDepth, which causes unit test failed
@amoldeshpande Is it okay if I maintain a version of your c++ port for Godot and use it in my games? Do you want me to include any extra license for the code you wrote? C++ Code lives at : https://github.com/kthecoder/AIBlue/tree/main/extension/src/FluidHTN I have also ported the tests to Google Test, because that was the test framework I could actually get to work on my computer lol. |
@kthecoder Do feel free to use the code any way you wish, without any additional licensing on my code. Good luck with your games! |
Thanks for the update - for me I ported the HTN framework from Dana https://github.com/dananau/GTPyhop |
C++ Version PR
Description
Implements a C++ version of Fluid-HTN.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Includes the Unit Tests (barring a couple which test for Nulls where the C++ version is passing references)
Also tested cursorily with the C++ port of the Text Adventure sample.
(https://github.com/accesshoops/fluid-text-adventure/tree/master/Fluid%20Text%20Adventure, separate PR to follow there)
Checklist: