TUXDB - LINUX GAMING AGGREGATE
by NuSuey
NEWSFEED
▪️ GAMES
▪️ STEAM DECK ▪️ DEALS ▪️ CROWDFUNDING ▪️ COMMUNITY
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 8 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]


Dev Progress II: Out of sector updates server performance

DISCLAIMER: I will speak about what happened, progress and performance optimization over the last few days and since it's mostly been coding, it will get kind of technical. I could post some images but there really is nothing new on them that I could show you, so I don't see the point of doing it. This will most likely also be more like a blog post or something. We'll see.

Alliances & Progress


Over the last weeks we finished up on the alliances mechanics, meaning: Alliances are basically finished (feature-wise)! They need more testing, but the features are all in. However, there's a lot of other features that we want to ship alongside alliances with the next update, the most important ones being Steam Workshop support for ship and station models and out-of-sector-updates for player ships and stations. We want to ship them all at once because we know that if we ship them one by one they will break their own database structures (ie. corrupting your saves) or we'd have to add a converter each single time (which is actually not an option if we have to do it for lots of small updates) since we're doing a lot of work in that area right now. I also improved how player ships are saved and, most importantly, restored when there are database corruptions. Right now ships are always stored in the sector files, since technically speaking, they belong to a sector. But this lead to annoying ship losses in a few cases when the server crashes before a sector can be written to disk. With the new system, which will be shipped with the update, player ships and stations will be saved in the player's file. In addition to that, the server will now save multiple instances of the player's file, meaning even if a player file gets corrupted due to lack of HDD space, BSOD, a power outage or other reasons, there are 5 other fallback saves which you can access so at max only the progress of the last 5 minutes is lost. This also means that you can now transfer entire players, including their ships (!) to another server by copying that player's file. It also means that sector and player files no longer need to be written out every time a player changes sectors, which should improve performance of multiplayer servers dramatically. This also allowed me to fix an issue where the entire database would get written out in some cases to ensure a consistent state. This has been identified as the major cause for those huge lags that tended to occur on large servers (like the public test server) whenever a player logged in or whenever a new faction was created (ie. when a player changed sectors into a region of a new faction).

Steam Workshop and Out-Of-Sector Performance Improvements


Steam Workshop implementation should be quite straightforward. If its ease of implementation is similar to the other Steam API features that I've used in the past it should be realized quite quickly. Performance optimization for holding lots of sectors in memory at once, however, has proven quite the problem (but a solvable one, phew) over the last few days. When we're talking about keeping lots of sectors alive at once, The most important things are update performance and memory consumption of the server. Now, sectors without players are actually really lightweight when it comes to update performance, since the game is using a simplified update variant for these, however they can still easily use 100 - 150 MB of RAM per sector while in memory. And players tend to visit the populated sectors more often since they're a lot more interesting than empty space. So we have to improve on the memory consumption most importantly. So we profiled what was actually causing the high memory consumption. At first we thought "obvious, it's all the geometry of the objects". After measuring memory consumption before and after stripping down all the plans of all the objects in several highly populated sectors we realized that those only took up 2 - 5 MB of RAM, out of 130MB. So that clearly wasn't the cause for the high RAM consumption. Which was to be honest both scary and a relief. A relief because if it were the block structures, we'd have to strip them every time a player leaves a sector and re-add them every time a player reenters the sector, which would lead to a myriad of special cases where components and scripts would always have to check if a plan was actually loaded or not (have fun, modders, haha). But it was also scary since it had to be something that we hadn't thought of before, and that's never good. After further investigation it turned out to be the lua scripts. In highly populated sectors we saw that there were on average around 220 scripts active (basically nearly every single station or ship interaction is its own script). But it wasn't the scripts themselves, it was the fact that we were using a single lua VM for each unique script. This might sound ludicrous, but at the time it seemed like a good idea since these VMs are actually rather lightweight, and each script could be cleaned up easily when it's being detached or deleted. Well, they were lightweight until we started adding the Avorion Scripting API, which blows each VM's memory consumption from 5 - 20KB (depending on which built-in lua libs we offered) to at least 130KB. 130KB times 220 is 28.6 MB, so we had at least 28.6 MB per sector. And we're not yet counting any initialization or actual scripts, this is just the absolute minimum basis per script. Initialized scripts could take 500KB to 2.5MB. After profiling some more we saw that the scripts used up to 80 MB per sector - quite the amount. The big issue here is that when using a separate VM for each script, there will have to be a lot of redundant data available to each VM, since the VMs themselves don't know that there are other VMs.

The improved Scripting API


