How joaoparis/go-pong works
go-pong is a local two-player Pong game built on Ebiten. The documented workflow is to launch into a menu, select Local Game, then play; the menu also exposes host and join choices, but the sampled handlers are placeholders. The sampled code confirms game initialization, state dispatch, menu rendering, and ball/player setup. The playing-state source was not sampled, so gameplay update and draw wiring is not inferred.
Main entry points: game.go Game Engine · app.go App Setup · lobby_state.go Lobby State · engine.go State Dispatch
Components 12
Launch and Menu
- Program Entry
main.go - App Setup
internal/app/app.go - Lobby State
internal/game/lobby_state.go
Game State
- Game Engine
internal/game/game.go - State Dispatch
internal/game/engine.go - Playing State
internal/game/playing_state.go - Ball Physics
internal/game/ball.go - Paddles
internal/game/player.go - Game Types
internal/types/types.go
Rendering
- Menu Drawing
internal/text_draw/text_draw.go
Other components
- Player
- Ebiten Runtime
Connections 15
- Player → Ebiten Runtime: uses controls
- Program Entry → App Setup: starts app
- App Setup → Game Engine: creates game
- App Setup → Lobby State: sets initial state
- App Setup → Ebiten Runtime: runs game
- Ebiten Runtime → State Dispatch: calls callbacks
- State Dispatch → Game Engine: dispatches state
- Game Engine → Playing State: starts play
- Game Engine → Ball Physics: initializes
- Game Engine → Paddles: initializes
- Game Engine → Game Types: uses game screen
- Lobby State → Player: reads menu keys
- Lobby State → Game Engine: starts local game
- Lobby State → Menu Drawing: draws menu
- Menu Drawing → Ebiten Runtime: draws text