Skip to content

An attempt to migrate CrystalM2 from GDI+ to the FNA framework and run it on Linux#1176

Draft
AuroraRAS wants to merge 13 commits into
Suprcode:masterfrom
AuroraRAS:4L
Draft

An attempt to migrate CrystalM2 from GDI+ to the FNA framework and run it on Linux#1176
AuroraRAS wants to merge 13 commits into
Suprcode:masterfrom
AuroraRAS:4L

Conversation

@AuroraRAS
Copy link
Copy Markdown

This project successfully completed full testing of compiling and running CrystalM2 locally on Linux. It includes a client using the FNA framework and a headless server, both of which do not rely on GDI+, Direct3D 9, or the Wine adapter layer, running directly on a Fedora 44 Linux distribution.

The Cross-platformPortingExperience.md file contains details of the various difficulties encountered during the project migration and their solutions.

The image below shows the state of this project running in a real Linux environment.

Screenshot From 2026-05-21 10-56-52 Screenshot From 2026-05-21 10-51-27

Note:
The project contains a significant amount of code generated by Vibe Coding; please assess the risks yourself before using it in a production environment.

AuroraRAS added 6 commits May 21, 2026 11:17
…configurations alongside engine-side feature additions
We have identified and fixed the runtime error that occurred when hiding the game interface (camera mode).
…ro base stats configurations

We resolved the issue where mouse-hover tooltips (such as for active buff icons) and the debug overlay did not render on the Linux FNA client. Additionally, we conducted a heuristic search and resolved three other platform-gap issues on FNA/Linux.
In the FNA (Linux) version of the client, pressing Ctrl, Alt, or Shift to bind a key combination (e.g., Ctrl + A) immediately binds the hotkey as Ctrl + LControlKey, Alt + LMenu, or Shift + LShiftKey without waiting for the rest of the key combination.
1. Rebirth3 Red Square Rendering Correction
2. Missing Minimap/Poison Indicator Dots & Blending Rate Fixes
We implemented global opacity and grayscale rendering support in the FNA graphics renderer to resolve visual parity regressions under the FNA port.
@liaojiaao
Copy link
Copy Markdown

liaojiaao commented May 21, 2026

Interesting, but it needs careful testing.

AuroraRAS added 4 commits May 22, 2026 00:04
The inventory item and message lines render depth issue has been resolved for the FNA client target.
I have fixed the issue where the headless server console input shifts to the right when handling double-width characters (like Chinese characters in player names).
We investigated and resolved two rendering/focus issues in the text input area of the ChatDialog under the FNA client.
@AuroraRAS
Copy link
Copy Markdown
Author

AuroraRAS commented May 22, 2026

The previous day, I focused on fixing various minor issues with the project. These mostly manifested as rendering problems in the FNA client version and minor glitches in the command-line interaction of the headless server.

The current game appearance is as follows:
Screenshot From 2026-05-22 11-04-20

If you encounter any problems compiling this version of Crystal, please let me know, and I will do my best to help.

Clone the codes and checkout 4L version:

git clone https://github.com/AuroraRAS/Crystal.git
cd Crystal
git checkout 4L

FNA is a third-party framework; please obtain it from its official repository using the following command:

cd Crystal/Client/
git clone --recursive https://github.com/FNA-XNA/FNA

Commands for compiling the client and server:

cd Crystal
dotnet build Client/Client.csproj -f net10.0 -c Release
dotnet build Server.Headless/Server.Headless.csproj -f net10.0 -c Release

AuroraRAS added 3 commits May 22, 2026 18:32
We have completed the implementation to allow independent window scaling (forcing 100%, 200%, or other custom scales) under Linux/Wayland, decoupling it from the GNOME system scale of 150%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants