import streamlit as st from streamlit.components.v1 import html import random import string # Set Streamlit to wide mode st.set_page_config(layout="wide") # Define the enhanced HTML content with Three.js game game_html = """ Galaxxon - Enhanced Arcade Game
Score: 0 | Multiplier: 1x | Time: 0s
Lives: 5
""" # Streamlit app with sidebar for title and instructions with st.sidebar: st.title("Galaxxon - Enhanced Arcade Game") st.write("**Controls:**") st.write("- Use WASD or Arrow Keys to move") st.write("- Spacebar to shoot") st.write("**Objective:**") st.write("- Crash into buildings for bonus points") st.write("- Destroy enemies and avoid their bullets") # Render the HTML game full-screen html(game_html, height=1000, width=2000, scrolling=False) st.write("Note: The game runs in your browser. Ensure you have an internet connection for Three.js to load.")