Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Sprite Flag(s) #576

Open
paul59 opened this issue Oct 27, 2024 · 2 comments
Open

Feature Request: Sprite Flag(s) #576

paul59 opened this issue Oct 27, 2024 · 2 comments

Comments

@paul59
Copy link

paul59 commented Oct 27, 2024

TIC-80 has a set of eight boolean flags per sprite which are incredibly useful, for example for denoting 'walkable' tiles, special objects etc. It would be great if Pyxel had a similar feature (or maybe there's some simple alternative already in place that I'm missing?).

@merwok
Copy link
Contributor

merwok commented Oct 27, 2024

This comes from PICO-8, and it is indeed a great way to encode information into sprites, so that you can change a level in the map editor and get correct behaviour (solid wall, liquid, teleport, monster spawn point…)

Current alternative: maintain a list of sprite identifiers in your code to know which behaviour is needed. Or create your convention like «sprites in bank 1 are all solid».

Additional: sprite are great when all uses of that sprite need the same handling, but for other needs it’s good to have map flags, for example set a bit on a tile in the map to mark it rotated or special in other ways (picotron has these for example – «flip bits»; see also https://www.youtube.com/watch?v=ZWQ0591PAxM for other cool ideas that can be done with extra bits)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@merwok @paul59 and others