{"id":25867081,"url":"https://github.com/pleft/sega_ai_snake","last_synced_at":"2026-06-02T20:31:35.618Z","repository":{"id":280118321,"uuid":"941033971","full_name":"pleft/SEGA_AI_Snake","owner":"pleft","description":"SEGA Mega Drive / Genesis Snake game created using AI (Grok and Claude) ","archived":false,"fork":false,"pushed_at":"2025-03-08T13:24:52.000Z","size":231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T14:23:29.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pleft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-01T10:21:18.000Z","updated_at":"2025-03-08T13:23:01.000Z","dependencies_parsed_at":"2025-03-01T11:37:49.293Z","dependency_job_id":null,"html_url":"https://github.com/pleft/SEGA_AI_Snake","commit_stats":null,"previous_names":["pleft/sega_ai_snake"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pleft/SEGA_AI_Snake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleft%2FSEGA_AI_Snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleft%2FSEGA_AI_Snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleft%2FSEGA_AI_Snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleft%2FSEGA_AI_Snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pleft","download_url":"https://codeload.github.com/pleft/SEGA_AI_Snake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleft%2FSEGA_AI_Snake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33835765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-02T03:34:05.343Z","updated_at":"2026-06-02T20:31:35.612Z","avatar_url":"https://github.com/pleft.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SEGA_AI_Snake\nSnake Game for Sega Mega Drive using SGDK 2.00 and AI (Grok and Claude)\n\n![AI-MAZE-ING SNAKE](/res/intro.png)\n\n## Overview\nThis is an enhanced Snake game for the Sega Mega Drive, built with SGDK 2.00. Titled \"AI-MAZE-ING SNAKE,\" the player navigates a snake through a randomly generated maze, growing by eating red food dots. The game increases in speed and difficulty as the score rises, featuring a custom tiled playfield, 8-bit chiptune music, and sound effects.\n\n## Main Features\n1. **Gameplay**: Snake moves via D-pad, grows on eating food (score +10), ends on collision with borders, maze walls, or itself.\n2. **Visuals**:\n   - **Head**: 32x8 sprite sheet (4 frames: down, right, up, left).\n   - **Body**: 16x8 sprite sheet (2 frames: horizontal, vertical).\n   - **Food**: Single 8x8 red dot.\n   - **Playfield**: Custom sand tile (`sand.png`) background, custom wall tiles (`wall.png`) for borders and maze.\n   - **Text**: Dark green text for score, intro, pause, and game-over screens.\n   - **Intro**: Custom tilemap from `intro.png` with PAL1.\n3. **Audio**: Chiptune melody with dynamic tempo (capped), \"chomp\" sound, game-over tune with rest, intro tune, toggleable via B button.\n4. **Controls**: Start toggles states or pauses; D-pad moves snake; B toggles music in intro.\n5. **Technical**: PSG audio, sprite allocation checks, free tile list for O(1) food placement, manual VRAM management for sprites and tiles.\n\n## Updates (Latest)\n- Updated title to \"AI-MAZE-ING SNAKE\" with simplified intro text (\"START TO PLAY\", \"B TO TOGGLE MUSIC\").\n- Changed text color to dark green (PAL0 index 15) for better contrast with sand background.\n- Fixed pause/unpause to restore sand tiles instead of showing plain sand color.\n- Added custom wall (`wall.png`) and sand (`sand.png`) tiles, replacing monochrome tiles.\n- Optimized food placement with a free tile list for O(1) performance.\n- Enhanced game over with snake and food disappearance, tune, and rest before tune.\n- Improved intro screen with `intro.png` as an IMAGE resource, new PAL1 palette, and music toggle.\n- Removed debug direction text, capped music tempo, optimized collision detection, and fixed `prevStartState` initialization.\n\n## Build and Run Instructions\n1. Requires [SGDK 2.00](https://github.com/Stephane-D/SGDK/releases/tag/v2.00).\n2. Set the `%GDK%` environment variable to point to the SGDK install directory.\n3. Add `%GDK%/bin` to the `%PATH%` environment variable.\n4. Build the project from the root directory: `make -f %GDK%/makefile.gen`.\n5. Grab `rom.bin` from the `out/` directory and load it in your favorite Sega Mega Drive emulator (e.g., BlastEm).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleft%2Fsega_ai_snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpleft%2Fsega_ai_snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleft%2Fsega_ai_snake/lists"}