ewrogers/sgdk-skills

sgdk-scenes

Build SGDK game flow with title screens, character select, levels, pause, continue and credits; manage fades, input handoff, audio and resource cleanup between screens.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/ewrogers/sgdk-skills --skill sgdk-scenes

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

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

SGDK Scenes

Make each screen own its resources and decide exactly when gameplay stops, loading happens and input becomes active again. SGDK supplies the hardware services; a scene enum and update loop are ordinary game code.

Choose a small flow

  1. List the screens and what survives between them: player choices, options,

score and checkpoint. Keep that session data separate from sprites, maps, callbacks and temporary buffers.

  1. Pick what Continue restores. A level-start checkpoint is simpler than a

full mid-frame save. Validate the complete record before changing the live session, and preserve the previous valid slot if a write fails.

  1. Decide whether pause freezes gameplay only or also animation and sound.

Keep input polling and VBlank service running. See timing, input and saves.

  1. Pull ewrogers/sgdk:latest, run doctor, and verify APIs against its

headers/source. The linked references were checked with SGDK 2.11.

Give transitions one owner

  • Request the next screen from game code. Apply that request in the main loop,

after the current update finishes; avoid resource changes inside IRQ or joypad callbacks.

  • Stop outgoing producers, fade out, then drain the final queued transfers

while their source data still exists. SGDK clears the fade flag before its last queued palette transfer has been flushed.

  • Hide the display, remove only callbacks the screen owns, and release its

maps, sprites and scratch allocations. Clear stale handles.

  • Reset the planes, Window, scrolling and palettes needed by the next screen.

Build the incoming screen while hidden; flush its initial sprite/graphics uploads before fading in.

  • Check each allocation. Clean up partial entry before trying a safe title or

error screen. Do not repeatedly retry a failing load forever.

Follow resource ownership and cleanup for the actual APIs and their limits. Do not cancel the global DMA queue or reset unrelated services merely to make a transition appear to work.

Prove the flow

The standalone Transition Lab includes Title, Continue, Options, Credits, two-player character selection, four rooms and pause. Its boss encounter exercises bounded projectiles, dropped coins, effects and a final reward without creating another scene framework.

Test both success and failure:

  • Either player joins first; simultaneous joins and held buttons behave once.
  • Countdown, manual animation and pause follow the intended clock at 50/60 Hz.
  • Fades drain before resource cleanup; repeated transitions return to a

comparable heap baseline; partial loads clean up before fallback.

  • Missing, corrupt and interrupted saves preserve the older valid checkpoint.
  • Emulator checks cover menus, both players, music, fades, Continue and the

complete game. Console timing and SRAM retention need separate tests.

Report the ownership rules, checkpoint policy, tool versions and tests actually performed. A host fixture checks ordering and game behavior; compiling a ROM checks API compatibility. Neither proves VDP timing or real hardware behavior.

관련 작업

같은 저장소의 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일