An exploration in game development with Go.
This project is based on the Just for Func Flappy Gopher videos which I highly recommend you watch first.
The game is not meant to be a game and never will be a game. However, I may add more features as long as I think it's fun.
If you don't have SDL2 libraries installed, install them with Homebrew like this:
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer pkg-config
(to get the sounds working, install sdl2_mixer
with --with-mpg123
).
(if you're not on mac OS and/or using Homebrew, refer to the Go bindings project for more details)
Get the Go bindings for SDL by running:
go get github.com/veandco/go-sdl2/sql
go get github.com/veandco/go-sdl2/ttf
go get github.com/veandco/go-sdl2/mix
go get github.com/veandco/go-sdl2/img
Build the game with go build
and run it with ./runny-jumpy-guy
.
Then run around and jump.
In the game you can tweak some of the physics:
- Gravity: Press
Q
to increase, pressA
to decrease. - JumpConstant Press
W
to increase, pressS
to decrease. - JumpIncrease (the force of the jump if you will) press
E
to increase, pressD
to decrease. - InitialJumpVelocity Press
R
to increase, pressF
to decrease.
Press ESC
to reset to defaults when the guy has jumped out of sight and you want him back.
Do whatever you will with the code.
The sprites are created by Jesse M. I highly encourage you to get them from the official source and support the artist (I did).
Sounds are from ZapSplat.
The font is made by Cody Boisclair.