ewrogers/sgdk-skills

sgdk-ui

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

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/ewrogers/sgdk-skills --skill sgdk-ui

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

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.

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills
ewrogers
コミュニティ

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.

導入数
1
GitHub Stars
0
更新日
10月20日
ewrogers
コミュニティ

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.

導入数
1
GitHub Stars
0
更新日
10月20日
ewrogers
コミュニティ

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.

導入数
1
GitHub Stars
0
更新日
10月20日
ewrogers
コミュニティ

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.

導入数
1
GitHub Stars
0
更新日
10月20日