Page MenuHomePhabricator

Sprite Sheet scale seems incorrect
Closed, ResolvedPublic


Exact actions, test name and scenario, or code for duplicating the bug.

Run the code with the version that includes an initial sprite image, the feet are just clipped off. Adjusting the sprite_locations dictionary in src/diamondquest/view/map/ to pick a sprite towards the bottom right of the sprite sheet will show other issues.

A detailed description of the exact bug. This includes compiler warnings, terminal output, Valgrind output, crash reports, and all other such information.

This seems to be something to do with the texture resolution for the sprite, setting a value of 20 rather than the expected 16 in more or less displays the sprite correctly. However, there is no integer value for which all of the figures can be selected without issue.

Your development environment; at the minimum, include your operating system. If you are staff, you are expected to be running the company’s standardized development environment. Otherwise, you should include your exact compiler version, linked library versions, compiler settings, and all other relevant development data.

Python running on linux.


Task Type
Proposed Urgency
Triage Gravity
Triage Friction
Triage Relativity
Volatility (Caught At)
v1: Coding
o1: Coding

Event Timeline

Hi Elizabeth,

The initial sprite support was added in D329, I'm new to working with sprites so it's possible I've got something wrong with how the code selects/scales the image but I think its correct.


Hi @SGallagherMet! Thanks for letting me know. I'm also a bit new to working with/making sprites, so I appreciate the heads-up. Were there any sprites in particular you noticed were giving you trouble? Or was it just improper sizing on the whole thing (i.e. if one is off, then the others are all off)?

I think it's the sizing, I need to use a magic number to get the first (top left) sprite on the sheet to display correctly, but as I tried sprites towards the bottom right I was getting bits cut off or even bits of two different sprites.

I know that the blockset texture sheet worked because each individual element was exactly 16x16, with the upper-left corner of the first element at absolute (0, 0), and there was no padding between elements.

Here's a quick update on the sprite sheet. I've started moving the individual sprites closer together to get rid of the padding that's causing us trouble. Should be done soon!

updateAug7th.jpg (422×1 px, 155 KB)

...and ignore the red squares. They're just there for me to make sure each sprite is 16x16 :)