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

[Merged by Bors] - Example for 2D Frustum Culling #1503

Closed
wants to merge 1 commit into from

Conversation

Byteron
Copy link
Contributor

@Byteron Byteron commented Feb 22, 2021

This adds a new project for showing off Frustum Culling.
(Master runs this at sub 1 FPS while with the frustum culling it runs at 144 FPS on my system)

Short clip of the project running:
https://streamable.com/vvzh2u

@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples S-Blocked This cannot move forward until something else changes C-Performance A change motivated by improving speed, memory usage or compile times A-Rendering Drawing game state to the screen labels Feb 22, 2021
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can you add this example to examples/README.md

I'd also rename it to something like many_sprites personally, although the 2d folder is definitely correct.

Additionally, even though there aren't many comments in other examples, a comment about 'this example is used to test performance with large amounts of sprites' and a link to #1492 in that comment would be useful.

A good start though

examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
@DJMcNab DJMcNab removed the S-Blocked This cannot move forward until something else changes label Feb 22, 2021
@mockersf
Copy link
Member

mockersf commented Feb 22, 2021

While a great example a frustum culling, I don't think this is an example of Bevy. It doesn't show any feature that one may wonder "ok, how do I do this with Bevy, let me check the examples".

Do we want to have "showcase" examples for things like performance? Maybe in a dedicated "performance" folder instead of "2d"?

examples/2d/frustum_sprites.rs Outdated Show resolved Hide resolved
@Byteron Byteron changed the title Example Project for 2D Frustum Culling Example for 2D Frustum Culling Feb 23, 2021
@Byteron
Copy link
Contributor Author

Byteron commented Feb 23, 2021

Gave it a second pass. Now the camera is moving in circles around the tilemap. :P
Also implemented all your suggestions.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

The video you have linked in the OP needs updating

Also, as of recently you can directly upload videos to GitHub which are embedded

examples/2d/many_sprites.rs Outdated Show resolved Hide resolved
examples/2d/many_sprites.rs Show resolved Hide resolved
@cart
Copy link
Member

cart commented Mar 25, 2021

bors r+

bors bot pushed a commit that referenced this pull request Mar 25, 2021
This adds a new project for showing off Frustum Culling.
(Master runs this at sub 1 FPS while with the frustum culling it runs at 144 FPS on my system)

Short clip of the project running:
https://streamable.com/vvzh2u
@bors bors bot changed the title Example for 2D Frustum Culling [Merged by Bors] - Example for 2D Frustum Culling Mar 25, 2021
@bors bors bot closed this Mar 25, 2021
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-Examples An addition or correction to our examples C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants