Skip to main content

Quickstart Guide

Get Python Arcade Suite up and running on your local machine in just a few minutes. This guide will walk you through the essential steps to start playing games.
Prefer not to install? Try the live demo to play immediately in your browser!

Prerequisites

Before you begin, ensure you have:
  • Python 3.9 or higher installed on your system
  • Git for cloning the repository
  • pip for installing dependencies (comes with Python)

Quick Setup

1

Clone the Repository

Open your terminal and clone the Python Arcade Suite repository:
git clone https://github.com/YorberR/Python_Arcade.git
cd Python_Arcade
This downloads all game files and source code to your local machine.
2

Install Dependencies

Install the required Python packages using pip:
pip install -r requirements.txt
The only dependency is Streamlit, which handles the web interface and state management.
3

Run the Application

Start the Streamlit development server:
streamlit run streamlit_app.py
You should see output similar to:
You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.1.x:8501
The app will automatically open in your default browser.
4

Select and Play a Game

Once the app loads, you’ll see the game menu:
  1. Use the sidebar on the left to select a game:
    • Blackjack 🃏
    • Ahorcado (Hangman) 🔤
    • Piedra, Papel o Tijeras (Rock, Paper, Scissors) ✂️
  2. Click on a game to start playing immediately
  3. Use the “Juego Nuevo” button to restart any game
Your scores and game state persist as long as you keep the browser tab open!

How the App Works

Here’s a quick overview of the main application structure:
# streamlit_app.py - Main entry point
import streamlit as st
from blackjack import streamlit_game as blackjack
from Hangman import streamlit_game as hangman
from Rock_paper_or_scissors import streamlit_game as rps

def main():
    st.set_page_config(page_title="Menú de Juegos", page_icon="🎮")
    
    # Sidebar game selector
    game_choice = st.sidebar.selectbox(
        "Elige un juego",
        ("Inicio", "Blackjack", "Ahorcado", "Piedra, Papel o Tijeras")
    )
    
    # Route to selected game
    if game_choice == "Blackjack":
        blackjack.app()
    elif game_choice == "Ahorcado":
        hangman.app()
    elif game_choice == "Piedra, Papel o Tijeras":
        rps.app()
Each game module has its own app() function that handles:
  • Game initialization
  • Session state management
  • User interface rendering
  • Game logic and win/loss conditions

Playing the Games

Blackjack 🃏

1

Start a New Game

Click “Juego Nuevo” to deal initial cards (2 for you, 2 for the dealer)
2

Make Your Move

  • Hit: Draw another card (try to get closer to 21)
  • Stand: Keep your current hand and let the dealer play
3

Win or Lose

  • Get closer to 21 than the dealer without going over
  • If you exceed 21, you bust and lose immediately
  • Dealer must hit until reaching 17 or higher
Going over 21 results in an instant loss, even if the dealer would have busted too!

Hangman 🔤

1

Start Guessing

A random word is selected. Click letter buttons to guess.
2

Watch Your Attempts

You have 6 attempts. Each wrong guess adds to the hangman drawing.
3

Complete the Word

Guess all letters before running out of attempts to win!

Rock, Paper, Scissors ✂️

1

Choose Your Move

Click one of the three buttons: 🪨 Piedra, 📄 Papel, or ✂️ Tijera
2

See the Result

The computer’s choice is revealed instantly, and the winner is determined
3

Track Your Score

Your wins and losses are tracked throughout the session

Stopping the Application

To stop the Streamlit server:
  1. Go back to your terminal
  2. Press Ctrl + C
  3. The server will shut down gracefully

Troubleshooting

If you see an error about port 8501 being in use:
streamlit run streamlit_app.py --server.port 8502
This runs the app on port 8502 instead.
If you see ModuleNotFoundError: No module named 'streamlit':
pip install --upgrade streamlit
Make sure you’re using the correct Python environment.
Manually open your browser and navigate to:
http://localhost:8501

What’s Next?

Installation Guide

Learn about detailed setup options and configuration

Game Architecture

Understand how the games are structured

Deployment

Deploy your own version to Streamlit Cloud

Games Overview

Explore all available games
Pro tip: Keep the terminal window open while playing. Streamlit shows helpful debug information and automatically reloads when you modify the code!

Build docs developers (and LLMs) love