Elektrine lite

← Feed

@mogwai_poet@mastodon.social

Post #2526601

2026-04-23 23:26 UTC

@Doomed_Daniel@mastodon.gamedev.place From my cursory research, it stores your max hearts and whole number of hearts in one byte (4 bits each) and your fractional hearts in a second byte.

Replies (1)

  • @mogwai_poet@mastodon.social Interesting! I couldn't find anything about this so I was wondering - one would think that 1/16 per heart (max 255 or 256 "hitpoints" total) would be good enough, but OTOH as you also need to store max hearts, using a second byte like this is a clever solution for more resolution with low overhead

    Open ##2526602