* test(scenarios): the L053 poranek cases now fail on the station's SM42
#409 fixed what both l053_poranek_tme222158_debica cases were marked
xfail for: the EP07 on Tm4 stops at the checkpoint, and the ET21 no
longer stands off the wire at Debica Towarowa. Run on staging f15ea405,
neither passes yet: TME222158 gets to Debica and reports there, but the
station's SM42-1096, ordered to uncouple at step 10 of deb_sm42_stat,
pushes its cut past debica_k_sem_info at danger and never gets the
coupler off, so the station never gives TME222158 step 1 and both runs
end as a standstill (4347 s and 4576 s of simulation time). The xfail
marks stay, with that reason.
* fix(ai): keep the locomotive released while it pushes the buffers in to uncouple
Stage 3 of uncoupling (TController::UpdateDisconnect) ends only when the locomotive has pushed the buffers
together: a screw coupler is let go with the buffers under 0.01 m apart (or over 0.2 m). Nothing else ends
the stage. The consist brakes applied in stage 2 hold the locomotive as well, and only its brake releaser
lets it go. The AI worked the releaser in that stage only while it wanted to speed up (AccDesired above
-0.05), together with the start-off rules of control_releaser.
When the cut stands across a signal at stop for the direction the locomotive pushes in, the driver counts
the signal as passed at its first move after the direction change, VelSignalLast becomes 0 and AccDesired
stays at -0.05 or -0.85. The releaser then went off, the brake cylinder filled again from the brake pipe,
the pressure switch cut the power, and the locomotive stood for good with the buffers 0.018 m apart. The
station's SM42-1096 at Debica on L053 poranek did that at step 10 of deb_sm42_stat and logged "actuating
and compressing buffers..." for the rest of the run (a temporary log line showed the brake cylinder going
from 1.25 to 3.69 bar with the releaser off, and the gap staying at 0.0184 m).
In stage 3 the releaser now stays on while the locomotive's brake cylinder holds more than 0.1 bar,
whatever AccDesired is. The push asks for 2 km/h at most and the cut stays braked, so this changes nothing
else. Everything else, including the rest of the uncoupling (the direction changes before and after it)
and coupling, keeps the old rule. The overcharge guard (pipe above 5.2 bar) still turns the releaser off.
The decision moves into vehicle/brakereleaser.{h,cpp} so it is unit tested; control_releaser does the same
cues in the same order as before.
On L053 poranek the SM42 now uncouples at step 10 in 0.2 s (gap 0.021 -> 0.0096 m) and the mission goes on.
* test(scenarios): a shunter uncouples with its wagons standing across a signal at stop
sm42_td_uncouple_past_signal (fragment td_uncouple_past_signal.scn) rebuilds the uncoupling of the SM42 at
Debica on L053 poranek on td.scn. An SM42 pulls three loaded wagons back along tor1k, stops in front of a
closed track with the far end of the last wagon 2 m past the exit signal stacja1_j at stop, and gets
Shunt 0 0 at once. The pull leaves the screw coupler 0.019 m apart at the buffers. Before the fix of the
releaser the locomotive stayed braked and the case ran into its timeout with no "uncoupled" in the log;
now it uncouples within a second.
* test(scenarios): the L053 poranek cases pass again
With the station's SM42-1096 uncoupling at step 10 of deb_sm42_stat again (the releaser fix before this
commit), both l053_poranek_tme222158_debica cases pass: TME222158 gets its exit signal at Debica after
4086.2 s of simulation, and with the ET21 after 4131.6 s. The xfail marks go, so that the runner doesn't
fail on XPASS, and the README rows say so.
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 3.0 or newer
- DirectX 12 via NVRHI (optional, Windows only, for Better Renderer)
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 |
-DWITH_BETTER_RENDERER=ON/OFF |
Enable/disable NVRHI-based renderer |
-DUSE_SYSTEM_JSON=ON/OFF |
Use an installed nlohmann_json 3.9 or newer (e.g. nlohmann-json3-dev, vcpkg nlohmann-json) instead of the ref/json submodule (default OFF) |
-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 |
Linux note:
WITH_BETTER_RENDERERuses DirectX 12 through NVRHI and is not supported on Linux.
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 (NVRHI is not supported on Linux)
cmake .. -DWITH_BETTER_RENDERER=OFF
# 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.
-
NVRHI on Linux – The NVRHI/"Better Renderer" path targets DirectX 12 and is currently unsupported on Linux.
Support
-
Official Discord Server: https://discord.gg/qAh9ctWPQv
-
Project page: https://eu07.pl/
Minimum requirements
- OS: Windows 10 64-bit
- Processor: 4 cores with AVX2 support (e.g. Intel Core i5-4430 / AMD Ryzen 3 1200)
- RAM: 6 GB RAM
- Graphics Card: supporting OpenGL 3.3 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
