Multithreaded Rendering in Mi
PARALLEL AND DISTRIBUTED COMPUTING (PD101)
canela | MAGALLANO | MARIANO | STA. ANA | TATTAO | JUNE 18 ,
2025
PAGE 1
Introduction
The ever-popular game Minecraft is a sandbox video game where
players survive, build, and explore in a vast block-based world. The game,
however, has faced performance challenges throughout its updates, with
frequent frame rate drops below 60 FPS even on modern hardware. The
game’s single-threaded architecture massively limits its ability to utilize
multi-core processors, leading to undesirable lag and stuttering. The Sodium
mod addresses the issue by introducing multithreaded rendering of the
Minecraft world which significantly improves performance. This case study
explores Sodium’s impact, offering insights and knowledge in optimizing
game engines for modern hardware.
Problem Statement
The Vanilla rendering engine of Minecraft relies on single-threaded
processing for its main game loop and rendering functions, which results in
suboptimal performance, with average frame rates dropping below 60 FPS on
modern mid-range hardware. This inefficiency in architecture leads to lag and
stuttering gameplay, negatively affecting player experience, as well as
limiting the game’s scalability on multi-core systems. On the other hand, the
Sodium mod makes use of multithreaded rendering to vastly improve frame
rates and smoothness, emphasizing a performance gap between the two.
This case study examines the extent to which single-threaded rendering
limits the performance of Vanilla Minecraft compared to the multithreaded
method of Sodium, addressing the growing demand for optimized and
smooth gameplay in the ever-updating and increasingly complex game
environment of Minecraft.
Scope and Limitations
This case study focuses on comparing the performance of Vanilla
Minecraft’s single-threaded main game loop with Sodium’s multithreaded
rendering approach in single-player worlds, using Frames Per Second (FPS) as
the primary metric in Minecraft 1.21.5 Java Edition on a mid-range hardware
(Ryzen 5 3300x, Nvidia GTX 1660 Super, 32GB RAM), as well as using 2GB of
allocated memory for both vanilla and sodium run time comparisons. The
scope will center on the main game loop’s rendering pipeline, analyzing how
Sodium’s optimization is at play such as parallel chunk rendering, optimizing
draw calls, and occlusion culling to alleviate OpenGL’s single threaded
bottleneck. This case study excludes multiplayer performance, server-side
logic, non-rendering optimizations (e.g., memory management, game logic),
and Ticks Per Second (TPS), as they are secondary to rendering. A proposed
long-term solution to rewrite the rendering engine using Vulkan or DirectX 12
is speculative, as no implementation exists for Java Edition, and thus is not
validated in this study. Vanilla Minecraft employs some multithreading for
chunk loading, but the main focus is on its single-threaded rendering pipeline.
Other mods like OptiFine are mentioned shortly to justify why Sodium was
chosen for this case study, though they aren't explored deeply. Limitations
include the use of specific hardware, game versions, and dependance on
current benchmarks because of limited resources.
Background
1. What is Minecraft, Vanilla, and a Mod?
Minecraft is a type of sandbox video game which was made by
Mojang Studios in 2011. This game gives players permission to explore a
block type or voxel world that has been produced procedurally, this world
consists of blocks representing different materials like dirt, stone, water and
trees. The main gameplay involves digging for resources, making tools
through a crafting process, constructing buildings with these mined resources
and surviving against mobs who are hostile towards you. Minecraft offers
different modes, like Survival, Creative, Adventure and Spectator. These are
designed for both relaxed and experienced players. The game achieves
success through its open-ended mechanics that give power to the player to
construct, alter and discover the world in nearly infinite ways.
Looking at the technical side, Minecraft is constructed with Java and
depends a lot on real-time rendering methods, procedural generation and a
light game engine designed to support its block-like look. Despite its quite
basic graphics, Minecraft carries out many calculations connected to terrain
creation, chunk loading process, entity actions as well as rendering. These
tasks are mainly managed by the CPU which makes optimizing performance
hard - particularly when the complexity of the game's world increases. As
time passed, performance problems became a major concern for players,
especially those using lower-end machines. This provided an opportunity for
community-led improvements such as optimization mods.
The popular coined term "Vanilla", in this case “Vanilla Minecraft”
refers to the version of the game that is provided by Mojang without any
alterations. Everything that comes from the main development team of
Minecraft, which includes some basic features, processes, and content of the
game like survival aspects and mechanics, mobs, redstone, structures,
biomes, and basic rendering engine of graphics, is considered either Vanilla
PAGE 1
or originally from Vanilla. Vanilla Minecraft is obtained from official launcher
and includes updates from Mojang. While Vanilla Minecraft is known to be
stable and completely testing, it also comes with inherent performance
limitations; this is especially evident in larger, or more dynamically active,
worlds. Some of this issue is part due to the design, the game primarily runs
under a static single thread model and has a fixed rendering model based on
older methods of OpenGL.
Vanilla Minecraft is used as the basic environment for comparing when
we analyze changes or adjustments in performance. It allows us to see how
the main game works on its own, with little or no external optimization
applied. For developers, as well as players, it is important to understand how
Vanilla operates with respect to rendering, chunk loading, and world
generation, in order to identify where slow downs or lag spikes occur. This
knowledge helps developers create more efficient and smooth systems, and
measure and evaluate possible external resources, like mods, can
successfully improve performance or expandability of the game.
A Mod (short for "modification") is a user-created or third-party change
to Minecraft that modifies or expands gameplay, aesthetics, or performance.
Mods can add new elements like weapons, mobs, or functional gameplay
mechanics, but can also add to performance and aesthetics. Mods are usually
written in Java and loaded into Minecraft using a mod loader such as Fabric or
Forge - which act as intermediary layers that allow mod developers to hook
into the base game technologies. Mods work by overriding, injecting, or
extending aspects of the core game.
This case study focuses on performance mods, specifically, Sodium.
Sodium replaces some of the vanilla rendering pipeline with highly optimized
and multithreaded systems providing huge FPS increases and smooth chunk
rendering. Performance mods are more complicated to build than basic
content mods because they involve a deep understanding of the underlying
game engine, knowledge of the rendering API (in this case OpenGL), memory
and resource management, and thread synchronization. Mods like Sodium
are great examples of how a systems-level improvement could have a
significant user experience impact and serve as real-world examples of
software optimizations.
2. Processor and Game Performance Basics
2.1 How processors work: Single core vs. multi-core, threading, and
parallel processing
Single threading refers to a program running all of its work
sequentially within a thread, or unit of execution, of a process. In a single
threading application, each of the tasks, such as rendering, game logic, and
PAGE 2
player input are processed one after the other on a single core. There is the
possibility of runtime bottlenecks when computationally expensive tasks run
sequentially on a single core. Multi-threading on the other hand will
execute multiple threads, within the same process in a single core, each
performing its own task, such as rendering a specific part of the screen or
processing player input, thus improving performance by running tasks
simultaneously and reducing wait times. Parallel processing takes this a
step further, as it will take multiple tasks and execute them on various CPU
cores, often using multithreading as the execution mechanism. Unlike
multithreading, which may run threads on a single core (via time-slicing),
parallel processing explicitly leverages multiple cores to perform tasks
concurrently, maximizing hardware utilization.
2.2 Primary Performance Metrics (FPS) and Notable Other Metrics: (TPS, and
lag spikes)
2.3 Role of multithreading in games vs single-threading limitations
3. Minecraft’s Technical Architecture
3.1 Game engine: rendering pipeline, LWJGL and OpenGL
The game engine of Minecraft depends on the Lightweight Java
Game Library (LWJGL), essentially, it is what Minecraft uses for graphics,
sound, and input. It is also a Java library that provides developers able to
access OpenGL, which is an Application Programming Interface (API) that
allows programs like Minecraft to interact with your graphics
card. Additionally, according to the Lenovo website, OpenGL or Open
Graphics Library is a cross-platform, open-source API (Application
Programming Interface) used for rendering 2D and 3D vector graphics. It
allows developers to create complex visualizations, simulations, and video
games by providing a set of functions to interact with graphics hardware.
OpenGL is widely used in the development of applications that require high-
performance graphics across various operating systems and devices. The
Rendering Pipeline refers to the step-by-step process through which a
computer transforms 3D data (like Minecraft blocks and terrain) into a 2D
image (what you see on your screen). Worded better, according to website of
[Link], a rendering pipeline is the process that converts 3D data—
comprising models, textures, lights, and camera parameters—into 2D
images. The purpose of the rendering pipeline is to systematize the rendering
process, ensuring that all aspects of a scene, from geometry to lighting, are
processed in a logical order. This modular approach allows for optimization at
PAGE 3
each stage, ensuring that even complex scenes with millions of polygons and
textures can be rendered.
3.3 World Creation and Vanilla rendering pipeline: Limitations (redundant
CPU-GPU interaction, limited batching)
3.4 Historical single-threaded design and performance challenges across
versions
4. Sodium’s Multithreaded Rendering
4.1 Overview of Sodium as a client-side mod
4.2 How Sodium optimizes rendering (batching, culling, parallel processing)
occlusion culling, vertex buffer optimization
PAGE 4