beyond-all-reason / beyond-all-reason/RecoilEngine
CEG enhancements wishlist
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
- Set the `i` index number parameter for particles spawned via cegTrail. In CEG expressions, `i` refers to iterative number of a particle spawned from *inside* a CEG generator - see documentaiton and examples in [CEG Operators](https://springrts.com/wiki/CEG:Operators#Index_.28.27i.27.29). But for root cegs, it's never set. Setting it to the frame number of projectile's life would allow for things like spiral trails etc.
- Allow in some way to perform math on the `dir` magical keyword, for example to control particle acceleration. `dir` is a magical thing that somehow allows some CEG parameters that take vectors to receive the direction into which the CEG is pointed (direction of projectile that it trails, or direction of piece that EmitSfx'd it). Acceleration can currently be set for some particles via `gravity`, but it's not possible to set gravity to e.g. `dir * -0.01` because `dir` is magic and cannot be combined with any CEG operators. Some of the classes allow to change the direction of the projectile spawn to be controlled with eg `emitrot`, but obviously this does not apply to `gravity` as there no `gravitymult` or `gravityrot` params. This would allow for particles that accelerate in projectile space and have more interesting trajectories.
Contributor guide
Research direction
Start by reading the CEG Operators documentation and examples linked in the issue, then trace how root CEGs spawned through cegTrail receive the particle index and how the magical dir value is handled. Done should include a defined way to expose the projectile-life frame as i and to combine dir with operators for gravity or other vector parameters, with examples demonstrating both enhancements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100