libretro / nxengine-libretro

Port of NxEngine to the libretro API. NXEngine is a Cave Story game engine clone
85 stars 89 forks source link

I can't easily jump through one horizontal block gap. #84

Closed crocket closed 2 years ago

crocket commented 2 years ago

According to https://github.com/nxengine/nxengine-evo/issues/70 https://github.com/nxengine/nxengine-evo/commit/d7c771ef3a7b35a03725dfedaa39e8df39c5039b fixed the issue in nxengine-evo.

But, applying the commit to nxengine-libretro doesn't fix the issue because the commit requires sprites.sif which nxengine-libretro can't use.

Doukutsu-211031-172759

crocket commented 2 years ago

After investigation, I found a fix, but the fix will take more work.

I converted nxengine/extract-auto/sprites_sif.h into sprites.sif with my own script and fed sprites.sif to sifedit in http://nxengine.sourceforge.net/dl/nx-src-1002.tar.gz and nxengine-evo's sprites.sif to https://github.com/nxengine/sifedit

nxengine-libretro: Block U 2021-11-02 16:43:39 nxengine-evo: Block U 2021-11-02 17:05:21 nxengine-libretro: Block D 2021-11-02 16:44:04 nxengine-evo: Block D 2021-11-02 16:44:13

The fix is to transfer Block U and Block D from nxengine-evo to nxengine-libretro and save sprites.sif. nxengine-evo's sprites.sif decreases the gap between Block U and Block D by one pixel. Block U and Block D are used by collision tests. However, I don't yet trust that sifedit in http://nxengine.sourceforge.net/dl/nx-src-1002.tar.gz generates a correct sprites.sif that nxengine-libretro can actually use. Binary diff produced by vbindiff shows extensive changes.

Does anybody know a way to edit sprites.sif safely? I wish sprites.sif was a human-readable plain text file. It is difficult to trust something that can't be scrutinized easily.

crocket commented 2 years ago

I just saved sprites.sif, converted sprites.sif back to sprites_sif.h, and tested nxengine-libretro.

The new version of sprites_sif.h fixes the jumping issue and seems to replicate nxengine-evo's jump.

I haven't tested the game with the new version of sprites_sif.h from the beginning to the end, but it seems to work.