2024 • Project
Golf Game — Functional Golf (Ruby + Gosu)
Tile-based golf with deterministic physics, sounds, and level loader.
- Ruby
- Gosu
- Functional Programming
- GUI
- Documentation
Problem
Model golf mechanics and surfaces with pure functions; keep rendering/IO at the edges.
Approach
- Immutable State struct + reducer(step): state → state; inputs/events are pure.
- Tile system from external files (levels.txt, tile_traits.txt); surfaces change bounce/roll physics.
- Configurable surface physics allowing custom bounce and roll profiles per tile type.
- Resolution-aware rendering; Wind and obstacle effects parameterised for easy level designer tuning.
Outcomes
- Level designers can create and test new maps without modifying code.
- End to end game experience with configurable physics and levels.