-
Notifications
You must be signed in to change notification settings - Fork 156
Unit Formations Example #37
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
Conversation
Added a sample & demo on how to handle per instance ISM data.
Additional clarification of a processor
Per instance Material data from a Processor to Instanced Static Meshes sample
Add basic square formation with x amount of units
…avoidance stops working while standing)
Add shared fragment to modify formation sizes Add some additional comments
Refactor RTSAgentTraits so that traits/fragments are separate from processors Streamline logic so readability is more of a focus over performance
Update RTSFormationExample map
|
When spawning a large amount of entities (>100) actor visualization appears to stop functioning. May be unrelated to my code. The visual quantity limit is probably the in the LOD parameter config. I'll definitely look at this soon, still shoveling the rest of the project into plugins. |
de84429 to
0560342
Compare
Add simple actor visualization for entity destruction
Experimental changes for resolving Visualization
Add simple check for entitysubsystem
Allows player to create entities to add to the unit
Optimize adding and removing entities from unit (unit index of swapped unit still needs to be resolved) RTSFormationUpdate still takes ~22.2ms with 5000 units. My guess right now is division/remainder calculations taking up processing time. Add RTSFormationDestroyer for handling entity destructtion (still needs testing)
…led in the observer processor
Fix destroyed entity not being properly filled in
|
I finally tackled performance and gave into using arrays for formations. With 5000 entities
After
Kind of embarrassing looking at the original stats but still progress! I have ideas to make the update faster (currently only runs when an entity needs a new position), but I think it is 'good enough' for now. MassSample-FasterFormations.mp4 |
…get repeated to the same entity Begin implementing rotations to units in formation, still jank
Add Spawning units function
Clean up RTSFormationProcessors
Modify SpawnNewUnit() so that a position can be specified
Update RTSFormationsExample.umap
|
Multiple unit support! Units now automatically rotate when moving to a new position too. MassSample-FormationV1.mp4My only gripe is that this plugin depends on the MassCommunitySample plugin too. This is so entities can be destroyed with the sample projectile. One solution would be to either remove the functionality or implement it maybe in the project/plugin? Oh and these too lol
|
Sorry this is a little messy, I just have a new idea for MassSample and should have created a new branch in my fork first
|
This is gonna be just a little messy, I made the mistake of creating this plugin in main, so Im just going to create a new PR with the new branch so I can do some more work |
Early example of simple unit formations. There is still a lot of cleanup to be done but the core functionality is there.
FormationLengthin theRTSFormationTraitMassSample-Formations.mp4
MassSample-SpawnUnits.mp4
MassSample-DestroyingUnits.mp4
Known issues
Performance was not a priority so some things can definitely be optimizedURTSFormationInitializerdoes not properly handle entity destruction. It is temporarily handled in the subsystem.Unit movement is not implemented but should theoretically be straightforward.When units are destroyed, the entity index is sometimes not properly handled.