Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valentin-laurent/collaborative-2048
POC of a collaborative 2048 online game
https://github.com/valentin-laurent/collaborative-2048
2048 game heroku python streamlit
Last synced: 14 days ago
JSON representation
POC of a collaborative 2048 online game
- Host: GitHub
- URL: https://github.com/valentin-laurent/collaborative-2048
- Owner: Valentin-Laurent
- Created: 2021-05-18T08:28:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-10T22:55:58.000Z (8 months ago)
- Last Synced: 2024-03-10T23:40:25.374Z (8 months ago)
- Topics: 2048, game, heroku, python, streamlit
- Language: Python
- Homepage:
- Size: 15.9 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
POC of an online collaborative 2048 (original game available [here](https://play.google.com/store/apps/details?id=com.ketchapp.play2048&hl=en_US&gl=US)), using Streamlit and Pandas for the graphical rendering, and pure Python for the game engine.The result is available [here](https://share.streamlit.io/valentin-laurent/Collaborative-2048/app.py) on Streamlit Cloud. A GitHub workflow is supposed to ping the app every day to keep it up and running, but it doesn't work.
This package also contains the required config files to deploy the game on Heroku.
# About the code
I used a hack for the Streamlit part, but I suspect that a much cleaner approach is now possible thanks to Streamlit *Session State* (`app.py` was implemented before its release). This [Streamlit reference repo](https://github.com/gmanchon/streamlit) provides an example [here](https://wagon-data-streamlit.herokuapp.com) of the use of *Session State*.The Python game engine is a pretty naive implementation, and was not designed to be computationally efficient. I would now approach this in a quite different way.