Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
258 stars 25 forks source link

Change sticky note limit to 32 (1.5.2) #107

Closed griffi-gh closed 1 year ago

griffi-gh commented 1 year ago

closes #24

Also allows changing sticky note layers

(Levels created with this patch can't be loaded in previous versions of the game)

waiting for the version code increase (#116)

griffi-gh commented 1 year ago

hm, isn't NUM_SLOTS supposed to be 8?

griffi-gh commented 1 year ago

yeah it used to be 8 (but it expects the last slot to be empty)

griffi-gh commented 1 year ago

@rollerozxa check the array size before this pr

rollerozxa commented 1 year ago

oops, yes it is supposed to be 8 actually

rollerozxa commented 1 year ago

actually wait, previously there was a limit of only 7 stickies, even if there's room for 8... whatever, it'll be raised back to 32 soon anyways

griffi-gh commented 1 year ago

btw a way to shove even more would've been nice.... these don't take much memory but were currently limited by max texture size (at 32 stickies it's creating a 128x4096 texture, 4096 is the hardcoded limit on modern android and ios versions (used to be 1024/2048 on budget android 1-4 devices and first three ios versions))

maybe it should also use the horizontal texture space?
that way we can put 64 notes in a single 1024x1024 texture

griffi-gh commented 1 year ago

this can be changed later without breaking anything...