Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/magefree/mage/llms.txt

Use this file to discover all available pages before exploring further.

XMage runs on the Java Runtime Environment, which means its rendering pipeline is configurable through standard JVM flags. If you have a modern GPU, switching from the default software renderer to a hardware-accelerated one can dramatically improve frame rates, card animation smoothness, and overall UI responsiveness — often with a single flag. This page documents the flags sourced from the official readme and Java 2D documentation so you can tune the client to your hardware.

How to Apply JVM Flags

All JVM flags are entered directly in the XMage Launcher. No file editing is required.
1

Open the XMage Launcher

Start XMageLauncher as you normally would.
2

Open Settings

In the launcher menu bar, click Settings. The Settings window will open.
3

Navigate to the Java tab

Click the Java tab inside the Settings window.
4

Edit Client Java Options

Find the Client java options text field. Add your desired flags here, separated by spaces. For example:
-Dsun.java2d.opengl=true -Xmx2G
5

Restart the client

Close the client if it is running and relaunch it from the launcher. The new flags take effect on the next client start.
The full list of Java 2D system properties supported by JRE 8 is available in the official Oracle documentation. XMage targets JRE 8, so all flags on that page are potentially applicable.

Flag Reference Table

The table below summarises the flags most relevant to XMage performance.
FlagPlatformDescriptionExample value
-Dsun.java2d.openglLinuxEnable OpenGL hardware acceleration via Java 2Dtrue
-Dsun.java2d.xrenderLinuxEnable XRender pipeline (lighter than OpenGL)true
-Dsun.java2d.d3dWindowsDisable Direct3D acceleration to fix rendering artifactsfalse
-XmxAllSet maximum JVM heap size2G, 4G

Per-Platform Recommendations

On Windows, Java 2D uses Direct3D for hardware acceleration by default. This works well on most systems but can produce visual glitches — distorted card art, broken button borders, or other GUI artifacts — on certain GPU and driver combinations.Disable Direct3D (artifact fix):
-Dsun.java2d.d3d=false
This switches rendering to a software fallback. You lose Direct3D acceleration but eliminate the artifacts. If your system renders correctly without this flag, there is no benefit to adding it.Increase heap memory:
-Xmx2G
See the Memory section below for details.

Increase Heap Memory

A safe and universally applicable starting point for any platform is -Xmx2G. This raises the maximum heap to 2 GB, giving XMage more room before the garbage collector has to work hard — which translates directly to fewer frame drops during large multiplayer games. If you have 8 GB of RAM or more, this change carries essentially no downside.
XMage loads a large number of card images and game objects into memory during a session. The default JVM heap is often too small for long or complex games, causing the garbage collector to run frequently and producing visible stutters.
-Xmx2G
Increase the value further if you have spare RAM:
-Xmx4G
Note that increasing memory beyond what actually gets used has no benefit — if -Xmx2G results in stable play, raising it to -Xmx8G will not make the game faster. More background on JVM memory settings: Stack Overflow reference.

Combining Flags

You can combine multiple flags in the Client java options field, separated by spaces. A typical high-performance Linux configuration might look like:
-Dsun.java2d.xrender=true -Xmx2G
And a Windows artifact-fix configuration with extra memory:
-Dsun.java2d.d3d=false -Xmx2G
Always test one flag at a time so you can identify which change caused a regression if something breaks.

Build docs developers (and LLMs) love