Log inGet started
World

Save Point: Profiles, Levels and Unlocks Kit

README.md

popups

The "+10" popups that appear where points were scored. Popups.render(id, popup, { k, look }) draws one PopupData (see demo.module) as a pure function of popup.age / popup.life. The popup pops in, rises (a penalty falls) and fades out. The call returns node, w, h; place the node at left = x - w/2, top = y - h. Once the age reaches life it returns nil. Kinds: normal, combo (shows the xN), big (larger, with a burst), bonus (the label over the number) and penalty (red, falling).

local Pop = require("scoreKit.popups")
local node, w, h = Pop.render("cartoon", popup, { k = 1 })

Styles:

  • pop (themed): a clean bold outlined number with a combo chip, a burst ring on big and a green pill label on bonus.
  • arcade: the pixel-font number hops up in hard steps and blinks out; big throws pixel sparks.
  • scifi: a glowing mono number between brackets that spread open; big draws an expanding hex and a penalty glitches.
  • fantasy: gold italic serif numerals drift up like embers among sparks; big radiates rays.
  • cartoon: a chunky inked number with an elastic bounce and tilt; big lands on a starburst and bonus sits on a ribbon.