[Standalone version] memory allocation

  • Hello all!




    I would like to know, how to manually set the memory allocation with the standalone version (windows 10, 64 bits) of the game?


    Because I found only threads about the steam version and especially one for an .exe version with 6GB of memory (posted by the dev red51). I have a total of 32GB of memory, but I only need to allocate 2GB for the game.



    Thank you in advance! :)

  • AFAIK the exe only calls java and passes in some variables for memory allocation. The way JRE manages memory is still a bit of a mystery to me. I'm not sure if its heap or stack memory you want to set an upper limit to but the flags -Xms and -Xmx set min and max heap size where -Xss defines stack memory size.


    So to start the game with a 2GB max heap size, go to the game folder in a command promt and try "java -jar -Xmx2G risingworld.jar"


    Also, keep in mind the game comes with a copy of the JRE already. you can try running with that or the JRE/JDK you may have installed on your own. Keep in mind the JRE that comes with Rising World is affected by any java environmental variables you may have set already.

  • Java uses a Garbage Collector on the stack memory - no messy memory allocation and memory leaks. The game should only use as much memory as is needed.


    I've not set anything specific and the game runs on my box using just under 3GB or RAM


    If you set the memory too low you might force your machine to use virtual memory (who uses that these days with RAM so cheap? :) ) and unless you're running a good SSD that might run into negative performance.

  • One thing that's important about the game is that it uses two different "types" of memory: heap and direct memory. Heap memory is basically the "default" memory, most regular game stuff goes there (information about the world, game data, player data etc), direct memory is used for native things (basically everything that needs to be sent to the graphics card, e.g. textures, meshes etc).
    You can change the heap memory with the -Xmx launch option (as mentioned by @zfoxfire), and to change the direct memory, you have to use the -XX:MaxDirectMemorySize=... option.


    Example (to allocate 3 GB heap memory and 3 GB direct memory):
    java -jar -XX:MaxDirectMemorySize=3072m -Xmx3072m risingworld.jar


    I've also attached another exe for the standalone which allocates 3 GB heap + 3 GB direct memory automatically :)


    (this only works for the standalone version, it does not work for the Steam version)

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!