#cryointeractive — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #cryointeractive, aggregated by home.social.
-
It's Screenshot Friday again!
This week, I have been mostly working on language switching, the menu flip transition, palace map, and on the dialogue system. This includes screen element stack push/pop, gating room-exit on npc auto dialogue, and npc dialogue picking via dynamic condition evaluation.
Next step might be to see if we can leave the palace and walk into the desert?
-
It's Screenshot Friday again!
This week, I have been mostly working on language switching, the menu flip transition, palace map, and on the dialogue system. This includes screen element stack push/pop, gating room-exit on npc auto dialogue, and npc dialogue picking via dynamic condition evaluation.
Next step might be to see if we can leave the palace and walk into the desert?
-
A Friday progress video for Dune.
We've got music playback, palace walkin', people standing in rooms, sky palettes, voice and music mixer+settings, talking heads, idle animations, and mirror transition. The eyes are not supposed to turn blue at the end, that's just a little happy accident :)
-
A Friday progress video for Dune.
We've got music playback, palace walkin', people standing in rooms, sky palettes, voice and music mixer+settings, talking heads, idle animations, and mirror transition. The eyes are not supposed to turn blue at the end, that's just a little happy accident :)
-
Some work on the mixer panel. Nothing's hooked up yet but it looks good!
-
Some work on the mixer panel. Nothing's hooked up yet but it looks good!
-
Current state of the reawakening of Dune: Walking around the palace and a single command menu item works (look in mirror). Multiple transitions are in place, and the sky changes with the time of day (time is sped up by a factor of 12 for testing purposes). Persons-in-room are positioned correctly. No hacks, everything implemented properly, but lots of todo's :)
-
Current state of the reawakening of Dune: Walking around the palace and a single command menu item works (look in mirror). Multiple transitions are in place, and the sky changes with the time of day (time is sped up by a factor of 12 for testing purposes). Persons-in-room are positioned correctly. No hacks, everything implemented properly, but lots of todo's :)
-
Aaand it's done.
There might be some minor timing still to validate and nail down, but the intro from Cryo's Dune is fully reverse engineered.
-
Aaand it's done.
There might be some minor timing still to validate and nail down, but the intro from Cryo's Dune is fully reverse engineered.
-
Dune intro, desert flyover to palace
-
Dune intro, desert flyover to palace
-
Dune intro with music and Irulan section with pcm audio.
-
Dune intro with music and Irulan section with pcm audio.
-
My 8086 disassembler is now far enough along to be usable for reverse engineering, by me at least.
It uses a text based project file for annotations, data and code labels, data types, etc.
I have yet to move all the labels over from the IDA project I've been using until now but here's the project file I've set up for Dune: https://thomas.fach-pedersen.net/dune/cryo-dune-3.7-cd-dncdprg.chani
Based on the project file, it produces this disassemby listing: https://thomas.fach-pedersen.net/dune/cryo-dune-3.7-cd-dncdprg.html
-
My 8086 disassembler is now far enough along to be usable for reverse engineering, by me at least.
It uses a text based project file for annotations, data and code labels, data types, etc.
I have yet to move all the labels over from the IDA project I've been using until now but here's the project file I've set up for Dune: https://thomas.fach-pedersen.net/dune/cryo-dune-3.7-cd-dncdprg.chani
Based on the project file, it produces this disassemby listing: https://thomas.fach-pedersen.net/dune/cryo-dune-3.7-cd-dncdprg.html
-
I pushed the code online. Hopefully it’s more readable than Cryo’s assembly code :-)
The repo also implements Dune’s HSQ decompression, palettes and sprite sheets, sprite blitting, fonts, video rendering, room rendering, most of the lip sync code, the night attack particle system, and of course globe and map rendering, with wasm toys for many of them.
I think I’m going to need a different game to work on soon…
https://github.com/madmoose/dune-rust/blob/main/crates/dune/src/map_renderer.rs
-
I pushed the code online. Hopefully it’s more readable than Cryo’s assembly code :-)
The repo also implements Dune’s HSQ decompression, palettes and sprite sheets, sprite blitting, fonts, video rendering, room rendering, most of the lip sync code, the night attack particle system, and of course globe and map rendering, with wasm toys for many of them.
I think I’m going to need a different game to work on soon…
https://github.com/madmoose/dune-rust/blob/main/crates/dune/src/map_renderer.rs
-
The Dune map renderer is complete!
You can navigate around the map here: https://thomas.fach-pedersen.net/dune/map/
Click the arrow icons or use the arrow keys on your keyboard.
If you want the globe view, you'll have to navigate to https://thomas.fach-pedersen.net/dune/globe/, I haven't put them into one app yet :)
-
The Dune map renderer is complete!
You can navigate around the map here: https://thomas.fach-pedersen.net/dune/map/
Click the arrow icons or use the arrow keys on your keyboard.
If you want the globe view, you'll have to navigate to https://thomas.fach-pedersen.net/dune/globe/, I haven't put them into one app yet :)
-
And if you've ever wanted to see the writes that the original Dune engine does to its internal buffer when drawing a map view, well, do I have a 79003 frame video for you!
-
And if you've ever wanted to see the writes that the original Dune engine does to its internal buffer when drawing a map view, well, do I have a 79003 frame video for you!
-
Here's a video of the internal scaling process, you might want to open this on a big screen.
-
Here's a video of the internal scaling process, you might want to open this on a big screen.
-
Before finishing it, I decided I needed to extract the end result from the original engine.
I hacked my emulator to loop over the part of the engine that generates a 4 pixel high band of map output 186 times and write the result to an image.
Here’s all 186 bands that the engine would show at longitude 0 stacked on top of each other.
If you look closely you might event spot a couple of bugs in the original engine ;-)
-
Before finishing it, I decided I needed to extract the end result from the original engine.
I hacked my emulator to loop over the part of the engine that generates a 4 pixel high band of map output 186 times and write the result to an image.
Here’s all 186 bands that the engine would show at longitude 0 stacked on top of each other.
If you look closely you might event spot a couple of bugs in the original engine ;-)
-
I’m almost done implementing the last major graphics algorithm in Cryo's Dune, the zoomed in map view.
The map generated as a 4 by 4 scaling of the map resource. Basically, two sequential bands of latitude are scaled horizontally in an internal buffer with three blank lines between them, and then the engine interpolates vertically between them. But add rotation and error correction on top of that :)
Here's the map resource unpacked.
-
I’m almost done implementing the last major graphics algorithm in Cryo's Dune, the zoomed in map view.
The map generated as a 4 by 4 scaling of the map resource. Basically, two sequential bands of latitude are scaled horizontally in an internal buffer with three blank lines between them, and then the engine interpolates vertically between them. But add rotation and error correction on top of that :)
Here's the map resource unpacked.
-
I added some randomness back in, so now it’s different every time you reload: https://thomas.fach-pedersen.net/dune/attack/
-
I added some randomness back in, so now it’s different every time you reload: https://thomas.fach-pedersen.net/dune/attack/
-
My reverse engineered implementation of Dune's particle system now matches the original perfectly, at least for the cases encounted in the intro :)
(Original on the left, mine on the right)
To compare frame by frame, I had to limit the randomness in between the frames when it’s running in my emulator.
The code is available here, but it's still messy: https://github.com/madmoose/dune-rust/blob/main/crates/dune/src/attack/mod.rs
And a WASM version for your enjoyment: https://thomas.fach-pedersen.net/dune/attack/
-
My reverse engineered implementation of Dune's particle system now matches the original perfectly, at least for the cases encounted in the intro :)
(Original on the left, mine on the right)
To compare frame by frame, I had to limit the randomness in between the frames when it’s running in my emulator.
The code is available here, but it's still messy: https://github.com/madmoose/dune-rust/blob/main/crates/dune/src/attack/mod.rs
And a WASM version for your enjoyment: https://thomas.fach-pedersen.net/dune/attack/
-
All the particles finally appear to go the right places, only the palette transitions are missing.
(The original is on the left, my reimplementation is on the right.)
The code contain wonderful little bit-shuffling snippets like this to calculate particle positions, which'll never really be "Clean Code" :)
```asm
seg000:0B9A xchg dl, dh
seg000:0B9C rol dh, 1
seg000:0B9E and dx, 1FFh
seg000:0BA2 cmp dx, 320
``` -
All the particles finally appear to go the right places, only the palette transitions are missing.
(The original is on the left, my reimplementation is on the right.)
The code contain wonderful little bit-shuffling snippets like this to calculate particle positions, which'll never really be "Clean Code" :)
```asm
seg000:0B9A xchg dl, dh
seg000:0B9C rol dh, 1
seg000:0B9E and dx, 1FFh
seg000:0BA2 cmp dx, 320
``` -
For the night attack scene in the game intro, Dune uses a particle system with very gnarly assembly code in it.
They freely treat registers as either 16-bit values or a pair of 8-bit values, first treating the 8-bit parts as signed values, then rotating and shifting bits in the whole 16-bit register. I haven't worked out the meaning of it yet, but I've mostly replicated it, at least.
Here's a video of my in-progress Rust replica, until it crashes :-)
-
For the night attack scene in the game intro, Dune uses a particle system with very gnarly assembly code in it.
They freely treat registers as either 16-bit values or a pair of 8-bit values, first treating the 8-bit parts as signed values, then rotating and shifting bits in the whole 16-bit register. I haven't worked out the meaning of it yet, but I've mostly replicated it, at least.
Here's a video of my in-progress Rust replica, until it crashes :-)