Theme docs are missing 27 images, have wrong names, and give no drawn sizes

Open
#798 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
documentation

Research direction

Start with docs/themes.md and compare its asset list and descriptions against the loading and drawing code in client/src/mods/Theme.lua and the referenced rendering paths in ClientStack.lua, Character.lua, and GraphicsUtil. Update the missing names, incorrect descriptions, and drawn-size guidance from the issue’s findings. Done when the documentation matches the code for all listed assets and gives theme authors usable size guidance.

Written by the indexing model from the issue text.

Description

docs/themes.md calls itself an exhaustive list of theme assets, but it covers 52 of the 79 images Theme.lua loads (counting a per-player pair or a numbered series such as level1…level11 as one image), gives a drawn size for none of them, and has a few names and descriptions that don't match the code. Checked against beta at 74629707.

Not documented

These are loaded by client/src/mods/Theme.lua but never mentioned in docs/themes.md:

  • Puzzle and match icons: bug (L344), edit, partial
  • Input icons, all 17: input/controller, input/keyboard, input/touch, input/mouse, the 10 input/controller_* variants (generic, playstation1-5, xbox360, xboxone, xboxseries, switch_pro), input/controller_add, input/error and input/device_number_N (L384-L409)
  • Lobby icons: checkbox_checked, checkbox_unchecked, fight, stopwatch, endless (L453-L457)
  • separator (L493), used by the puzzle hierarchy display
  • multibar_frame (L543): loaded into IMG_multibar_frame, but nothing reads that field and the default theme doesn't ship the file. It should probably be removed rather than documented.

Wrong names

  • The character select overlay is documented as load, but the game loads loading (L433). A theme following the doc gets the default image.
  • The actions per minute icon is documented as APM, but the game loads apm (L551), and the default theme itself ships [email protected]. On a case-sensitive filesystem the default theme's APM icon doesn't load at all: running beta from a case-sensitive APFS volume, themes[config.theme].images.IMG_apm is nil while IMG_gpm loads; the same check on the default case-insensitive volume loads both. Linux filesystems are case-sensitive, so Linux players most likely don't see the icon (not tested on Linux itself).

Wrong or stale descriptions

  • Countdown says 1, 2 and 3 "will get displayed just as is, no scaling". They are drawn through drawGfxScaled in ClientStack:drawCountdown (ClientStack.lua#L370), at 3x their point size, the same as ready. Measured in game: the default ready@2x (71x15 points) is drawn 213x45 and the numbers 45x45.
  • Fallback PopFX says a theme should provide burst and fade for characters that lack them. Missing burst and fade fall back to the default character (defaulted_images in Character.lua); the theme's files are never loaded.
  • Default image says transparent is shown when any mod image fails to load. The fallback in GraphicsUtil.privateLoadImageWithExtensionAndScale loads themes/Panel Attack/transparent.png, a theme folder the game no longer ships (the default is Panel Attack Modern); in game that path doesn't exist, so a file that fails to decode loads as nil instead.

Drawn sizes

No image says how big it is drawn, so theme authors can't tell what resolution to ship. The drawn size on the 1280x720 canvas is fixed for many of them, for example:

Image Drawn at
frame/frameNP 312x612
frame/wallNP width 288
cursor1, cursor2 120x72
chain and combo cards 48x48
pN_select_screen_cursorN height 100
random_character 84x84
random_stage 80x45
level/levelN, level/levelNunfocus 20x20 in the 1P mode menus, 16x16 in the puzzle menu
bug 60x60
swap, apm, GPM, CursorCount 24x24
input/* longest side 64 in the input device slots
flags/*, lobby icons, hint, complete, partial fit in 16x16
edit fit in 40x40
ready, loading, super on character select fit in the 84x84 tile
1, 2, 3, ready in the countdown 3x their point size

The others (labels, number atlases, multibar parts) are drawn at their own size times a *_Scale from config.json, which could be stated per image.

Dominant language
Lua
Stars
30
Forks
20
Avg merge
3d 15h
Merged PRs (30d)
17

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from panel-attack/panel-game

All issues in panel-attack/panel-game

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.