StarMade 0.051 Huge performance and Memory boost

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Progress
    In the past two days I manly fixed issues of people sending in crash and bug reports. I'm doing my best to get it run for as many people as possible, so I'm taking error reports very serious, and almost every report is replied to personally.

    Furthermore I refined the Artificial Intelligence even more.
    As I was implementing the AI I noticed what an awesome tool for benchmarking StarMade now exists. The possibility to load any number or shape of enemy ships suddenly created a whole new field of applications for me.

    Benchmarking
    As a control test I build myself a simple ship with two beam weapons attached to it. They all had the same mission: To search and destroy the enemy death star.

    Fixing Memory Leaks
    My first test went rather disappointing. At first I got mediocre framerates when the ships were flying through space with almost no collisions, but the rate sunk to about 4, when the ships started attacking. Also the 100 ships had the memory rising to over one gigabyte which is absolutely inacceptable.
    So I used a Java profiler called VisualVM (which is very awesome) to analyze, where all the memory has gone.
    Long story short, I managed to fix some serious memory leaks and now, StarMade only uses 20% of the memory it used before. Also the memory now scales quite well, and only gets larger, if more ships are loaded.

    Increasing performance
    Despite fixing the memory leaks, the performance of my benchmark was still at about 10 fps, when all ships were attacking and firing at the death star. So I used the profiler once more, only this time to find calculations that slowed down the game. I used some tricky stuff and some caches to boost the performance in a lot of places.

    As I benchmarked once more, the poor 10 fps from before now have become a solid 60 fps.

    General thoughts about some Game Play aspects
    I'm still figuring out, what kind of balance the destruction of cores would result. My original thought was to be able to steal ships by damaging the core enough (everybody inside a ship dies when a core is damages enough). But I also like the idea of ships getting completely destroyed, when destroying the core.
    I came up with an Idea on how to make it more interesting as well as keeping the amount of trash ships in space fairly low: If someone dies inside a ship by core destruction, there is going to be a counter of 5 to 10 minutes (depending on its size) on that ship. I'll add explosions on that ship when its on the counter. If the counter runs to zero, the ship is going to be destroyed. If someone else manage to get into that ship, the counter will be stopped.


    Soon to come
    Watch out for the new Game Mode 'Coop Deathmatch' which will almost certainly be released this week.


    thanks for your interest in StarMade,
    schema