panel-attack / panel-game

Panel Attack is a free modern puzzle game inspired by popular games such as Tetris Attack and Pokemon Puzzle League while still maintaining authentic mechanics. Arrange colored panels in rows and columns of three or more to match matches that clear. Panels then fall from gravity and can make chains that give bonuses or attack the other player.
Other
5 stars 2 forks source link

Request for panel skin customization via config.json #388

Open MizunoKetsuban opened 11 months ago

MizunoKetsuban commented 11 months ago

Put simply: This would allow the skin creators to decide how many image files are used and how many frames the animations last for. If a value is not present, it would default to the filenames and timings that are already used in the game currently (for compatibility with old skins)

The categories of animation that would be modifiable are as follows:

Under each category would be editable fields that allow you to set a filename and a duration. The filename is the image that is pulled, and the duration is how many frames the image will be displayed before it switches to the next image in the sequence. The creator would be able to add as many of those fields per category as they desire, to make animations as long or as short as they want.

JamesVanBoxtel commented 11 months ago

I think this would be awesome and not too bad to implement. Some thoughts about implementation / protocol below:

Bonus points if we assert / tell the developer they made a frame that is longer than ever possible to reach

I assume we jump cut to these animations from the previous one when transitioning

One think I anticipate could be a problem, the current animation for land and garbage land are maybe slightly different as coded and not obvious how they work. It looks like we can just standardize that the animation applies to the first frame that should be non idle for both cases such that the panel designer doesn't need to know this detail. Currently each image in the "danger" and "land" animation uses 3 frames.

Implication from above, we should document what the "standard" timing is for each image

Another thing to think about, I currently have a PR that relates to the "flash" animation being too fast. If you only have 1 frame of an image sometimes it doesn't draw, it its repetitive like that it can get out of sync with the refresh rate and consistently not draw. We want to allow people to override to 2 frames per flash image instead. How should we support this generically?

Should we have a state for chaining?

Should we have "convert" be all situations where you can't swap yet? Or should that be a separate category?