codi-hacks / space-race

Love2D-based Spaceship Racing Game
Other
3 stars 0 forks source link

Render Culling #67

Closed SuperShadowPlay closed 2 years ago

SuperShadowPlay commented 2 years ago

Currently everything is rendered at all times. Once the maps get bigger (and possibly animated), this will take up a lot of unnecessary resources. We need some sort of service that stops the drawing of objects that are off-screen.

wyatt-herkamp commented 2 years ago

I am curious of doing this. I should be able to take a stab this weekend.

Jon-Cavaliere commented 2 years ago

My suggestion would be something like a render service that we give renderables too, it then checks if the draw coordinates are outside the camera bounds before drawing.

wyatt-herkamp commented 2 years ago

I am curious of doing this. I should be able to take a stab this weekend.

My attempt resulted in slower rendering and stuff not rendering.