oatmealine / gd-icon-renderer

A Crystal Geometry Dash icon renderer library
MIT License
1 stars 0 forks source link

Offset issue (?) on `spider_16` #2

Open reidlabwastaken opened 1 year ago

reidlabwastaken commented 1 year ago
require "../src/gd-icon-renderer.cr"

GAME_SHEET_02 = IconRenderer::Assets.load_spritesheet("data/GJ_GameSheet02-uhd.plist")
GAME_SHEET_GLOW = IconRenderer::Assets.load_spritesheet("data/GJ_GameSheetGlow-uhd.plist")
ANIMATIONS = IconRenderer::Assets.load_animations("data/Spider_AnimDesc2.plist")

icon_img = IconRenderer::Renderer.render_spicy("spider_16", [0.0, 0.0, 0.0, 1.0], [255/255, 125/255, 125/255, 1.0], true, GAME_SHEET_02, GAME_SHEET_GLOW, ANIMATIONS)
icon_img.write_to_file("icon_rendered.png")

This code runs as expected, but when rendering something goes strange - and the very left leg of the spider is offset too far to the right. This only seems to happen on spider 16, strangely.

You can see the result here: icon_rendered

oatmealine commented 1 year ago

i've encountered this before and have no idea what it could be caused by!! haha!! if you have any pointers let me know; i'm leaving this issue open until i find out what it's caused by

oatmealine commented 1 week ago

updating this after an entire year with more information; this still occurs in gd-icon-renderer in 2.2 (1), and does not occur in iconkit (2) or ingame (3) image image image this seems to be an issue happening on a couple of icons, but it's always spiders or robots, which are the only icon types which are animated, so i'm left to assume this is an issue on gd-icon-renderer's end with how it handles animations. however! vanilla has a very similar bug that occurs randomly also on spiders or robots which looks very visually similar: image so i'm left to assume that this is a mistake that either we're both making, or that it's an issue with the spritesheets/animations that both gd and iconkit compensate for (but gd does badly)