An attempt to migrate CrystalM2 from GDI+ to the FNA framework and run it on Linux#1176
Draft
AuroraRAS wants to merge 26 commits into
Draft
An attempt to migrate CrystalM2 from GDI+ to the FNA framework and run it on Linux#1176AuroraRAS wants to merge 26 commits into
AuroraRAS wants to merge 26 commits into
Conversation
…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.
|
Interesting, but it needs careful testing. |
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.
Author
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%.
…ext inside the UpdateText() ethod.
I have successfully fixed the file deletion issue during the automatic update process of the Linux FNA client.
I have successfully updated the client and server regex patterns and network action handler to support optional @ prefixes in NPC dialogue links (e.g., <Candle/candle>).
Resolve the issue where clicking options that open sub-panels (e.g. <Crafting/@craft>) in the NPC dialogue box closes the dialog box immediately instead of displaying the pane.
We implemented the changes from the approved plan to resolve the newbie guild initialization, NPC parameter mapping, and lag issues. Changes Made 1. Newbie Guild Initialization Added an ownerless constructor in Server/MirDatabase/GuildInfo.cs to support creating system-owned guilds. Added logic in Server/MirEnvir/Envir.cs inside LoadGuilds() to check for the existence of Settings.NewbieGuild. If it does not exist, a new instance is created and registered with a unique guild index. 2. Newbie Guild Parameter Mapping in NPC Scripts Modified Server/MirObjects/NPC/NPCSegment.cs: CheckType.InGuild: If the script specifies "NewbieGuild", we map it to Settings.NewbieGuild (the custom configured name, like "NewB"). We also perform case-insensitive checks. ActionType.AddToGuild: If the script instructs "AddToGuild NewbieGuild", we map it to the actual configured guild Settings.NewbieGuild. ActionType.RemoveFromGuild: Updated string comparison with Settings.NewbieGuild to be case-insensitive. 3. Buff Lag Fix Modified ProcessBuffs() in Server/MirObjects/HumanObject.cs to add tracking for the active BuffType.Newbie using a local flag newbie. BuffType.Newbie is now properly updated in the loop and flagged for removal if conditions are no longer met. The AddBuff(BuffType.Newbie, ...) call is now guarded by !newbie so it is not invoked on every single server tick, preventing flooding the client with buff packets and avoiding lag (5 FPS).
We have implemented a system-level check during the compilation of the FNA client (net10.0 on Linux) to check for the presence of libFNA3D. If not found on the system, it will automatically build it from source and copy the binaries to the build and publish output directories.
…ctory We updated the FNA (Linux) version of the client to handle resource, configuration, screenshot, and log files using the current working directory (Directory.GetCurrentDirectory()), rather than using the program's binary execution directory (AppContext.BaseDirectory / AppDomain.CurrentDomain.BaseDirectory).
I have implemented and validated case-insensitive file system resolution for the headless server. Under Linux, filesystem paths are case-sensitive. The database directory contains files (e.g. maps and drop files) with uppercase characters in their names, while the game server loaded them using lowercase filenames. This caused all maps with mixed-casing to fail to load.
We have consolidated the isolated Linux file system compatibility layers (VFS, path normalization/backslash replacement, and regex-based case-insensitive pattern matching for filenames) into the Shared project. Both the client and server projects now delegate their file resolution calls to the new unified Shared.Vfs.VfsManager.
We have resolved the unnatural text alignment for the HP and MP values in the MainDialog health/mana orb under the FNA version of the client for both HPMP display modes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.mdfile 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.
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.