Tag Info

New answers tagged

1

Your idea is correct, only render and update entities near the player for better performance. To do this in a efficient manner, you will need some sort of spatial partition to know what is near the camera. You definitely don't want to loop through all the entities on your map. One of the most efficient ways to use is a hash table, also known as a grid. But ...


0

If I understood the problem correctly it's not that hard to solve. You track the position of every entities and update/render them only if they are inside or near the view field. The other way round you can of course destroy them if they are outside the view frustum (if you want that). Just loop through the container and check x and y coordinates and ...



Top 50 recent answers are included