I’ve got a racing game and I want to show the progress of all the racers on a straight progress bar.
The issue I’ve got is the competing racers can be anywhere from 50 to 50000 depending on the race you do.
I’m planning to have the other racers be phased out of existence unless you’re within a certain range to keep performance. But I will have to show essentially upwards of 50000 arrows. On the progress bar.
This has to be as ultimately performance friendly as possible, and can be as ugly as it needs to be to keep that.
Been trying to rattle my brain this morning on the most performance friendly way to do it but the sheer chaos of it is what I want to show.
Basically server already knows of each racers progress, if we sort things it can go sideways interms of performance. It can also go sideways if we query the server for biggest progresses. However server can always update the sort and you can query server for X entry relevant players.
Think getting 10 cars within range and directly accessing their tracking progress and showing those as sorted with a fixed interval is the best scenario.
Still I don’t understand why you have to show more than X number. Cause in terms of player UX player attention can be only focused to driving aspects at that moment and maybe some of the chasing cars at most. I don’t see any reasoning if the game is 2d or some other gameplay aspects that we/I am not aware of. If cars phased out (not relevant for player) why you show them in progress bar?
Still if so you have to show, you have to get the data with some steady rate which is a super big network cost you can open a thread with a que to update them when there is enough processing power and network with a low frequency sort.
Also using prediction for out of phase cars can be an option rather than getting data. The cars that is under a certain range can be predicted.
Also I don’t understand how you are going to visualize 50k lines in a screen that have limited pixels.
it its 1px lines.
50k lines in vertical is 50000px
I don’t know any monitor have that much pixels
After race complete in stats you can query server to retreive sorted stats, display players own stats with in range of 10(1) (5+ 5-) or give option to expand all data etc.