So what I've come up with now is simple: Use a single lua VM for each entity, and no longer for each script. We were forced to make a few script API changes in order to do this, but the good news is: We managed to do it in a way that will NOT kill current mods! I'd still strongly advise modders to adjust their scripts to make use of the improved memory consumption, though. The changes are as follows:
  • Since every script defines functions that will be called from the main game, and these functions have to have the same names, I've added modules or namespaces (I'll decide on which term we'll use later). Each script can define a namespace/module in which its functions will live that it'll expose to the main program. By separating them into different modules or namespaces they will no longer have the same name in the VM and they won't get overridden when another script is loaded into the VM.
  • When loading a script, Avorion will check if it's using a namespace, and if yes and if there are no duplicates it will be injected into the existing lua VM of the object.
  • If no namespace is defined or the namespace exists already (basically whenever there's a potential for methods being overridden by the newly loaded script) the script will be run in a new VM. This is basically exactly the same as the old model that we've been using so far.
We've profiled this change and so far it's been looking very promising. Script memory consumption has been more than halved and it looks like we might even be able to reduce it to 20% of its previous amount, which is actually crazy good. We only adjusted the major scripts and we already got the memory consumption down from 130MB to ~40MB for four loaded sectors. We'll be on the lookout for more of these optimizations, but that's what we've got so far. Another great feature of the new system is that you can now easily access other scripts in the same entity - provided that they're loaded in the same VM (which they should be, by default): Just check and access the namespace of that script. With these changes we also paved the way for improved modding support where you won't have to merge files manually or with tools but should be able to just copy them into, let's say, a specific folder and they'll work.

Alright that's it for now!


If you made it here, congratulations and thanks for reading! Hopefully I managed to give you an insight on what we're doing right now.

OMG I DON'T CARE UPDATE WHEN!?


I won't give another date right now because this stuff is really (and I mean REALLY) hard to predict, but I want you all to know that we're working hard on new features and improving the game and we've been making some great progress over the last weeks. As I said in the last announcement: Software engineering is a complex thing and there can always be unforeseen issues (these issues I just talked to you about are basically the proof) so telling an exact date is hard if we want to ship with as little issues as possible. There's a reason why lots of companies just say "when it's done". But to give you at least some feedback: About 50% of the work of the update is done, and hopefully the rest will be more straightforward so let that be an indicator for you. Oh, and there will be more new screenshots of nice new features in the next update, promise :) Have fun and see you all soon!


[ 2017-05-08 17:51:14 CET ] [ Original post ]



