Starmade Performance

    Joined
    Sep 9, 2013
    Messages
    48
    Reaction score
    1
    Can we expect the game to rune more efficiently in the future? Right now, my ship with ~2m blocks drops my computer down to 50 fps when I look at the whole thing. Some day could I expect to have 75 fps or even 100 fps when looking at the same thing, or is starmade already running close to peak efficiency?
     
    Joined
    Oct 6, 2013
    Messages
    203
    Reaction score
    45
    • Purchased!
    • Legacy Citizen 7
    • Community Content - Bronze 1
    I\'m not sure... It is probably a question to ask schema but probably it\'s efficiency could be improved.
     
    Joined
    Sep 9, 2013
    Messages
    48
    Reaction score
    1
    Any idea how to ask schema? And I wouldn\'t think it would be running anywhere near peak efficiency, since this is an alpha, but there is always a possibility.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    It doesn\'t run at peak efficiency.

    That would require a octree element (bottom-back-left, bottom-back-right, bottom-front-left, bottom-front-right, top-back-left, top-back-right, top-front-left, top-front-right) to be shown as a single block if all 8 blocks are the same (visual) to save blocks.

    Or just load a planet surface, not the lava within it if you don\'t need it.
     

    fire219

    1200° Plasma
    Joined
    Sep 23, 2012
    Messages
    443
    Reaction score
    117
    • Legacy Citizen 4
    The current prebuild versions actually have been significantly rewritten to use octree elements, which along with numerous other optimizations, makes it more efficient than the \"live\" version currently downloaded from the launcher. On the other hand, it has many new visual goodies (shadows, normal maps, procedurally generated background, etc) which may slow it down even more, but those can easily be turned off.



    I\'m pretty confident saying that schema still has quite a few tricks stuck up his sleeve to make the game even faster. :)
     

    Matt_Bradock

    The Shrink
    Joined
    Aug 4, 2013
    Messages
    798
    Reaction score
    464
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 5
    ...Since the Java language isn\'t famous for its outmost efficiency with graphic rendering and physical simulation. There is a good reason very few devs use that language for resource-hungry applications. The fact Schema got this far using Java is by itself a near miracle.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    I don\'t know Open-GL well...



    How can you put work onto graphic card processors?

    Is everything possible with Java?

    Are there some driver-like libraries?



    Octrees ... Yes definitively required !

    The next feature we need is to only load blocks which are not surrounded by others and compimize flat and repeating surfaces.

    With a repeating-surface compression, schema may even think about more advanced build tools for performance reaons *BTW: it is a joke :) *
     
    Joined
    Aug 23, 2013
    Messages
    379
    Reaction score
    65
    Hi,

    Not only can you offload a lot of graphics load to the video card using OpenGL, in theory you can offload other work (unrelated to graphics) to the GPU using OpenCL. For both cases, the work is not done by Java - it\'s done by native code (e.g. 80x86 code running as a Windows library) that feeds \"GPU code and data\" to the video card to process.

    For Starmade\'s code, you can classify operations that involve objects (ships, planets, asteroids, stations) into 2 categories: things that manipulate the underlying blocks of an object (applying damage, adding/removing blocks, etc), and things that treat the object as a whole (collision detection, rendering).

    For the first category, octrees are only \"good\". It\'s likely that some other data structure would be better - e.g. objects could be a \"2D array of run length encoded vertical columns\" and use a lot less memory and cause a lot less cache misses (less \"pointer chasing\").

    For the second category, octrees are just plain bad. Instead you want optimised mesh/es that describe exterior and interior surfaces.

    Also; I strongly suspect that using SQL/database for storage (instead of purpose designed data structures in Java) is a serious performance problem on its own.