* fix(gl46): the loading screen stays until the shaders are compiled, no black window at the first start of a new version At the first start of a new build (the driver keeps the compiled shaders of each executable apart, and every build has a name of its own) the window went black and didn't answer for about half a minute after the scenery was loaded. Measured on calkowo_osobowy with a copy of the executable under a new name: 33 of those seconds were the first step of the water on the windscreens, which compiled its nine programs (water_*.comp) in the first frame of the simulation. - After the scenery is loaded the loader keeps its screen, with the bar going and the note on preparing the graphics, until the renderer says the programs are ready (gfx_renderer::Prewarm_Shaders(), about 50 ms a frame): the programs of the materials are drawn with once each into a small target of the formats of the colour pass, as the opaque things and as the translucent ones, then the programs of the windscreen water are compiled one a frame (opengl46_windscreen_water::prepare_next()), which gpu_init() then keeps. The window answers in between. - The Vulkan renderer, which has its pipeline cache, says it's all done at once (the default of the interface). Checked with a copy of the executable under a new name (nothing kept by the driver): the loading screen with the note from the end of the loading (19 s) to the first frame (58 s), the window answering all the time; the first frame no longer stalls (the water 12 ms instead of 33 s). With the shaders kept by the driver the preparing takes no time. No asset changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(gl46): the missing program of the windscreen water found by find_if, which GCC 13 and MSVC 14.4x compile Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(loading): the notice that the graphics are being prepared at the top of the screen The notice stood at the bottom left, beside where the loading icon goes, over the trivia and the texts some of the backgrounds carry at the bottom. It is now centred at the top of the screen on a dark plate, so it reads on any background. The text and its translation are the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(vk14): the loading screen stays until the pipelines of the scene are made, as with OpenGL 4.6 vulkan14_renderer::Prewarm_Shaders() lists the pipelines the loaded scenery draws with most: those of the programs of its materials for the colour pass of the main view, opaque and blended, and those of the shadows. With the background threads (gfx.vulkan.asyncresources) they are handed to them, made ahead and not counted as made late; without them they are made on the main thread for about 50 ms a frame. The loading screen, with its notice and progress bar, waits for them and for the pipelines of the last session the background threads make ahead. Before, a pipeline first asked for by a draw either left the draw out for a few frames or held the frame while it was made. The images of a viewport are made by make_viewport_targets(), taken out of render_scene() unchanged, so the main view's formats are known before the first frame. The key and the settings of a pipeline come from the same helpers bind_scene_pipeline() uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(gl46, vk14): the review of #476: the multi draw variants prewarmed with a model block, the last session's list in the progress OpenGL 4.6: with gfx.gpucull 1 and the multi draws on, Prewarm_Shaders() also draws the multi draw variants of the material programs. Their shaders read the model block from the storage buffer at MODEL_DRAW_SSBO_BINDING, which nothing bound before the first frame, so the draw was undefined. The prewarm now binds a buffer of one model block there. With the default gfx.gpucull 0 there are no such variants and nothing changes. Vulkan: the loading screen waits for the background threads, and so for the list of the last session, up to 4096 pipelines. With a cold cache the bar stood at n/(n+1) all that time and looked stuck. The pipelines of that list are now counted in the progress as they are done with, made or not. The wait still ends when the background threads are idle, as before. make_viewport_targets() returns false without a context, which Sonar reported as a null pointer dereference. Its callers checked the context already. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRgQ1LqB4YXWorLDBBL6hD --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MaSzyna - Railway vehicle simulator
Website · Report an issue · Community Discord · MaSzyna on Steam · MaSzyna on Epic Games Store
MaSzyna executable source code is licensed under the MPL 2.0 and comes with a large pack of free assets under a custom license.
Table of Contents
Getting Started
MaSzyna compiles and runs natively on Linux and Windows. Other platforms are not tested.
Heads-up
Our dev team is small; we keep improving the build process, but issues may still occur. If you get stuck, please ask on the official Discord server.
Prerequisites
For runtime requirements see Minimum Requirements.
1) Software (oldest tested in parentheses)
Note: MinGW is currently not supported.
2) Libraries (oldest tested in parentheses)
-
GLFW 3.x (3.2.1)
If a link error occurs, pass-DGLFW3_LIBRARIES="<path>"to CMake. -
GLM (0.9.9.0)
-
libserialport (0.1.1)
-
libsndfile (1.0.28)
-
LuaJIT (2.0.5)
-
GLEW (2.1.0)
-
libpng (1.6.34)
-
OpenAL (1.18.2)
-
pthread
-
Python 3.14 (64-bit; headers and import library required for embedding)
-
Asio (1.12)
3) Graphics API
- OpenGL 4.6 (core profile), required by the default renderer; see docs/opengl46-renderer.md
CMake flags
| Flag | Meaning |
|---|---|
-DCMAKE_BUILD_TYPE=Debug |
Debug build |
-DCMAKE_BUILD_TYPE=Release |
Release build |
-DCMAKE_BUILD_TYPE=RelWithDebInfo |
Release build with debug symbols |
-DPython3_ROOT_DIR=<path> |
Root of the Python 3.14 install on Windows (python.exe, Lib, DLLs) for embed/copy steps; on Linux, optional if CMake picks the wrong interpreter |
macOS note: macOS provides OpenGL only up to 4.1, so the OpenGL 4.6 renderer does not run there.
Windows
Install Python 3.14 x64 from python.org and include the optional Python native development feature (headers and .lib for embedding). Pass -DPython3_ROOT_DIR="C:\Path\To\Python314" on the cmake line when you want the layout under that directory used for embedding and for copying Lib / DLLs next to the executable. The cab screens are drawn with Pillow: install it into that Python (python -m pip install Pillow) before building, so it is copied along with Lib.
AppVeyor CI builds with the worker image’s preinstalled Python at C:/Python314-x64 (see appveyor.yml: -DPython3_ROOT_DIR=...).
# Clone repository with submodules
git clone --recursive https://github.com/MaSzyna-EU07/maszyna.git
cd maszyna
# Init vcpkg
call setup.bat
# Create directory for CMake build files
mkdir build
cd build
# Generate CMake project (replace %CONFIG% with Debug/Release/RelWithDebInfo)
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=%CONFIG%
# Build (replace %CONFIG% accordingly)
cmake --build . --config %CONFIG% --parallel
Linux
# Install dependencies (Fedora/RHEL family)
sudo dnf install -y \
@development-tools \
cmake \
mesa-libGL-devel \
glew-devel \
glfw-devel \
python3.14-devel \
libpng-devel \
openal-soft-devel \
luajit-devel \
libserialport-devel \
libsndfile-devel \
gcc \
g++ \
wayland-devel \
wayland-protocols-devel \
libxkbcommon-devel
# Clone repository with submodules
git clone --recursive https://github.com/MaSzyna-EU07/maszyna.git
cd maszyna
# Create directory for CMake build files
mkdir build
cd build
# Generate Makefiles
cmake ..
# Compile using all cores
make -j"$(nproc)"
Tip (Ubuntu/Debian): Package names differ; install equivalent
build-essential,libgl1-mesa-dev,libglew-dev,libglfw3-dev,python3.14-dev,libpng-dev,libopenal-dev,libluajit-5.1-dev,libserialport-dev,libsndfile1-dev, and Wayland/X11 dev packages as needed.
Installing
There is no make install yet. Copy the built executable to your MaSzyna installation manually.
-
Output directory:
./bin -
File name format:
eu07_YYYY-MM-DD_<commit>[_d]-
YYYY-MM-DD– build date -
<commit>– short commit hash -
_d– present in Debug builds
-
If you already have the MaSzyna assets, copy the executable to the install dir. Assets can be downloaded from eu07.pl.
Rainsted on Linux
If Rainsted (a third‑party starter) fails to detect the executable under Linux, you can create a small wrapper script named eu07.exe:
#!/bin/sh
./eu07 "$1" "$2" "$3" "$4" "$5"
If detection still fails, padding the file (with comments) up to ~1 MB may help.
Known Issues
-
GLFW linking – On some systems you must provide the GLFW library path explicitly with
-DGLFW3_LIBRARIES. -
X11/Wayland linking order – Linking order of X11 and related libs can matter.
Support
-
Official Discord Server: https://discord.gg/qAh9ctWPQv
-
Project page: https://eu07.pl/
Minimum requirements
- OS: Windows 10 64-bit
- Processor: 2 core at least 2 GHz (e.g. Intel Core i3-2100 / AMD Athlon II X2)
- RAM: 6 GB RAM
- Graphics Card: supporting OpenGL 4.6 with at least 1GB VRAM
- 150 GB of free disk space
- Sound card supporting OpenAL with stereo
- Optional COM ports for custom control panel setups.
License
-
Source code: MPL 2.0
-
Assets: Custom license
