Home

Pgolf

Pgolf is a browser-based puzzle sports game that combines golf with programming challenges. In Pgolf, players solve levels by scripting small control routines to guide a golf ball from tee to hole across varied terrain, wind, and obstacles. The project began as an educational concept to teach logic, optimization, and basic physics through play and was later released as a standalone title with an active level-creator community.

Levels present constraints such as a limited command set, a cap on shot strength, or requirements to

Pgolf supports desktop and mobile browsers and offers a built-in editor, plus export options for shareable

Reviewers have praised Pgolf for combining abstract problem solving with a tactile sports mechanic, making it

See also: Code golf, programming games, physics puzzle games, browser-based games.

minimize
code
length.
Players
write
code
in
a
light
domain-specific
language
or
a
chosen
scripting
language
to
set
target
direction,
apply
force,
and
adjust
for
wind
and
spin.
A
physics
engine
simulates
the
ball's
trajectory,
collisions
with
terrain,
and
interactions
with
obstacles.
Successful
runs
are
judged
by
par,
stroke
count,
and,
in
some
cases,
script
size
or
run
time.
level
designs.
It
uses
a
2D
physics
library
to
approximate
golf
physics
and
supports
multiple
languages
to
attract
a
broader
audience.
Community
makers
can
publish
levels
that
integrate
new
terrain
types,
obstacles,
and
seasonal
themes.
useful
in
classrooms
and
programming
clubs.
Critics
note
a
steep
learning
curve
for
players
new
to
scripting
and
a
potential
mismatch
between
code
elegance
and
playability
in
some
levels.
The
game
has
inspired
tutorials,
reference
implementations,
and
a
modest
ecosystem
of
user-made
content.