Overview
This guide walks you through creating a new minigame using Nyuron’s established patterns. We’ll usefood_catch as a reference.
Step 1: Create Directory Structure
Create a new folder inminigames/ with this structure:
Step 2: Create Main Scene
Createscenes/Main.tscn with these essential nodes:
Step 3: Main Script Template
Createscripts/main.gd with this structure:
Step 4: Set Screen Orientation
Determine if your game is portrait or landscape, then set it in the launcher function.Portrait (270x480)
Landscape (480x270)
Step 5: Integrate with ScoreManager
Register Your Game
Add your game toscripts/ScoreManager.gd.gd:
Save Scores
In your game over logic:Step 6: Add to Main Menu
Editscripts/main_menu.gd to add your game:
Step 7: Create Game Over Panel
Add this to your Main.tscn’s CanvasLayer:Step 8: Implement Touch Controls (if needed)
For mobile-friendly controls:Common Patterns
Intro Panel Animation
Intro Panel Animation
All games show an intro panel with instructions. Hide it with a fade animation:
HUD Flash Effects
HUD Flash Effects
Flash labels to provide visual feedback:
Floating Score Text
Floating Score Text
Spawn floating text for score feedback:
Pause System
Pause System
Implement pause that stops timers, animations, and game logic:
Testing Checklist
Next Steps
UI Components
Learn about reusable UI patterns
Mobile Adaptation
Optimize for mobile devices