Skip to content

Releases: MakerClassCZ/picogame-libs

0.3.0

Choose a tag to compare

@github-actions github-actions released this 06 Sep 14:20
0.3.0: game.json loader (Game), picogame_story, .pal8 sidecars, on-de…

0.2.5

Choose a tag to compare

@github-actions github-actions released this 03 Sep 09:22
0.2.5: per-frame cost pass across the helpers - Buttons.poll tracks h…

0.2.4

Choose a tag to compare

@github-actions github-actions released this 02 Sep 14:29
0.2.4

0.2.3

Choose a tag to compare

@github-actions github-actions released this 02 Sep 08:06
0.2.3

0.2.2

Choose a tag to compare

@github-actions github-actions released this 01 Sep 17:25
0.2.2

0.2.1

Choose a tag to compare

@github-actions github-actions released this 31 Aug 14:13
New helpers
- picogame_road.Road - drive the native pg.road_edges + Canvas.road pair from
  human units (curve periods and swing in px, hills via set_grade, safe int32
  phase wrap), plus the queries games kept re-deriving: curve_at() for
  centrifugal physics and row_of/half_of/edges_of for placing sprites on the
  road. Perspective is the device-proven picobike model; picobike itself now
  runs on it.
- shapes.masks(mask_list, color) - the multi-frame from_mask that was missing
  between from_mask and atlas.
- shapes.tileset_colors(..., gap=N) - a transparent mortar edge per tile, so
  touching same-colour tiles stay readable as tiles.
- Raycaster.set_cell(x, y, v) - change one world cell at runtime (doors,
  gates); keeps the caster grid, solid() and .map consistent and re-casts even
  for a standing camera.
- Shake(scene=None) - the trauma model without a scene: tick() publishes
  .ox/.oy for strip-rendered games (road, raycaster, mode-7) to spend in their
  own camera params, since set_view never moves a StripDraw.

Behaviour change
- Pool keeps its own in-use bit (`pool.alive`), so sprite.visible now means
  only "draw this": blinking a pooled sprite no longer hands its slot to the
  next spawn(). Every existing `if not s.visible: continue` guard still reads
  correctly, so no game needs changing; free() of a foreign sprite now raises
  ValueError instead of silently hiding it.

Also: picogame_scene.View.set_tile_prop (flip a tile TYPE's flags at runtime),
picogame_script (story scripts as generators), documented traps in
Raycaster.draw (its row 0 is the view's top, not the screen's) and the
billboard idiom (a Scene draws in add order, so sorting your own list
reorders nothing).

0.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Aug 20:28
The engine these helpers sit on shipped in CircuitPython 10.3.0 — picogame is no
longer a fork-only module, so the libs get a minor bump to match.

picogame_scenebake: bake a level's scene JSON on the device, so iterating on a
  level no longer needs a tools/scene_build.py pass after every edit. Entry point
  is picogame_scene.load_json(pg, path); it is a function on purpose, so the JSON
  text and the parse tree stay locals and die on return — measured, that is the
  difference between a transient startup spike and a permanent cost. Colour-
  tileset levels only; PNG art still needs the desktop quantizer.
picogame_tiles: says plainly that a scene loaded by picogame_scene should use
  view.tile_has(name) instead of a parallel bitfield, and that the eight flag bits
  are all there are — there is no separate custom range to go looking for.
picogame_i2cpad: PICOGAME_I2C accepts a bus name.

0.1.36

Choose a tag to compare

@github-actions github-actions released this 23 Aug 16:44
Tilemap API split (get_tile/set_tile), framebuffer error message, FAS…

0.1.35

Choose a tag to compare

@github-actions github-actions released this 19 Aug 08:33
picogame_options: the row list can be rebuilt at runtime.
  set_rows(rows, sel=0) replaces the rows and repaints, normalising the new ones like the
  constructor did - so a row written by hand or restored from a save may omit i/value instead
  of raising KeyError on the next render. It is also how a sub-level's rows are swapped in and
  out, which puts a whole menu tree on one widget and one SceneBox layer.
  visible= is now the window height when passed explicitly, instead of collapsing to the initial
  row count, so a list that grows and shrinks (a roster, connected players, shop stock) keeps one
  panel size; show() clamps the cursor and scroll window, so a list that shrinks under the cursor
  cannot IndexError.

0.1.34

Choose a tag to compare

@github-actions github-actions released this 18 Aug 17:59
Display: one source of truth
  picogame_game.screen()/display() take the board's display from supervisor.runtime.display -
  the primary display CircuitPython selects at boot, or the one a boot.py/launcher publishes.
  Games no longer read board.DISPLAY, so the same file runs on a PicoPad, a Fruit Jam and a
  bare Pico; the simulator and the WASM playground ship a small supervisor shim.
  Verified on hardware (PicoPad + Fruit Jam, dist/hwtest): 12/12 and 14/14 checks.

Fixes
  open_framebuffer(): a failed resolution switch rebuilds and republishes the previous mode
  instead of leaving the board with no display at all until a power cycle.
  picogame_i2cpad: attach() now clocks a wedged bus free (deinit + 9 SCL + STOP + rebuild)
  instead of timing out until the pad is unplugged - the recovery existed but could never run.
  picogame_launcher: detects a shimmed supervisor (sim/playground) instead of assuming a device.