ewrogers/sgdk-skills

sgdk-ui

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

Ver código fuente

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/ewrogers/sgdk-skills --skill sgdk-ui

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

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.

Relacionados por tarea

del mismo repositorio

Más Skills

Todos los Skills
ewrogers
Comunidad

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.

instalaciones
1
GitHub Stars
0
Actualizado
20 oct
ewrogers
Comunidad

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.

instalaciones
1
GitHub Stars
0
Actualizado
20 oct
ewrogers
Comunidad

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.

instalaciones
1
GitHub Stars
0
Actualizado
20 oct
ewrogers
Comunidad

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.

instalaciones
1
GitHub Stars
0
Actualizado
20 oct