Avorion
Boxelware
  • Developer

  • Boxelware
  • Publisher

  • 2020-03-09
  • Release

  • Indie Simulation Singleplayer Multiplayer Coop
  • Tags

  • Game News Posts 295  
    🎹🖱️Keyboard + Mouse
  • Controls

  • Very Positive

    (11751 reviews)


  • Review Score

  • https://www.avorion.net/
  • Website

  • https://store.steampowered.com/app/445220 
  • Steam Store

  • The Game includes VR Support



    Avorion Linux Content [28.59 M]

  • Public Linux depots

  • Avorion - Black Market
    Avorion - Into The Rift
    Avorion - Behemoth Event Series
  • Available DLCs

  • Avorion is currently in Early Access, and is under active development. If you want to know more about that, please read the Early Access disclaimer at the top of the page.

    Several hundred years ago, a cataclysmic catastrophe nearly ripped your galaxy apart - an unsurmountable ring of torn hyperspace fabric appeared in the center of the galaxy, which normal hyperspace engines can’t overcome.

    Since this event nobody has managed to get near the central regions of the galaxy. All you know is that this event also spawned multiple unsurmountable hyperspace rifts throughout the entire galaxy, and that a strange race of aliens, the Xsotan, has appeared in the center. It looks like these aliens have found a way to surpass the torn hyperspace fabric, but so far nobody has managed to establish contact with them.

    There are also rumours about a strange new metal called ‘Avorion’, which has appeared in the center of the galaxy, around the same time as the Xsotan arrived. Apparently the aliens use this material to build their ships.

    Start out as a nobody at the edge of the galaxy and work your way to the center of a galaxy that gets more dangerous, but also more rewarding the closer you get to its core. Avorion takes sandbox aspects from games like X or Freelancer, throws in co-op multiplayer and lets you build your own ships. It features ships made of freely scalable blocks that can be procedurally generated and that break into pieces where they're hit in space fights.

    Combat

    Equip your ship with chainguns, lasers and other weaponry to take on your enemies and enjoy the sight of completely destructible ships breaking at the exact points where you hit them. Defend your allies from pirates, hunt down enemies for coin or even participate in wars between entire factions. Build hangars and command squads of fighters in your battles or destroy enemy freighters to steal their cargo.

    Explore

    Fly through beautiful nebulas and dense asteroid fields in search of hidden treasures and meet the many factions that populate and control their portion of the galaxy. Each faction has its own characteristics, such as peaceful, intelligent or aggressive, and has its own ship styles, meaning their ships and stations have a distinct look.


    Explore the galaxy at your own pace to find valuable goods in old ship wreckages, undiscovered asteroid fields rich of resources, unchartered asteroids which you can claim for yourself, or clues as to what happened during the event a few hundred years back.

    Build Your Fleet

    There are no limits to ship size or complexity besides your resources. You're not bound to the standard voxel style and while building an awesome ship in Avorion you won't get lost in lots and lots of micro-management. You can focus on building a great looking ship, without having too much trouble to make it work. But make sure you still keep an eye on your ship’s maneuverability or energy requirements. Adjust your ships perfectly to their operational purpose by building light and agile or heavily armored ships.


    Build specialized transport ships with lots of cargo space or heavily armored battleships with strong shields. Collect loot from defeated foes which you can use to upgrade your ship: New turrets, resources, trading goods or system upgrades. Install system upgrades that allow more weapons, ease asteroid mining or trading systems which detect trading routes over multiple sectors.

    And why build only one ship? Hire captains to fly your ships for you, manage your crews, weapons, hangars and fighters and build your own fleet of space ships!

    Trade

    Extend your ship with a cargo bay, find profitable deals and haul over a hundred trading goods through the galaxy to make a profit and buy your way up the food chain: Build up a trading corporation and extend your influence in the galaxy by founding asteroid mines and factories that attract NPC traders who will buy and sell their goods at your establishments.

    Co-op Multiplayer

    You don't have to fight the galaxy alone! Avorion features co-op multiplayer, so team up with your friends to build stations together and destroy pirates and enemy factions! Work together to extend your influence in the galaxy and build your own empire. Or, you know, blow them apart in large PvP battles. It's a sandbox, you can do whatever you want.


    In Avorion you choose your personal playstyle. Haul cargo, find profitable trading routes and found factories. Or maybe you're sick of being the good guy? Build your own battleship, equip it with powerful weaponry and blow away your enemies. Be the aggressor that starts wars with entire factions, raid freighters, smuggle illegal goods and scavenge old wreckages. Find your way to the center of a galaxy that gets more hostile, but also more rewarding the closer you get to its core.
    MINIMAL SETUP
    • OS: Ubuntu 12.04 or higher
    • Processor: Intel i5 @ 3.0 GHz or AMD equivalentMemory: 4 GB RAM
    • Memory: 4 GB RAM
    • Graphics: Nvidia Geforce 550 or equivalent (full OpenGL 3.0 support required)Network: Broadband Internet connection
    • Storage: 1 GB available spaceAdditional Notes: Middle mouse button. mouse wheel required. No Internet connection required for Singleplayer.
    RECOMMENDED SETUP
    • OS: Ubuntu 12.04 or higher
    • Processor: Intel i7 @ 3.3 GHz or AMD equivalentMemory: 6 GB RAM
    • Memory: 6 GB RAM
    • Graphics: NVidia Geforce 1050 / Radeon RX 460Network: Broadband Internet connection
    • Storage: 3 GB available spaceAdditional Notes: Middle mouse button. mouse wheel required. No Internet connection required for Singleplayer.
    GAMEBILLET

    [ 5951 ]

    6.60$ (17%)
    10.00$ (50%)
    5.94$ (15%)
    22.99$ (8%)
    3.81$ (81%)
    12.74$ (15%)
    16.96$ (15%)
    46.19$ (16%)
    2.00$ (80%)
    14.93$ (17%)
    8.59$ (14%)
    7.98$ (80%)
    4.14$ (17%)
    24.49$ (51%)
    4.12$ (17%)
    21.24$ (15%)
    12.48$ (58%)
    11.34$ (62%)
    25.47$ (15%)
    36.79$ (8%)
    7.64$ (15%)
    7.98$ (80%)
    14.01$ (53%)
    6.30$ (65%)
    0.69$ (93%)
    26.09$ (13%)
    11.32$ (43%)
    1.36$ (86%)
    2.22$ (78%)
    35.87$ (20%)
    GAMERSGATE

    [ 3221 ]

    1.5$ (81%)
    1.8$ (82%)
    0.75$ (92%)
    17.82$ (70%)
    1.35$ (89%)
    1.05$ (85%)
    0.75$ (85%)
    0.75$ (92%)
    1.5$ (85%)
    6.4$ (60%)
    7.5$ (81%)
    3.4$ (83%)
    0.75$ (85%)
    1.6$ (80%)
    4.5$ (77%)
    6.25$ (75%)
    0.56$ (81%)
    9.74$ (51%)
    5.0$ (75%)
    0.56$ (81%)
    3.75$ (85%)
    0.49$ (51%)
    1.5$ (85%)
    8.91$ (70%)
    0.56$ (81%)
    7.0$ (65%)
    2.25$ (92%)
    8.09$ (46%)
    8.28$ (45%)
    4.0$ (80%)

    FANATICAL BUNDLES

    Time left:

    0 days, 6 hours, 10 minutes


    Time left:

    23 days, 6 hours, 10 minutes


    Time left:

    5 days, 6 hours, 10 minutes


    Time left:

    36 days, 6 hours, 10 minutes


    Time left:

    42 days, 6 hours, 10 minutes


    HUMBLE BUNDLES

    Time left:

    3 days, 0 hours, 10 minutes


    Time left:

    3 days, 0 hours, 10 minutes


    Time left:

    12 days, 0 hours, 10 minutes


    Time left:

    19 days, 0 hours, 10 minutes

    by buying games/dlcs from affiliate links you are supporting tuxDB
    🔴 LIVE