Initiate Mage
- Joined
- Oct 2, 2026
- Messages
- 2
- Reaction score
- 3
To view the content, you need to sign in or register
Tested only on M1 Max MBP with 64GB RAM running macOS 27.2 Beta (the build is targeting macOS 14 and newer but I didn't test any of those targets + running a macOS 14 VM doesn't give you access to your hardware GPU - the game launched but there were many texture issues).
I guided Codex and Claude into making the port look as close as possible to the Windows release by comparing game-data decoding, 3D maths and textures byte to byte. This project took 2 to 3 weeks using Claude Pro and ChatGPT Plus (creating handoffs between those agents to resume work when usage limits were reached).
There's also binaries for the game server that run on Linux (tested on Hetzner VPS). Source code and binaries are available in the repo.
I played quite a few long sessions but those were mainly:
- doing stress tests locally and over network (connected to the Linux VPS)
- fixing game and compilation bugs
- implementing features that made the game feel more native to macOS
There's server and client binaries in the releases sections if building this from the source feels alien.
Doing this brought a lot of nostalgia for me.
13 years ago I used to play this game constantly and even hosted a private server with a Bulgarian dude for a few months called 4story 4vendeta.
This game got me into coding/programming back then. One of the first coding experiences I had was a brazillian guy who also played the game connecting to my PC over TeamViewer and coding while I watched, showing me how to connect a database to a backend and showing data on a website. I can literally still picture those moments.
People were doing all sort of things from modifying databases, websites built on PHP, creating C#/Visual Basic GUI apps and posting them to elitepvpers, we were trying to understand how all of this worked and nowadays it has got even more easy to do all of this by using coding agents.
If anyone manages to spin up a server with this please post in here, I will very likely pass by to play a bit.
I have a feeling some people in here might be old players as well so if this post brings back some memories to you feel free to comment.
I also post here some of the videos I was doing back then (related to the game and hosting a private server), I watched them 2 weeks ago and just did it again now and it brought me some good memories.
Happy hacking!
To view the content, you need to sign in or register
copied from this repo's README (this changelog with what's added is AI generated)
What the macOS port adds
The original 4Story 5.0 C++ source is a Windows-only game (Direct3D 9, MFC, Win32, IOCP, SQL Server). This port runs the original client and server code natively on Apple silicon.Server
- Native game servers. The original Control, Login, World and Map servers build and run as macOS ARM64 programs, over a Win32/ATL/ODBC compatibility layer. They load their full game state, register with each other and shut down cleanly.
- Your own server in a few commands. server install / start / stop / status / create-account sets up SQL Server in Colima/Docker from the clean database seeds. The database password goes in the macOS Keychain.
- Live startup and status screens. Startup shows each service's readiness and elapsed time. Status is a clickable terminal dashboard (green, amber, red) that refreshes in place. Stop shows the shutdown order.
- Faster Map startup. Cached quest reads cut Map startup from 63 s to 36 s.
- Reliability fixes. Sessions no longer get stuck after a mass logout. The socket layer is a native kqueue/epoll reactor instead of Windows IOCP.
- Role control and a supervisor. Control can stop and start single services. A process supervisor restarts crashed services with back-off.
- Linux x86_64 server. A first Linux run on a VPS was recorded. This repository contains what's required to build the Linux server binaries. Compiled binaries are included in the latest Release.
- Safety fixes in the original source. The Map server now rejects inventory slots beyond the bag size. A commented-out SMTP credential was removed from the Login source.
Client
- Native game client. The original TClient (about 330 source files) builds for macOS. It uses SDL3 for windowing, DXVK (Direct3D 9 to Vulkan) and MoltenVK (Metal) for graphics, and Apple frameworks for audio and fonts. The game's data files load unchanged. It reaches the login screen, logs in, creates and deletes characters, enters the world, and covers movement, combat, loot, chat, inventory, quests and relogging.
- Checked against Windows. Rendering, texture sharpness, packets, character create/delete and saved database state were compared with the Windows client. They matched in the tested scenes and scripts.
- 64-bit fixes. Pointer, ID and font-width bugs from the old 32-bit code were fixed so the client works as a 64-bit program.
- Native audio. Effects, music and the two audio-only DirectShow assets play through AVFoundation. An optional Spatial audio (headphones) setting in the game's options uses Apple's HRTF rendering.
- Graphics options. Anisotropic filtering, an adjustable terrain/decal depth offset, and a graphics diagnostics log.
- Interface scaling and live font selection. Both are in the game settings.
- Fullscreen and display controls. Fullscreen toggle, a reversible display preview, and an option to start fullscreen.
- Window behaviour. The game shades when unfocused and fades back in on return. Stale input is discarded and background camera polling is blocked.
- F1–F12 without Fn. An in-game keyboard button turns on standard function keys (needs Accessibility permission). It restores your original keyboard mode on exit, even after a crash.
- Quest tracker can be hidden and moved.
- Fixes to the original client. Each bag window is built from the bag's own template, the exit dialog spacing is even, and the tournament panel no longer flashes on world entry. Crashes in NPC greeting sounds, click handling and the MoltenVK command-list release were also fixed.
- Build label. A small pink label shows channel, version, executable ID and link time, so a stale build is easy to spot. The client refuses to run a stale build.
- Crash reports. A native crash reporter writes readable reports.
- PS5 controller support, toward an iPad port (in progress). Exploring whether the game can run on iPads, where a controller is the main input. DualSense detection and logging is merged. Movement, camera, targeting and zoom are built and in testing; skills, the touchpad and the iPad build itself are not started.
Packaging and sharing
- App and disk image. Release build mode produces a signed 4Story (Beta) app and DMG with a checker, a player README, a custom icon and a new intro logo. The "Araz" title in the game data was renamed.
- Server release bundle. Tools build a server package and a clean database.
- One launcher. 4story.command is a menu and CLI for doctor, build, client, server, logs and profiling.
Developer tools
- Terminal asset renderer. assets list / show previews any item, monster or NPC model from the game files.
- Profiling. Attach-only workflows for the Mac client and the servers, with symbol preparation.
- Test-character tools. Place characters, grant items and swap an item's template.
- Load testing with dummy clients.
- Saved-state comparison. Captures a character's database rows before and after a session and compares them.
- Compatibility checks. A Windows-view check proves the original source is unchanged, apart from listed comment-only edits and build-project fixes.
- Issue workflow. One folder, one branch and one worktree per bug (4story.command issue), with archiving once merged.
- Research notes and tooling. A Graphify code map, a reverse-engineering skill for this project, and written reports for each milestone.
Last edited:

