Projectile system templates
More actions
Within the cloud home, there is a bow and crossbow on the outer balcony next to a toggle-able shooting gallery style targets system. These items use a in-platform created projectile system template that can be used for a variety of other content as the template itself also resides in the Resonite Essentials folder for anyone to use.
Important Notes:
- there are multiple versions of this system that were created over time, the newest one is more optimized than the prior one due to the features and design approach the old one had.
- Each version includes a sub versioning/iteration tracking notation in the base system name which is the parenthesis that contain the capital letter "I" for Iteration followed by a 4 digit number signifying the current iteration of the system. Example: (I0085)
- HIGHLY RECOMMEND USING THE NEW VERSION, it is not creating unnecessary extra data that isnt being used as the older system uses a different workaround when trying to send multiple pieces of data to each projectile (which can be heavy in network/performance cost), plus no capability of recycling duplicated template objects/object pooling)
- Each system should have the ability to make the duplicated template objects (projectiles, target points, decals, etc.) be non-persistent if they are duplicates, it is good practice to have systems like these that create temporary objects that exist in a world automatically set these slots as non--persistent.
"Hitscan Projectile System" (Projectile system V4)
This is the latest 4th generation projectile system created to utilize optimization techniques, notably now including the ability to use object pooling to lessen the amount of creating and destroying objects constantly.
As the name implies it uses a similar method to hit scanning in video game terms but it also can be used to create advanced projectiles that follow a particular trajectory or follow objects using a built in tracking mode.
This system refers to decals placed after the initial impact decal as "Subemitter" decals, similar in function to how the particle system in Resonite has Sub-emitters components.
System Contents:
- A debug visual that is created using procedural meshes
- A subset of variables categorized by different parts of the system
- Credits of those who either helped worked on the system or helped with advice
- An example particle system that could be used in place of a duplicated slot projectile or build a similar particle system using it as reference.
- Template objects within a hidden object root that is used to store templates of objects for duplication and use by the system.
- Object pools that are within a hidden root that stores previously duplicated templates in container slots to be re-used by the system instead of constantly create and destroy slots.
- Organized ProtoFlux container slots of individual node circuits that power different parts of the projectile system.
- "Projectile Spawn Point" (The slot that is the point where a projectile will spawn from with the positive Z axis being the forward direction of the projectile)
- "Point Blank Raycast Point" (The slot that is the reference point of a raycast in front of the system that is to check if a surface the system is facing is too close to even warrant a projectile to be fired and simply raycasts into the surface and places decals on it as if a projectile had collided with the surface.
- The "Sound FX Clips" slot is used for shared audio clip assets or players that is shared across the duplicated template objects used by the system. (things like asset loaders for audio clips also would be placed here).
- Crossbow Particle Styles are also included in the system to be a great example of particles used for making visual FX for projectiles, impacts and projectile ricochets.
Variables and their categories:
Template/Pools Variables:
Ricochet Variables:
Physics Variables:
Tracking Variables:
Decal Variables:
Decal "Subemitter" Variables:
Decal Template/Pools Variables:
Decal "Subemitters" Template/Pools Variables:
Decal SFX Variables:
Credits:
- Aegis_Wolf (Rewriting this system from the ground up, testing, constant fixing up to this point of stable release)
- Ryuvi (assisting in some testing and mainly advice on problem solving regarding this system)
- Modern (Testing it/occasionally running into a few bugs to be fixed in the ProtoFlux setup)
- The Lass 240 (Testing this system on their own content and running into things that the system hasn't been designed to accommodate yet or run into bugs to patch in the ProtoFlux)
- Cyro (designed and teached the fundamental math/logic that the system uses for positioning the projectile on a path and its collision detection)
- RueShejn (Testing and finding bugs in the various systems)
- LucasRo7 (advice for the systems design)
Templates:
Projectile System 3 (Older one that is not as optimized as V4)
This system was a revision of the other previous ones that were created for the crossbow and bow in the cloud home and Resonite Essentials folder. It was also designed to potentially be used for game like experiences in Resonite like BattleNights as well being created in a modular way to accommodate a variety of types of projectile behaviors, Notably the addition of a tracking system to allow the projectiles fired from the system to track tagged objects, or a raycasted point, or follow a slot's facing direction with a adjustable influence the projectile has compared to a predetermined trajectory with a static velocity, drag, and gravity.
This version of the system has a dynamic variable space per projectile, allowing each projectile to hold modifiable data to control each individual one if needed. (this was phased out to also be controlled by a single source instead that didn't get duplicated per projectile)
System Contents:
- A raycast root that is for reference point slots for the system raycasts including the raycast root itself being a reference for the projectile spawn point and point blank raycast check
- A debug slot that just has the procedural box mesh at the root of the system
- The ProtoFlux Slot contains all the sub systems of node circuits powering the system all named by functionality
- There are Dynamic Variables all categorized into different slots that have them
- A visual slot that is used for a tracking mode of the projectile that you can control the direction the projectiles go by rotating this.
- A Templates root containing the object templates for projectiles and decals in hidden parent slots to be used by the system for duplication
- A credits slot containing those who worked on the system/helped/provided advice
- A slot containing the Particle systems used by the Crossbow of the cloud home
- The sound fx clips slot contain the audio clip player shared by the projectiles shot out by the system
Credits:
- Aegis_Wolf (Creating a revision of the previous projectile system and its subsequent fixes)
- Modern (testing and helping find the causes of some issues with the ProtoFlux of the system)
- JackTheFoxOtter (helped with advice on some of the problems faced with the ProtoFlux of this system and how to solve them)
- Ryuvi (Helped test some of the systems but mainly assisted in advice on problem solving with the system's creation)
- Cyro (Helped with problem solving advice but mainly helped with the understanding and design of using a step by step process to raycast in a way like a raymarcher for both positioning the projectile along its path but also creating accurate collision detection regardless of the speed of the projectile. Additional assistance was for creating a position smoother for the projectile movement to locally smooth its position for other users client-side)
- RueShejn (Testing and finding bugs in the various systems)
- LucasRo7 (advice for the systems design and on some fixes for the ProtoFlux)
Dynamic Variables:
Projectile Variables:
Initial Values:
Modifiable Values:
Guidance Values:
Decal Variables:
Raycast Variables:
Templates:
Flux Projectile System Release 2 (Very Old System)
This system is the revision of the first edition of this system that was used for the crossbow and bow of the cloud home/Resonite Essentials.
This was one of the first ProtoFlux creations to fully benefit from the Asynchronous features of ProtoFlux, allowing for the ability to create one node circuit to control duplicated projectiles/decals of the system instead of duplicating the node circuit that controls the movement/behavior per individual projectile (which were advanced but heavy from previous precursors to this system due to the unnecessarily amount of nodes and slots constantly created and destroyed)
Notably this system uses multiple types of projectile sub systems to make either tracked projectiles that follow targets and one that follows a predetermined set trajectory using the trajectory ProtoFlux node. (this was later unified in newer versions of this system)
This projectile has a rudimentary dynamic accuracy system. As you shoot the projectiles its accuracy decays over time with cooldown mechanics by randomly rotating the initial projectile direction in a cone shape that changes its size as its fired/cools down (similar to bloom mechanics in shooter games)
Within the raycast portion of the system, it has a hybrid setup inspired by some shooter video games where it has a detection range for users specifically to swap between a raycast vs a projectile depending on the range to get a more responsive feel to the weapon and to lessen networked data traffic when possible.
System Contents:
- A box mesh that is at the root of the system
- A root that contains the template slots of the projectile and projectile target point to be duplicated by the system
- A root that contains the template slots of decals to be duplicated by the system under hidden parent objects
- A UIX button to test fire the system (you can UIX spam it to shoot them faster)
- A slot containing all the credits in the name of an empty slot
- A iteration number in the form of an empty slot name
- A raycast point root for the slot that determines the direction of the projectile that is shot out starts in
- A slot that contains the individual ProtoFlux subsystems modules organized by projectile type and function
Credits:
- Aegis_Wolf (Organized this system and created additional modules on the core functions of the system)
- Ryuvi (Assisted with the logic and problem solving/bug fixing of this system)
- Cyro (helped created the core system of the projectile positioning and collision detection system)
- Baxter (assisted with some of the math within the ProtoFlux of this system)
- JackTheFoxOtter (assisted with some of the testing and advice on problem solving relating to this system)
Dynamic Variables:
The Dynamic Variable Space is located on the root of the system that is named "Flux.Projectile"
Raycast Point Slot:
- FluxProjectileDVS/ProjectileRaycast Point (this is likely still used regardless if its name is an error, it is used to set the reference slot point for projectile initial rayasts/spawn point or just a leftover unused variable that hasnt been cleaned up)
Base Raycast Module:
- Flux.Projectile/Raycast.Point.Blank.Range (
- Flux.Projectile/Raycast.Hit.Range (
- Flux.Projectile/Raycast.Origin (
- Flux.Projectile/Raycast.Hit.Slot (
- Flux.Projectile/Raycast.User.Hit.Range (
- Flux.Projectile/Raycast.Can.Hit.User (
- Flux.Projectile/Raycast.Can.Hit.User.Self (
- Flux.Projectile/Raycast.Only.Mode (
- Flux.Projectile/Raycast.Debug.Duration (
Base Decal Module:
Raycast Accuracy Module:
- Flux.Projectile/Accuracy.Cooldown.Interval (The rate the projectile system accuracy "cools down" over time)
- Flux.Projectile/Accuracy.Cooldown.Capacity (The maximum value the projectile accuracy decay goes to, it determines how fast the accuracy decay gets as you shoot projectiles/raycasts)
- Flux.Projectile/Accuracy.Min (The minimum size the accuracy cone gets for the fired projectiles when the system cools down)
- Flux.Projectile/accuracy.Max (The maximum size the accuracy cone gets when the accuracy decay is at its highest when firing projectiles/raycasts)
Projectile Behavior Module:
Trajectory-Based Projectile Module:
- Flux.Projectile/Projectile.Lifespan (Sets the lifespan of the projectile fired by this module before it deletes itself)
- Flux.Projectile/Trajectory.Initial.Velocity.Multiplier (Tuning value for the initial velocity modifier that takes into account the delta of the position of the system itself if its moving to prevent the projectiles hitting the system itself).(For example: a user holding the system and moving while firing the system or the user or the system is attached to a moving object)
- Flux.Projectile/Trajectory.Gravity (The gravity value that fired projectiles are influenced by when it travels through space. The Earth gravity default is -9.81 on the Y axis.)
- Flux.Projectile/Trajectory.Drag (The drag force that fired projectiles are influenced by as it travels through space)
- Flux.Projectile/Ricochet.Count (The number of times the projectile can bounce off of surfaces before it stops)
- Flux.Projectile/Ricochet.Velocity.Strength (The velocity strength multiplier of the projectile after each subsequent ricochet bounce, usually its a fraction of 1 to simulate its velocity decay as it bounces off a surface)
- Flux.Projectile/Projectile.Slot (The slot reference used for the template of the fired projectile that the system duplicates)
Inactive Projectile Modules:
Linear-Direction-Based Projectile Module:
- Flux.Projectile/Tracking.Toggle (Toggles the tracking sub systems of the module before it deletes itself)
- Flux.Projectile/Tracking.Only.Users (Toggles the tracking sub systems to only tag users to track when it raycasts a target to track)
- Flux.Projectile/Projectile.Lifespan (Sets the lifespan of the projectile fired by this module)
- Flux.Projectile/Projectile.Initial.Velocity (The initial velocity of the projectile in meters per second)
- Flux.Projectile/Ricochet.Count (The number of times the projectile can bounce off of surfaces before it stops)
- Flux.Projectile/Tracking.Raycast.Range (The range in meters how far the raycast that paints targets for the tracking projectile system will have)
- Flux.Projectile/Tracking.Raucast.Origin (The origin slot the target painter raycast will shoot from)
- Flux.Projectile/Projectile.Slot (The slot reference for the projectile template the system will use and duplicate as fired projectiles)
- Flux.Projectile/Projectile.Tracking.Slot (The slot reference of the template for the slot that is used to be the target that the fired projectile faces as moves)
- Flux.Projectile/Projectile.Gravity (The gravity value that influences the projectile's position over time)
- Flux.Projectile/Projectile.Gravity.Multiplier (Multiplies the gravity value over time)
Templates:
- Projectile (The slot root that contains the projectile launched by the system)
- Projectile Target Point (The slot root that is the object that gets raycasted onto a surface and a fired projectile assigned to it will follow the target point, it gets parented to whatever it hits)
- Decal (The slot root that gets placed where a projectile/raycast hits a surface and doesn't ricochet, it has the ability to be parented under the slot it hits)
- Decal Death Effect (The effect that gets spawned when a decal despawns, think of a projectile that sticks to a surface and then has a delayed explosion like a grenade or explosive crystal shard)
- User Hit Decal (A decal that specifically gets placed if the projectile/raycast hits a user and doesnt ricochet, could be parented under the user)
- User Decal Death Effect (An affect that gets spawned when a User Hit Decal despawns)