This repository contains a collection of mini-games implemented in various programming languages. The purpose of this repository is to provide examples of simple game implementations and to serve as a learning resource for those interested in game development.
- 3D Effect Game (Python)
- Arrow Key Beep (C#)
- Breakout (Python)
- Connect5 (Python)
- Crossword Puzzle Generator (Python)
- Logic Gates Simulator (HTML/CSS)
- OpenGL 3D Game (Python)
- Pacman (Python)
- Ping Pong (Python)
- Tetris (HTML/JavaScript)
- Ensure you have Python and Pygame installed.
- Run the
3d_game.py
script using Python.
- Open the
arrow-key.cs
file in a C# development environment (e.g., Visual Studio). - Compile and run the program.
- Ensure you have Python and Pygame installed.
- Run the
breakout.py
script using Python.
- Ensure you have Python and NumPy installed.
- Run the
import numpy as np.py
script using Python.
- Ensure you have Python installed.
- Run the
crossword_puzzle_generator.py
script using Python.
- Open the
logic_gates.html
file in a web browser.
- Ensure you have Python, Pygame, and PyOpenGL installed.
- Run the
opengl_python_game.py
script using Python.
- Ensure you have Python and Pygame installed.
- Run the
pacman.py
script using Python.
- Ensure you have Python and Pygame installed.
- Run the
ping_pong.py
script using Python.
- Open the
tetris-game.html
file in a web browser.
Contributions are welcome! If you have a mini-game you'd like to add or improvements to existing games, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your forked repository.
- Create a pull request to merge your changes into the main repository.
Please ensure your code follows the existing style and includes comments where necessary.
To build a Python executable, you can use tools like PyInstaller, cx_Freeze, or Py2exe. These tools package your Python script into a standalone executable that can be run on systems without requiring Python to be installed. Here's how you can do it using PyInstaller, one of the most popular options:
First, ensure PyInstaller is installed. Open your terminal or command prompt and run:
pip install pyinstaller
Change to the directory containing your Python script. For example:
cd path/to/your/script
Run PyInstaller with the desired options. The simplest command is:
pyinstaller your_script.py
This creates a folder named dist
containing the executable.
You can customize how the executable is built by adding flags:
- Single File Executable: Create a single file instead of a folder:
pyinstaller --onefile your_script.py
- Add an Icon: Specify an icon file for your executable:
pyinstaller --onefile --icon=your_icon.ico your_script.py
- Hide the Console (for GUI apps): Prevent the console from opening when the executable is run:
pyinstaller --onefile --noconsole your_script.py
After running PyInstaller, your executable will be in the dist
folder. For example:
dist/
your_script.exe
Run the generated .exe
file to ensure it works as expected.
- Cross-Platform: PyInstaller needs to be run on the same platform you are targeting (e.g., run it on Windows to generate a Windows executable).
- Dependencies: Ensure all required dependencies are installed in your Python environment.
- Executable Size: The size of the executable can be large because Python runtime and dependencies are bundled in.
pyinstaller --onefile --noconsole --icon=myicon.ico myscript.py
This creates a single-file executable with a custom icon and hides the console.