ewrogers/sgdk-skills

sgdk-ui

Build SGDK fonts, text, menus and HUDs with bounded formatting, controller navigation and clear tile/palette ownership.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/ewrogers/sgdk-skills --skill sgdk-ui

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

SGDK UI

Make the screen easy to read and the controls predictable. SGDK supplies text and VDP functions, not a ready-made menu or widget system. Keep menu state, controller navigation and drawing separate enough to test without a console. Use the game's existing structure rather than imposing a UI framework.

For NPC conversations, branching choices and portrait exchanges, use sgdk-dialogue when available. This skill covers the shared UI foundations.

Choose the right reference

strings, numbers, field widths and clearing old text.

pause, transitions and options.

palettes, font tiles and transfer costs.

  • Menu Lab: an original title/options/pause/results

example with a switchable font and fixed score HUD over a scrolling grid.

Build with ewrogers/sgdk:latest and pull before validation. Check unfamiliar calls in the selected image's inc/vdp_bg.h, src/vdp_bg.c, inc/vdp_tile.h, inc/vdp.h, inc/joy.h and bin/rescomp.txt. The references cite SGDK 2.11; verify differences when the image moves forward. Never invent menu, Unicode, wrapping or font APIs that the installed SDK does not provide.

Plan the screen before drawing

Agree on visible rows/columns, safe margins, glyphs, palette lines and which plane owns the HUD. Text coordinates are 8x8 cells. A 320x224 display has 40x28 visible cells, even if its backing plane is larger. Keep player-facing text inside the visible area; plane clipping alone is not screen clipping.

Reserve font and UI graphics tiles alongside the game's other art. A font normally replaces SGDK's font slots; it must not silently overwrite sprite or map storage. Decide who may change its palette during fades or transitions. Window replaces part of plane A; it is not an extra scrolling background.

Keep updates small and predictable

Sample cached input once per frame. Confirm/back are press edges; held cursor movement gets an explicit delay and repeat interval. Base menu repeat and countdowns on the project's region/timing policy, not assumed 60 Hz frames. Consume the action that opens a screen so it cannot also select its first item.

Use bounded buffers and field widths. Replace shorter text with a padded field so old glyphs do not remain; avoid visibly clearing it before drawing its replacement. Avoid formatting and rewriting unchanged HUD text every frame. The SDK's string conversion calls do not receive destination capacity. Check the selected implementation before choosing a convenience helper.

Test navigation, held buttons across transitions, changing options, pause, maximum numbers, shorter replacements and unsupported text bytes. Compile real font resources and verify glyph order, not just C syntax. Finish with an emulator checklist and say which checks still need console testing.

Powiązane zadania

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
ewrogers
Społeczność

sgdk-ai

Implement enemy behavior in SGDK games with patrol/chase/attack states, sight cones, target selection, bounded pathfinding and staggered updates. Use when enemies see through walls, get stuck, switch targets erratically, return stale paths or cause frame spikes while searching.

instalacje
1
GitHub Stars
0
Aktualizacja
20 paź
ewrogers
Społeczność

sgdk-assets

Prepare, import and troubleshoot Mega Drive graphics, palettes, spritesheets, tiles, maps, fonts and audio resources with SGDK ResComp in Docker. Use for .res files, palette or tile budgets, broken imports, sprite cutting and asset pipeline changes.

instalacje
1
GitHub Stars
0
Aktualizacja
20 paź
ewrogers
Społeczność

sgdk-best-practices

Write or review SGDK C for defined arithmetic, clear module boundaries, resource lifetimes, safe queued transfers and interrupt sharing. Use for implementation quality and project code organization, rather than toolchain setup, game design or performance profiling alone.

instalacje
1
GitHub Stars
0
Aktualizacja
20 paź
ewrogers
Społeczność

sgdk-cartridge

Plan and implement large SGDK cartridges with Sega/SSF bank switching, FAR resources, pinned shared code and audio, and safe SRAM access. Use when a ROM exceeds the linear address window, stage assets live in separate banks, a FAR pointer becomes invalid, or saving interferes with banked content.

instalacje
1
GitHub Stars
0
Aktualizacja
20 paź