Main code base is taken from Adrian (Ork Slayer Gamedev):
check out his great YT tutorials!
Play online - no installation needed 🚀
- transparent sprites (player)
- automatic/procedural map generation (simple patch system with some randomization)
- several enemies with different weapons (no sprites yet)
- map scrolling
- fog of war
- simple collision detection (only grassland is walkable)
- runs in desktop and in web browser as well (thanks to pygbag lib)
- enemy sprites
- touchscreen controls
- custom pygbag template
- fix fullscreen mode Web browser ([f] key)
# create venv
python -m venv .venv
# activate venv
source .venv/bin/activate # on Linux/MacOS
# or
.venv\Scripts\activate # on Windows
# install packages
pip install -r requirements.txt
Desktop mode:
cd game
python main.py
Browser mode:
# from top level project folder
pygbag game
open http://localhost:8000/ in browser
use http://localhost:8000#debug to show terminal in browser - useful for troubleshooting
To itch.io
full instruction here
pygbag --archive game
upload build/web.zip to itch.io
full instruction here