beyond-all-reason / beyond-all-reason/RecoilEngine
Extend shared ID pool to projectiles, maybe solid objects
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Bill of materials to be done before starting this ticket:
* #717
* awareness of #1233
----
#717 is a special case of ID overlap as units and features are currently the only case of ambiguity where the same interface accepts both types of ID, so I'm keeping it a separate ticket (more pressing and also simpler).
This ticket is, at its core, a request to extend the ID uniqueness to projectiles. The benefits would be
* enables Lua API improvements (see #1374)
* I hear the data-oriented (ECS) approach works best when objects conform to this (so that the same system can handle them all regardless of the underlying type as long they share the same components), so it would be good to accomodate it because apparently we're generally moving things to be more data-oriented for perf reasons.
Remarks:
* units and features' IDs fit in 16 bytes, for network protocol reasons. Other things would probably need to be assigned IDs from 65536 and above (the "shifted pool" approach).
* ideally this would be applied to other `CSolidObject`s or maybe even `CWorldObject`s. Part of the task is figuring out what subtypes of these exist and whether they make sense to put in the shared pool.
* there are other things that could in theory belong to their own shared pool (teams/allyteams/players share a lot of diplomacy/control related traits; having a unified units/features ID pool means it would be good to have unified unitDefs and featureDefs too) or even a single huge global pool for all object types imaginable (e.g. teams and units can both accept rules params!). The big caveat here is that games make a lot of assumptions that things have their own little ID pools that start from 0 or 1 and are consecutive. IMO not really realistic to pursue but I'm mentioning it just for completeness.
Contributor guide
Research direction
Start by completing prerequisite issue #717 and reviewing #1233, then inventory the relevant CSolidObject and CWorldObject subtypes described here. Determine which objects should use the shared pool, account for existing assumptions about IDs starting at 0 or 1, and confirm that projectile IDs and the selected object IDs are globally unique.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- api, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100