Jan 2, 2021 at 3:51 PM
Join Date: Sep 13, 2020
Location:
Posts: 10
Pronouns: she/her
doukutsu-rs is a thing I spent last 3 months of my free time on, since I was quite active around CSMC and decided to learn Rust...
The current goal of the project is to build a Cave Story engine that lets you build portable mods (via Lua API, instead of hacking the executable or engine sources) and enhance it with some additional features over vanilla.
GitHub repo: https://github.com/doukutsu-rs/doukutsu-rs
Discord community: https://discord.gg/fbRsNNB
YT playlist: https://www.youtube.com/playlist?list=PL7dbebMU2ftq3xDd8P-DxmfN_kpu8_cSg
Builds: (check the Discord server)
Features implemented at time of writing:
It's not even meant to be one. But since the project is meant to be a possible replacement for binary patched Doukutsu.exe/CSE2 - I want to be accurate in game logic, so some reverse engineering was involved.
The current goal of the project is to build a Cave Story engine that lets you build portable mods (via Lua API, instead of hacking the executable or engine sources) and enhance it with some additional features over vanilla.
GitHub repo: https://github.com/doukutsu-rs/doukutsu-rs
Discord community: https://discord.gg/fbRsNNB
YT playlist: https://www.youtube.com/playlist?list=PL7dbebMU2ftq3xDd8P-DxmfN_kpu8_cSg
Builds: (check the Discord server)
Features implemented at time of writing:
- Vanilla is playable up to Sand Zone.
- Mostly complete implementation of TSC.
- Full touchscreen support on Android.
- Has an early version of the Lua API.
- Multiplayer ready - while no networked multiplayer is implemented yet, the engine is designed to be deterministic across computers regardless of delays and the NPCs, bullets and other objects are aware of multiple players.
- A simplistic lighting engine (for now it works more or less like the one in Switch release, but it's more visually appealing and is a subject to future improvements) and shader effects.
- Frame rate independency/motion interpolation - the engine's rendering is decoupled from the game loop - if a frame is being rendered between two game ticks the positions of objects on screen are linearly interpolated, resulting in very smooth motion at original speed, regardless of display's refresh rate (just watch one of videos in playlist linked above, the game runs at 60fps framerate and 50tps speed).
- Some support for Cave Story+ data files, although it's not really my focus.
It's not even meant to be one. But since the project is meant to be a possible replacement for binary patched Doukutsu.exe/CSE2 - I want to be accurate in game logic, so some reverse engineering was involved.
- The rendering, trivial to do or badly implemented parts have a completely custom implementation, written using no or little (eg. to figure out the sprite positions or what properties do they set) original code as reference.
- The more complex parts that are quite hard to reverse engineer accurately in a "black box way" (physics, NPC/boss AI) were based on code reverse engineered from original executable (linux/windows freeware or CSE2 if the code ended up being too buggy or I was too tired to analyze that shit - thank you for anyone involved in it). Since it was a manual job there's still many bugs resulting from typos, wrong understanding of decompiler output and other things.
- (Partial) support for Switch CS+ data files involved no code reverse engineering due to huge legal uncertainities and after all was still easy enough to implement using "black-box reverse engineering" way - just by looking at data files and playing the game itself. However, I still don't know if the implementation is correct and I don't really care - it's not the goal of the project and extracting the data requires a hacked console and some effort.