- AgentComponentManager debug status now prints string instead of enum integer value
- CombatComponentManager has DamageDealerHitEntity(), which is as of yet untested. The interface will likely be radically different; I put this in just for testing
- Updated Notes and TODO
- Added some build options to Sublime project
- AgentComponentManager now has GetUnconsciousAgents(), which fits the needs of external systems better
- Added some for macros for iteration etc. because I'm lazy
- Added standalone debug unreal build commands and debug option. The whole workflow is working now, though it does take an unfortunate amount of time to link
- Marked the location of @Latelinks for refactoring/searchability
- Added the concept of GameplayTime, a time which can be paused and played. Gameplay code should use this instead of world time
- Math macros no longer have semicolons, making them useful in for loops etc.
- I had to comment out std::cout calls in Logging.cpp because Unreal gets upset when those are executed
- Added several build systems and debug options to get both a full debug Unreal Editor and standalone game client working and convenient to use
- Added SetEntitySpeeds() to the MovementManager interface. The idea is that if things die their speeds can be set to zero. This will likely be replaced with something cleaner
- Added the ability to interface with EntityComponentManager with a single UnsubscribeEntities function instead of a whole ComponentManager derived class. This is proving to be a somewhat dumb idea. I still need to figure out this whole interface
- Added Scale() and GetSafeNormal() vector helper functions
- ConsoleMovementComponentManager should now theoretically be at parity with UnrealMovementComponent. It is untested though
- Hooked up stuff to ConsoleMovementComponents but did not test
- Added ConsoleOnly frontend. This is to make it quicker to test Galavant features which do not need Unreal Engine. I wrote this while the GalavantUnreal frontend was broken
- Fixed HTNPlanner includes to be absolute
- Fixed CombatComponentManager warning regarding my lazy resetting of current CombatAction
- Updated Jamfile for GalavantPseudotarget to have correct library ordering and added some comments in Jamrules about this
- I made a mistake with parameter ordering which caused me to append the wrong list, meaning neither Interacts nor CombatComponent subscribers were tracked properly
- Goals now are set to StartGoal instead of None so Agents can actually do things
- Control flow for Agent goals is now slightly more clear; no more switch case fallthrough
- Removed PLog from Jamrules global headers
- Tagged some TODOs for easier categorization
- Undid the static initialization auto-registering of ComponentManagers. It was causing issues when UnrealComponentManager wasn't being added to the list. This could be because of the static library, or Unreal's hotreloading. Either way, they now must be manually added like before
- Agents now use AgentConsciousState values for managing death instead of a separate bool. NeedLevelTriggers can set this state
- Various Agent-related structs now have default initialization values. Zero-initialization doesn't happen by default!
- Sublime Project now has build system for fixing "Game Module Could Not Be Loaded" Unreal Engine error message after compiling the engine
- Fixed tests which had outdated APIs; removed dead functions from Logging.hpp
- Got rid of HTNTaskDb and replaced it with a plain old ResourceDictionary
- ResourceDictionaries now add themselves to a list of all ResourceDictionaries so they can be easily cleared
- Big refactor of Entity Component System. I removed the concept of ComponentTypes. ComponentManagers are now automatically added to the EntityComponentManager. All ComponentManagers are globals, because damn it, they're global. How do you like that, pesky design patterns?
- Added CombatComponentManager. It cannot do anything but play FX (assuming the CombatFxHandler is defined; this is meant to be a front-end-specific class), but it will eventually handle all combat interations
- AgentGoalDefs are now their own Resource. They can also provide HTNTasks such that an entire Need->Plan->Execution can be created entirely in Resources. This isn't yet tested (like many of these changes)
- Fixed what appeared to be a potential bug in InteractComponentManager. If Entities were already subscribed, a new pickup would be created anyways. I changed it to ensure this won't happen
- Added Time.hpp, a catch-all for time-related stuff. GetWorldTime() is actually latelinked and defined by the frontend (in this case Unreal)
- Made paths with ../ relative to include dirs instead
- Renamed the Unreal build in sublime-project to be more accurate. I also added a SublimeAnarchyDebug configuration, but it doesn't work
- Initialize Needs in their constructors from a resource instead of manually initializing them everywhere
- Added Log output syntax highlighting for Sublime
- Reorganized Sublime project and changed Unreal Engine location
- Added Math.hpp for some very simple CLAMP, MIN, and MAX macros
- Added Blood need
- Need conditions are now evaluated by the trigger (better abstracted this way)
- Added a sublime-syntax file for my bulid output, because I like colors :)
- Added parameters for Min and Max world height to ProceduralWorld
- Fixed inverted in PlanComponentManager::ExecutePlan() which caused all plans to be broken after the first task executed
- Modified Htn::Planner state enum to have None state so that I didn't have to spoof the state to get plans rolling in PlanComponentManager
- Renamed AgentGoal::GoalStatus::Initialized to StartGoal because it's more clear in context as to what will happen to the goal
- Removed the std::ostream Htn::TaskList print function. gv::Logging is used instead (although may be broken; I don't really care too much)
- Htn::Planner now has a Clear() function so that it could possibly be reused for another plan. I have not tested this function
- Added Notes.md with some notes about working on Galavant
- Slightly reformatted TODO.txt
- Removed PLog as a dependency. Unreal requires me to use its custom allocator, which std::string doesn't really work with. I wrote a logger with an interface similar to PLog's that only uses C strings
- AgentGoalDefs are in a dictionary now
- Sublime can now detect compilation errors. This is mostly for my own convenience
- Renamed HTN task status from Subscribe to WaitForEvent because it's more descriptive
- AgentComponentManager now knows when Plans have finished. This is as of yet untested
- Added AgentGoalDef which describes what an agent should do once its plan completes
- PlanComponentManager now cleans its ReceivedEvents. If there are events from entities which aren't subscribed, they'll no longer pile up
- Added compile-time and runtime CRC32 string hashing utility (copied from StackOverflow because I have no shame)
- Created ResourceDictionary, a dead-simple way to manage things like Defs. It's a key-value store where the key is a CRC'd string and the value is the resource
- Added ResourceDictionaries for NeedDefs and AgentGoalDefs. I'll probably use them for things like HTN tasks
- Cleaned up PlanComponentManager a bit
- Fixed memory leak in ProceduralWorld where if the seed changed the NoiseGenerator wouldn't be deleted
- Commented UE Debug in sublime project because I never use it
- Added Clang Format settings used throughout Galavant
- Sublime Project now includes Unreal source, which is awesome
- Renamed GetCurrentActiveWorldParams() to GetActiveWorldParams() because the former is stupid
- Positions can now be initialized from a float array
- Things can now look at WorldResource lists directly
- Added EntityPlayerSharedData and associated functions for providing easy access to player data
- Added EntityLevelOfDetail which will tell modules how much they should simulate things based on where the player is at
- Noise now takes a params struct making the interface much less ugly
- Added comment stating that Z will be the up axis (this is how Unreal works too)
- Added some logging to help indicate what the behavior is when registering component managers. This whole subsystem needs a rework
- Fixed ComponentManager UnsubscribeEntities printing the entity list before removing irrelevant entries
- Fixed PickupDirect making Need better instead of worse as well as actually destroying the Pickup regardless of whether there was a Need found or not
- NeedType now comes from the NeedDef only
- AgentComponentManager now should destroy entities when DieNow NeedTrigger is hit (though it doesn't seem to be working yet)
- Fixed frustrating bug in PooledComponentManager where member Subscribers was being used instead of ComponentManager Subscribers. The solution was to get rid of PooledComponentManager's Subscribers declaration
- ComponentManager now only goes all the way with unsubscribing if there are entities left to unsubscribe
- Fixed an apparent bug in EntityListSortAndRemoveDuplicates() and EntityListRemoveNonUniqueEntitiesInSuspect() where the iterator wouldn't be advanced on removal
- Filled in InteractComponentManager and added PickupDirect() which puts a pickup straight into an entity's need (for testing purposes)
- Added NeedTypes and AgentComponentManager interface to get an agent's specific need
- Added InteractPickupTask, which uses the PickupDirect command on a TargetEntity
- FindResource now marks the found resource as the TargetEntity
- WorldResourceLocator now stores an Entity and a ResourceType on the Resource, facilitating Pickups as well as making the zero position shenanigans go away
- Got all the Sublime project working dirs sorted out and added a bunch of helpful build systems (for me, at least)
- Added my TODO file to remember where I left off and such
- ComponentManager now handles unsubscribing entities automatically because there wasn't a case I could think of where I wouldn't want to do exactly what PooledComponentManager did. This lowers the amout of boilerplate needed to write a ComponentManager, which is always good
- Added InteractComponentManager. It's still basically unimplemented, but I'm liking the interface better than PooledComponentManager's already
- EntityComponentManager now has singleton functionality. I'm experiencing lots of issues with it when used with Unreal's hot reloading, so I'll be modifying it soon
- Components now properly set their types. Component Types are now stored in an enum
- Callbacks for TaskEvents are now sorted out. It's still shit, but less so
- Fixed places where I was setting the size of vectors rather than capacity, which caused all sorts of weirdness
- AgentComponentManager now creates and executes a plan when hitting a trigger for an entity
- PlanComponentManager now actually responds to asynchronous tasks which use TaskEvents to determine success/failure
- Replaced NULLs with nullptrs
- WorldResourceLocator is now in a namespace instead of just informal WRL_*()
- Added basic Needs system, which change conditionally and cause new goals to arise. Needs are the driving force of agent goals
- Added AgentComponentManager which will be the brain of agents. It's strongly tied to Needs. I have not yet hooked it up to PlanComponentManager, so at the moment it doesn't do anything
- Excised Subject Observer from the codebase in favor of compositional, function-pointer-based CallbackContainer. This should reduce multiple inheritance and boilerplate throughout the code while also making behavior more explicit
- Made WorldResourceLocator, which is the code from TestWorldResourceLocator (Galavant-Unreal) made into a module, because I don't think I care for passing that around everywhere
- Fixed building tests where Logging was broken in tiny ways
- Updated Sublime Project with Unreal Debug Editor GDB option
- Added two kit pieces to the Building System draft
- Primitive Tasks can now return statuses which give the executor instructions on how to proceed. It's a little dirty, but powerful
- Position can now be logged directly, which is super handy
- WorldState manager now returns refs to worldstate, letting Primitives modify the World state as needed
- Fixed bug in includes of SubjectObserver
- I've converted all std::cout calls to LOG calls, except for those in tests, which aren't essential
- Added Logging util for initializing logging and decreasing including plog headers directly
- Goal, Compound, and Primitive Tasks now store and return Task pointers to themselves. This is to reduce boilerplate and mistakes. I'm now doubting whether avoiding inheritance and static_casts was worth it
- Added PLog, a logging library, which will eventually replace all std::cout calls in Galavant. It's robust and will allow me to pipe output from Galavant lib to Unreal Engine logs
- I finally sorted out the Jam building problems. SubDirC++Flags are appended to C++Flags. They do not replace C++Flags. This was very frustrating. Lesson learned: when you find weird shit in other peoples' code, it doesn't hurt to read their code (in this case, Jambase)
- Added some debugging shit to PlanComponentManager
- Small formatting changes
- Added EntitySharedData which is for things like Position that almost all components need
- Changed interfaces which didn't hold up to scrutiny
- Fucked with Jamfiles/Jamrules to get Unreal working
- Added Subject Observer, which I will likely refactor heavily, but gives an idea for what it will be like
Fixed is a strong word - I hacked around a strange problem I was encountering where Jam would always fail to scan libraries for object dependencies. This would result in library rebuilds every time Jam was run, which is super shitty.
Now, jam will leave the .o files alongside the .a files so it doesn't have to scan the archive. This isn't a true fix, but it gets the job done.
Building when you've only changed a few files is now massively faster. I also found out how to enable parallel compiliation, so even full rebuilds are much quicker ('jam -j4').
- Added PlanComponentManager, which is still WIP but at a stage where it could be used in Galavant-Unreal
- Removed all functions with (void) because apparently that's just a C thing (what I use I work) and is discouraged in C++
- Removed some #ifdef include guards in favor of #pragma once
- Put some earlier code into the Galavant gv namespace
- Fixed a small bug in EntityTypes.cpp where EntityListAppend() was actually prepending (oops!)
- Started writing WorldState. This class is likely to see lots of refactoring
- Tried some geo stuff out in BuildingSystem
I experimented with creating a grid-based kit. I'm no artist, so it looks pretty bad. It's a little tough to imagine what it'd look like in game still, so I'm going to need to art it up a bit to get a better idea.
- Got rid of TaskArguments struct because it wasn't buying me anything. If the planner has to access it in order to function it negates its purpose
- Added const to Task virtual functions so that future users know when they can change state etc.
- Pulled the stack/stackless planning code into separate functions. I'm a little unhappy with the amount of code duplication and maintainability issues with having to always change two different places. Maybe I'll eventually get around to fixing it
- PlanStep() now pays full attention to the user's Break* settings. This means you can (with proper settings) complete a whole plan with a single PlanStep(). You can also make it break after basically every single action if necessary. I'm guessing this feature will never be used :(. I wrote a test for this as wel.
- Added Catch to make my formalize my Unit Testing code. It's very convenient and has nice output :)
- Added some helper functions for PlanStep() to eliminate some copypasta. I'll likely be doing more of this
I fixed the bug I was talking about in the previous commit, so it appears all the stack schenanigans are gone. I am still unsure why the bug was occurring, which is perhaps more unsettling than the bug itself.
Added printing Tasks and lists of them, which eases debugging.
- I tested writing Flatbuffers binaries out to JSON, which is cool.
- I made some changes to the ECS interface, added EntityList helpers, and implemented a simple pooled component manager.
- Note that ObjectPool is unfinished, and may be discarded (I'm having troubles coming up with a way to do handles).