Update 0.09376

    Joined
    Jul 5, 2013
    Messages
    1
    Reaction score
    0
    StarMade 0.09376: Economy, Performance & UDP

    Hello and welcome to StarMade,

    this update has taken a little bit longer, because it needed some testing due to changes in the cores of both the network as well as the graphics rendering system. Please excuse eventual errors that might still occur. In case of a new game-breaking bug, please don't panic; I will try to fix it as fast as I can (should one occur). Please keep your auto-backup (created from updating a version and found in the starmade install dir) safe!



    Economy

    After some time with fixed ones, variable prices are now back. Shops will now change their prices depending on their stock. If the stock gets low the price will go up, and vice versa. If stock is bought or sold, the shops will gradually update their prices over a longer time to prevent exploiting.

    Furthermore, the trading guild will now restock shops on arrival if at least one ship survives (can be switched off in the server.cfg).



    Graphics Render Core

    I took apart the graphics core, and managed to significantly decrease VRAM usage. That made it possible to get rid of a by segment OpenGL state change when rendering by putting it on the graphics card (which wasn't possible due to size restraints before).

    I also refined the block decoding shader to get rid of all if-else statements.

    Please keep in mind that this will unfortunately not yield the same performance boost for everybody. Some cards have different bottlenecks. Also, as with all graphics boosts, the rule is normally that the slowest cards will get the least boost in fps unfortunately. This is because one fps in lower avg numbers is much harder to obtain then adding 10 to a already high fps average: One of the reasons why FPS are in graphics development itself not really a good way to profile performance.



    UDP

    StarMade has now the possibility to use the User Datagram Protocol: This is basically an alternative to the other system called TCP. The main difference is, that TCP has a lot of pre-implemented control functions, such as packet ordering, retransmission, and flow control, which produce overhead and decrease performance. On the other hand, using UDP by itself is unsafe, since it's stateless and therefore not reliable.

    So in UDP, some of the functions have to be implemented by hand to guarantee reliability. However having the implementation, it will also be much easier to debug lag producing bugs.

    I can't say yet if the performance will be any better. There is also still a way to switch back to TCP in the server.cfg. Clients will try both methods when connecting.

    If you run a private server with a router. Please check if it does forward the right port (there is a difference between UDP and TCP ports).



    Blueprint upgrades

    • The slot system from the server.cfg should now work
    • ship uploading to the site should be fixed
    • implemented server sided check for spawned blueprints (if the price of the blueprint is smaller then what has spawned, all players get a notice (no other auto-actions yet)). So even when someone else uploads a hacked ship with 0 price, don't buy it.



    Physics stuck protection

    Since the old system was very unreliable in detecting if structures overlap each other, I implemented a detector that based on heuristics checks single blocks that return a penetration depth over a certain margin. Since this can happen naturally when bumping into stuff especially with high speed, the block is checked by inverse transforming it to the space of the object it's colliding with. The the number of blocks in exactly that area is checked, and if that value keeps being height for over 5 seconds, the object is warped out of collision. This will hopefully prevent servers breaking down in lag from objects being stuck.



    Other fixes & changes

    • fixed server crash when ship with custom blocks is uploaded or spawned
    • custom blocks will be missing from spawned ships that are uploaded
    • improved performance of ships being loaded or spawned with docked ships
    • fixed docking area not updating when last enhancer gets disconnected
    • fixed bug that would warp ships with structures docked to them to the center of the sector while loading
    • usernames now must be between 3 and 32 long, and must contain at least one letter
    • server-sided username check added
    • improved synchronization by slow checking transformations
    • white block brightened up

    Thanks for playing StarMade,

    - schema