You are a crab on a sunny day at the beach. Suddenly, you feel a strong appetite for dead fish. Hence, you start looking around for delicious fish to devour. Easier said than done, since those nasty seagulls are strolling around here. Avoid getting eaten yourself by dodging the birds and eat as much fish as you can to make this a perfect day.
A simple 2D game built with Golang and Ebitengine.
- Ensure Go is installed on your system
- Download and extract or
git clonethis repositories content to your local machine - Navigate into your local repository directory (e.g. in the terminal) and run
go run main.go
- Use the arrow keys to move the crab left, right, up or down.
- For exiting the game, press the escape key.
A set of slides has been created for sharing knowledge gained from this project. See the slides folder and open the
html file in a browser to watch documented content. The actual slide content is maintained in a markdown file in the
same folder and converted using Marp CLI. Ensure that npx is installed
to run Marp if you want to convert from markdown to slides.
Subsequent commands can be used to covert slides from markdown to html format (assumes you are in the slides/ directory):
# Watch for changes to get continuous feedback on changes (open the resulting html file in a browser).
npx @marp-team/marp-cli@latest -w slides.md
# Or just convert to html output (other formats available too, see the Marp documentation):
npx @marp-team/marp-cli@latest slides.md -o slides.html
You should hear some audio effects while playing the gameI. f you don't hear any sounds while playing, check your audio output device and volume, make sure it is not muted. If it is still not working, and you are running on Linux, you may need to apply subsequent workaround to disable a problematic audio module. This worked for me, but please use it carefully at your own risk and revert it in case of any issues:
- Open following config file for editing:
/etc/modprobe.d/alsa-base.conf - Append an option to disable the possibly problematic module:
options snd-hda-intel model=auto blacklist snd_soc_avs
All source images are AI generated using the following sites:
- Retro Diffusion for generating pixel art images, especially animations.
- ideogram for general image generation, including some pixel art images.
- Go as the general programming language.
- Ebitengine for building a 2D game.
- GIMP for adapting images from source pictures.
- ffmpeg for adapting audio properties like sample size and volume.
- Marp for creating slides to document and present gained knowledge.
- Ensure fish does not spawn directly at crab location or in too near distance.
- Consider adding additional sound effects.
- Consider adding crabs that follow the players crab to make dodging more difficult over time.
- Consider adaption and deployment to other platforms (e.g. web, mobile) and touch / gamepad support for testing.
- Consider static objects that cannot be walked through as additional difficulty.
- Consider a win condition, e.g. when max level has been reached or a max score.