import streamlit as st
import base64
st.set_page_config(layout="wide", page_title="Game Dev and 3D Showcase")
st.title("Game Development and 3D Content Showcase")
# HTML5 Game
st.header("HTML5 Game")
html5_game = """
"""
st.components.v1.html(html5_game, height=350)
# Mad Lib Generator
st.header("Mad Lib Generator")
templates = [
"The {adjective} {noun} {verb} over the {adjective} {noun}.",
"In a {adjective} land, a {noun} and a {noun} went on a {adjective} adventure.",
"The {noun} {verb} {adverb} while the {adjective} {noun} watched in amazement."
]
parts_of_speech = {
"adjective": ["brave", "mysterious", "colorful", "gigantic", "tiny"],
"noun": ["wizard", "dragon", "knight", "castle", "forest"],
"verb": ["flew", "danced", "sang", "fought", "explored"],
"adverb": ["quickly", "silently", "gracefully", "fiercely", "carefully"]
}
def generate_mad_lib():
import random
template = random.choice(templates)
for part in parts_of_speech:
while "{" + part + "}" in template:
template = template.replace("{" + part + "}", random.choice(parts_of_speech[part]), 1)
return template
if st.button("Generate Mad Lib"):
st.write(generate_mad_lib())
# A-Frame 3D Scene
st.header("A-Frame 3D Scene")
aframe_scene = """