Overview
Space Pong follows a standard Godot 4.3 project structure optimized for mobile development. The project is organized into three main directories for scenes, scripts, and sprites, with the main game configuration defined inproject.godot.
Directory Layout
Project Configuration
Theproject.godot file defines the core game settings:
The project uses Godot 4.3 and targets mobile platforms with the “Mobile” rendering method.
Display Settings
Space Pong uses a portrait-oriented mobile viewport:keep_height aspect ratio preservation, ensuring consistent vertical gameplay across different screen sizes.
Input Configuration
The project defines a custom “Start” input action mapped to the spacebar:ui_left and ui_right are used for player movement.
Main Scene
The entry point isres://scenes/game.tscn, which serves as the main game scene containing:
- Background: Space-themed sprite (Fundo6.png)
- Player: Instanced player paddle scene
- Ball: Instanced ball scene
- Walls: Three StaticBody2D nodes (TopWall, LeftWall, RightWall)
- Hole: Area2D node at the bottom for game over detection
Scenes Directory
Contains all
.tscn scene files and the ball script (co-located with ball.tscn)Scripts Directory
Standalone GDScript files, currently contains the player controller
Sprites Directory
All game assets including sprites, backgrounds, and the app icon
Export Configuration
Pre-configured Android export settings for APK generation
Asset Organization
The sprites directory contains 30+ files organized by category:Gameplay Sprites
- Bola.png: The game ball (circular sprite)
- Raquete.png: The player paddle sprite
Visual Elements
- Fundo1-6.png: Six background variations (4KB each)
- Asteroide1-6.png: Six asteroid decorations (~3.5KB each)
- icon.svg: Vector app icon
All PNG assets include
.import files generated by Godot’s import system for texture optimization.Resource Paths
Godot uses theres:// protocol for resource paths:
Build Output
The project includes pre-built Android APKs:- SpacePong.apk: Main Android package (24.3 MB)
- SpacePong.apk.idsig: APK signature file (198 KB)
File Organization Strategy
Scene Files
All scene files (
.tscn) are stored in the scenes/ directory. The ball script is co-located here.Scripts
Standalone scripts go in
scripts/. Scripts tightly coupled to scenes (like ball.gd) can be co-located.Assets
All visual assets are centralized in
sprites/, regardless of type (backgrounds, sprites, icons).Next Steps
Scenes
Explore the scene hierarchy and structure
Scripts
Learn about the GDScript implementation