Nameplate example
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
A common feature seen in RPGs, RTSs and MMORPGs is "character nameplates" - a small 2d entity that floats above the characters head, containing useful information such as character name, guild, health bar, and so on.
However, it's not at all obvious, for a novice, how to implement this in Bevy, other than by using a third-party crate. Several problems have to be solved:
* Using multiple cameras with the correct ordering
* Synchronizing the position of the nameplate with the character position on the screen, including taking into account offsetting the nameplate so that it appears above the character's head.
* Scaling with distance, particularly if we want the nameplate scaling to be non-linear (since tiny text above a character far in the distance would be unreadable)
* Also, ensuring that scaling will look good and not be aliased as it scales up
* Also, if nameplates are not shown for distant objects, what kind of transition (fade out, etc.) is used
## What solution would you like?
An example, such as many foxes, which illustrates how to implement simple nameplates.
## What alternative(s) have you considered?
Encouraging users to rely on a third-party crate for this instead.
@alice-i-cecile @ickshonpe
Contributor guide
Research direction
Start by reviewing Bevy's existing examples and the camera and UI systems they use. Build the requested many-foxes example around screen-position synchronization, head offsetting, distance-based and non-linear scaling, readable scaling, and a distant-object transition. Done means the example visibly demonstrates simple nameplates with these behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100