I'm trying to figure out how it happens that some STK tracks that are running well offline, are either running slow or "lagging" in online play. The most prominent examples are Black Forest, Candela City and Cocoa Temple, but I also experienced these performance issues with my own track Toy Block Raceway (see https://forum.freegamedev.net/viewtopic ... 18&t=14214) when playing with five players and more. While Toy Block Raceway was my first track and initially intended as a learning project, I want to avoid such issues in possible future projects.
Here are some properties, which I suspect to be relevant for online track performance (I used my track as example):
- Polygon count:
I started working with LOD models to decrease poly count for revision 3, which is not online, yet. The average count of polygons rendered in game was decreased by about 1/4 of the previous version, now ranging from about 15 000 to 30 000, while previously it were about 23 000 to 39 000 polygons. Unfortunately the LODs are actually slowing down the track (overall, not just in networking). I noticed that there are tiny delays (a few frames) when LOD instances switch the displayed model. I guess because the track is compactly built with a lot of direction changes and many separate objects, there must be lots of LOD model switching going on. Otherwise I don't know what is wrong. It looks like resetting the LOD instances to object type none and sticking with the higher poly count gives better performance in this case. - Number of objects:
I don't know how synchronization works in STK network games. So maybe this matters: Toy Block Raceway is literally built of blocks. Instead of modeling a landscape from a single surface plate, we used small separate blocks to build the tunnels, walls, ramps and scenery. Maybe joining many of them into one object would increase the online performance or does only the poly count matter? - Movables:
For networking I excludeed most movable blocks by scripting. Only 14 movables are left in networking mode. Standard tracks like STK Enterprise and Volcano also have movable objects and those tracks are running very well online. So this can't be a problem, can it?
Best regards
RX1