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 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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

모든 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일