Rover656 / Ngine

A C++ 17 library for producing 2D games.
https://www.nerdthings.dev/ngine
Apache License 2.0
2 stars 2 forks source link

[Ready] Depth Sorting Feature (Alternative to #1) #4

Closed Rover656 closed 5 years ago

Rover656 commented 5 years ago

This is the alternative solution to issue #1, implementing a depth sorted vector that draws all entities in order (low depth tending to further back in the scene). This allows depth to be set and will be respected by the scene. I believe this is the candidate most likely to be merged as this has the highest performance.

Merge Checklist

Rover656 commented 5 years ago

An entity culling system would be very easy to add with these new structures. I shall add the culling system to this branch.

Rover656 commented 5 years ago

Benchmark shows little to no effect of culling, the MSAA_4x and Vsync tests were not run as a consequence.

Rover656 commented 5 years ago

The feature/spritebatch branch was deleted because it was rejected. The feature-alt/entity-ordering branch was deleted because it was merged.