What it does
displays
On-screen score readouts (HUD widgets) for scoreKit. Every display is a pure function of a DisplayData table (see demo.module) and returns one widget-tree node exactly w x h, scaled from its natural size and transparent outside its own panel. Motion comes only from data.t, data.sinceAward and data.sinceBreak. Each display shows the score, shows the multiplier when it is above 1, bumps or flashes on a fresh award, drains with the combo window and gives a short "combo lost" cue.
local D = require("scoreKit.displays")
local node = D.render("comboMeter", data, { w = 380, look = "scifi" })
D.ids() -- every style id
D.get("arcade") -- { id, name, description, natural = {w,h}, themed, tags }
Styles (themed ones draw in opts.look; the rest have a fixed look):
arcade: zero-padded odometer digits that roll column by column in a black glass bezel, with a 1UP/SCORE header and a magenta MULT chip.pixel: a chunky 8-bit counter in the theme pixel font with a hard shadow, a pixelx3and a stepped 12-block combo bar.comboMeter(themed): the score, a meter that fills toward the next multiplier step with one segment per hit, a strip that drains with the window, and an "x4 at 10" hint.multiplierRing(themed): one ring segment per multiplier step, an inner ring that drains with the window, a big xN in the centre and the score in a pill.stars(themed): three stars that fill as the score passes its targets, with the next star partly filled and a "next ★ at 5,000" hint.grade(themed): a big S/A/B/C/D medallion, one colour per grade and a moving shine on S, plus a progress bar toward the next grade.splits(themed): time trial. A running timer, a green/red ahead/behind banner, split rows with deltas, the current split highlighted and the best time to beat. With no timer it shows the score only.minimal: thin type straight over the game with a soft shadow, a small label, a subtle ×N and a hairline combo line.scifi: a clipped-corner holo frame with scanlines, glowing mono digits, a MULT readout and the combo as skewed tick segments.fantasy: a gilded walnut plaque on a parchment ribbon with gold serif numerals, a wax-seal multiplier and rune gems that light up per step.cartoon: an inked number on a wobbling starburst that squashes and stretches on each award, with a spinning combo badge and an "OOPS!" on a break.neon: a neon-tube sign that flickers a little, with the multiplier in a cyan tube and an underline tube for the combo window.broadcast: a sports TV lower-third with a LIVE dot, place out of players, player name, score and a yellow multiplier tag.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.