Skip to content
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

Extract sprites into a Vec #17619

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jan 30, 2025

Objective

Extract sprites into a Vec instead of a HashMap.

Solution

Extract UI nodes into a Vec instead of an EntityHashMap.
Add an index into the Vec to Transparent2d.
Compare both the index and render entity in prepare so there aren't any collisions.

Showcase

yellow this PR, red main

cargo run --example many_sprites --release --features "trace_tracy"

extract_sprites
extract_sprites

queue_sprites
queue_sprites

@ickshonpe ickshonpe changed the title Extract sprites to a vec Extract sprites to a Vec Jan 30, 2025
@ickshonpe ickshonpe changed the title Extract sprites to a Vec Extract sprites into a Vec Jan 30, 2025
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 30, 2025
@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Jan 30, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants