Overview
Nyuron is built for mobile devices, with careful attention to viewport configuration, touch input, and orientation handling. This guide covers the mobile-specific settings and patterns.Project Configuration
project.godot Settings
Location:project.godot
Key Settings Explained
Viewport Size: 270x480
Viewport Size: 270x480
Base resolution for portrait mode. This provides a good balance between performance and visual clarity on mobile devices.
- Portrait games: 270x480 (default)
- Landscape games: 480x270 (switched)
Stretch Mode: canvas_items
Stretch Mode: canvas_items
Scales the entire scene uniformly while maintaining aspect ratio. UI elements remain crisp on different screen sizes.
Scale Mode: integer
Scale Mode: integer
Uses integer scaling to preserve pixel-perfect rendering. Important for the pixel art style of Nyuron.
Orientation: 6 (Sensor Landscape)
Orientation: 6 (Sensor Landscape)
Allows the game to rotate based on device orientation. Individual scenes override this as needed.
Rendering Method: mobile
Rendering Method: mobile
Optimized renderer for mobile devices with lower power consumption.
Texture Filter: 0 (Nearest)
Texture Filter: 0 (Nearest)
Disables texture filtering for sharp pixel art. Essential for retro aesthetic.
Screen Orientation
Dynamic Orientation Switching
Nyuron switches orientation based on the minigame:Orientation per Game
| Game | Orientation | Resolution |
|---|---|---|
| Main Menu | Portrait | 270x480 |
| food_catch | Portrait | 270x480 |
| worm_bucket | Portrait | 270x480 |
| memorice | Portrait | 270x480 |
| nyuron_color | Portrait | 270x480 |
| turtle_run | Landscape | 480x270 |
| counting_animals | Landscape | 480x270 |
Setting Orientation in Your Game
When launching from main menu:- Portrait:
minigames/food_catch/main.gd:235-237 - Landscape:
scripts/main_menu.gd:204-207
Touch Input Handling
Touch Control Areas
Create transparent touch zones for mobile input:minigames/food_catch/main.gd:375-384
Setting Up Touch Zones
In your scene:Button-Based Input
For simpler games, use actual buttons:Input Mapping
Inproject.godot, define input actions:
Responsive UI Scaling
CanvasLayer with Follow Viewport
Ensure UI stays in place across devices:Anchor-Based Positioning
Use anchors instead of fixed positions:Viewport Size Detection
Get current viewport size at runtime:minigames/food_catch/main.gd:104, 146
Android Export Settings
export_presets.cfg
Location:export_presets.cfg
Key Android Settings
Architectures
Architectures
- arm64-v8a: Enabled (modern devices)
- armeabi-v7a: Disabled (legacy devices)
Immersive Mode
Immersive Mode
Hides system UI (navigation bar, status bar) for fullscreen gameplay.
Screen Support
Screen Support
Supports all screen sizes from small phones to tablets:
Performance Optimization
Mobile Rendering
Already configured inproject.godot:
Texture Compression
When importing textures, use ETC2 for Android:- Select texture in FileSystem
- Go to Import tab
- Set:
- Compress: VRAM Compressed
- Format: ETC2_ASTC (for Android)
Pixel Snapping
For smooth pixel art movement:Testing on Mobile
Common Mobile Issues
Touch not registering
Touch not registering
Problem: Touch input not detected.Solution: Ensure ColorRect/Control has mouse_filter set to
MOUSE_FILTER_STOP and is above other UI elements in z-order.UI cut off on edges
UI cut off on edges
Problem: Buttons or labels partially off-screen.Solution: Use anchors and margins instead of fixed positions. Test with safe area margins.
Wrong orientation on launch
Wrong orientation on launch
Problem: Game starts in wrong orientation.Solution: Set orientation in
_ready() before gameplay starts:Blurry pixel art
Blurry pixel art
Problem: Sprites look blurred.Solution: Set texture filter to Nearest in import settings and project settings:
Performance drops
Performance drops
Problem: FPS drops below 60.Solution:
- Use object pooling for frequently spawned items
- Limit particle effects
- Reduce number of physics bodies
- Use mobile renderer
Mobile-First Best Practices
Large touch targets
Make buttons at least 48x48 pixels for easy tapping
Clear visual feedback
Use animations and sounds to confirm touch input
Simple controls
Limit to 2-3 simultaneous touch points maximum
Test on real devices
Emulators don’t replicate true touch feel
Next Steps
UI Components
Build mobile-friendly UI elements
Creating a Minigame
Apply mobile patterns to new games