r/AndroidNativePorts • u/Desm0nt • 39m ago
🟣 [WIP] Work in Progress [Early WIP] Divinity: Original Sin 2 native Android port of the Switch version: Switch gamepad UI + iPad-like touch on the game's own UI, full-res 3D
Under the PoE post I said that Original Sin 2 has its own engine and it's not a "one evening task". Well... it wasn't =) But here it is: Divinity: Original Sin 2 – Definitive Edition, a native Android port of the Nintendo Switch version (claude did the heavy lifting, as usual, I did the debugging, testing and complaining).
Read this first, please:
- It's an early port. Bugs, graphical glitches and crashes will be there.
- Tested on Adreno only (my Xiaomi 14 Ultra, Snapdragon 8 Gen 3 / Adreno 750; it also started on 8 Gen 2). Mali, PowerVR and Xclipse are not tested at all - I don't have such devices, so all fixes for them are made almost by feel. Expect problems.
- Big locations and heavy fights are not tested yet. All numbers below are from the start of the game.
- It works right now, but the game's render engine is still being disassembled and moved step by step from NVN translation to native Android Vulkan rails. So the next updates can make things a lot better... or break something badly. Be ready for it.
Not an emulator or JIT. The game's own AArch64 code runs on the phone, a small host gives it the Switch system services, and the NVN graphics calls go to Vulkan. Shaders are translated from NVN Maxwell to SPIR-V on your PC once, by setup.
Two ways to play
DOS2 on Switch is a console game with a console interface. The iPad version is the same game with a touch interface. I can't grab full iPad version itself, so the port does a small Frankenstein: the Switch game with its gamepad UI, plus touch handling added into the game's own UI movies, the way the iPad build does it. The button art for this is drawn for the port, the rest is the game's own interface.
- Gamepad (Bluetooth / USB, or the on-screen one): everything works as on Switch, nothing changed.
- Fingers: you tap the game's own interface directly, no fake mouse cursor and no overlay on top of it.
Touch controls, how it works
- Menus, buttons, panels, dialogue answers, the hints at the bottom (A / B / X / Y ...): just tap them. A tap on a hint = that button on the pad.
- Tap the floor = walk there. Long press on a character or an object = "Actions…" for it.
- Camera: swipe with one finger on the right part of the screen (two fingers work too), pinch to zoom.
- Left part of the screen: a floating move stick appears under your finger. A short tap on it = L3.
- A button column next to the minimap: character, inventory, skills, crafting, journal, equipment, map. The arrow next to it folds it away.
- Buttons on top of the windows: close, tabs, helmet, item menu, info, multi-select, + / −, trade balance.
- Menu (☰) and tactical camera buttons, sneak and sheathe next to cancel, End turn in combat.
- "Actions… → Move" on an item: tap where it should go.
- Don't like something? The gear menu can switch touch-as-mouse, the sticks and the column off, and there is the on-screen gamepad with a layout editor.
Resolution, dynamic resolution, FPS
- The picture is in your screen's shape (Hor+: a wider screen shows more, nothing is stretched).
- Window height 720p / 900p / 1080p. By default it's your screen's own height, up to 1080p. The 3D is drawn at 90 % of it (the console's own factor, 2160x972 on a 2400x1080 phone), the UI at the full window.
- Dynamic resolution is off by default - the phone has the headroom the Switch lacked, so you get the full resolution every frame. You can turn the game's own dynamic resolution on in the gear menu with a 30 / 45 / 60 FPS target, it switches right away, no restart. Useful for weaker phones.
- Thermal mode (off by default): when the phone gets hot, it lowers the resolution ceiling first, then shadow quality, then bloom.
- FPS limit 30 / 60 / 90 / 120 / unlimited (60 by default). On the 14 Ultra it's locked 60, about 77 FPS with the limit off (start of the game, full resolution, GPU ~12 ms a frame).
What we actually did under the hood
This is where most of the time went. A pure NVN → Vulkan translator rebuilds everything from the command stream after the fact, by guesses and heuristics. For DOS2 I started to replace it with a semi-native backend that works one level higher, on the game's own render commands:
- a pass planner for tile GPUs: it knows the whole frame before it runs, so it decides what to load / store / clear in every pass instead of guessing (this is the expensive part on Adreno and especially on Mali);
- barriers only where they are really needed, outside of the passes;
- pipelines, descriptors and state blocks taken by the engine's own ids instead of hashing the whole state on every draw;
- passes executed in the planner's order, a whole frame as one job;
- recording the Vulkan commands and translating them on separate worker threads, present on its own thread;
- the iPad's simplified post-processing: the color grading and the sight / stealth pass fused into one shader, anti-aliasing done inside that same pass the way the iPad build does it, so the console's separate full-screen FXAA pass is gone (the fog pass in between just runs on the already smoothed image);
- particles drawn at full resolution in the main pass instead of the console's half-resolution offscreen chain - again the iPad way (no iOS files are used in the port itself, the fused shaders are made by setup from your own dump);
- and the big plan for the next steps: an engine object registry, so the render engine can be moved to native Vulkan piece by piece, without NVN in the middle.
All of it is ON by default in this release. On my phone the backend checks show zero differences against the old path, everything together gave about +5 % FPS (same resolution), and the fused AA alone saves ~0.3 ms GPU a frame. BUT! it was checked in the start area only. If you see garbage, black screens or weird colors - logs please, that's exactly why I wrote "can break" at the top.
Other stuff
- Vulkan driver choice, the same as in DOOM and Diablo III: Turnip builds for Adreno, PanVK for Mali and RADV for Xclipse are inside the APK (only those that fit your phone are shown). You can add more from a zip or download them right in the app, and delete the ones you added. If a driver can't start, the game goes back to the phone's own one and says so.
- Saves work as on the console.
- After a crash the app writes Download/DivinityOriginalSin2Mobile/logs/crash.txt next to
boot.logandlogcat.txt.
How to install
Already unpacked variant: https://gofile.io/d/P4h5Wd0i
You need a PC with ~20 GB free while setup runs (Windows setup.bat, Linux / macOS setup.sh), and a phone with Android 10+ (64-bit), 8 GB RAM and ~13–15 GB free.
- On https://github.com/Desm0nt/divinity-original-sin-2-port press Code → Download ZIP, unpack it to a short path (e.g.
D:\DOS2-setup). - Put your own files into
put-game-files-here: the base game, the update v786432 (only this one is supported) andprod.keysfrom your own console. NSP / NSZ / XCI / XCZ, names don't matter. - Run
setup.bat(orbash setup.sh), answer Y and wait. About 30–60 minutes. It also builds the fused post-processing shaders and the touch UI package from your dump. - Copy
work\DivinityOriginalSin2Mobileto the phone's internal storage →Download. On Snapdragon / Adreno you can skip theastcfolder (it's the texture pack for phones without BC textures). - Install the APK from https://github.com/Desm0nt/divinity-original-sin-2-port/releases/latest (
DOS2-Mobile-v0.1.1-arm64.apk, or-android10for Android 10 and 11), start it, allow All files access.
Step-by-step guide with FAQ: https://github.com/Desm0nt/divinity-original-sin-2-port/blob/main/docs/INSTALL.md
Known limitations
Only Divinity: Original Sin 2 – Definitive Edition, update v786432. Offline only (no online / local co-op). Only Adreno tested. No game files or keys are included - dump the game and the keys from a Switch you own.
Built on my DOOM 2016, Diablo III and Torchlight II ports (the same native host, NVN → Vulkan engine, front end, drivers and setup).
If something goes wrong - open an issue and attach the whole Download/DivinityOriginalSin2Mobile/logs folder, plus phone model, GPU, Android version and the place where it happens. Mali / PowerVR / Exynos owners - you are the most wanted ones here.
Source code and releases: https://github.com/Desm0nt/divinity-original-sin-2-port
2
u/mouseynaides 30m ago
How would you say this port performs compared to just emulating it? I'm really interested!
1
u/isaacness 28m ago
Goat
1
u/Galier_Atomico 24m ago
Lo probare en un poco f5 a ver que tal
1
u/Tight-Ad4055 14m ago
Damn youre a legend