Web Rendering
The goal here is to propose a web interface to programme develloped on top of TiledLand. Considering that user are not necessary professional of interactive web technologies, we seek for simple but powerfull python-based solutions.
Why not classical GUI ? The main advantage of Web rendering is that, game/player server and the human interface can be 2 different machine and nothing need to be installed on the interactive device. The main inconveniant is the cost on computing ressources generated by client/server architecture.
For classical GUI (Graphic User Interface), you can see for tkinter, PyQt or PyGame. However, if you seak for performances, maibe search with another language (C + RayLib for instance...).
Quick overview:
- Streamlit - First tested solution. Verry simple to present animated data and add some classical button or other input. It find its limits with huge dashboard or complex interactions.
- Dash by plotly - Similar philosophy than Streamlit, i.e. orineted toward data visualization.
- Remi - For REMote Interface, more oriented as a Web GUI.
Streamlit :
Regarding tutorial, streamlit allows for interresting data visualisation and simple interaction. Test a first interactive program :
pip install streamlit
streamlit run example/web/streamlit-00-basic.py
The solution allows for custom HTML with a empty widget. Test scene rendering :
streamlit run example/web/streamlit-01-rendering.py.
However, it is not easy to get controle on a program loops, with interaction. For instance, streamlit relies on a session state dictionnary to keep varaible value from a iteration to another.
The alternative: https://plotly.com/examples/ seems better structures.
Remi :
Remi
pip install remi
python3 example/web/remi-00-basic.py