Skip to content

Zebaro24/Miner-2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miner-2D 🪨

Project Status Python Pygame

2D resource mining simulator with procedural world generation and multiplayer support. Explore, mine, and build in dynamically generated worlds with friends!


✨ Core Features

  • World Generation:
    • 🌍 Procedurally generated infinite worlds
    • ⛰️ Multiple block types with unique properties
  • Gameplay:
    • ⛏️ Resource mining and collection
    • 🎒 Inventory management system
    • 🗺️ Real-time terrain modification
  • Multiplayer:
    • 🌐 Client-server architecture
    • 👥 Real-time player synchronization
    • 🔄 Shared persistent world state

🧰 Tech Stack

  • Engine: Pygame
  • Networking: Python Sockets
  • Data Handling: Pickle
  • Concurrency: Threading

⚙️ Installation & Setup

  1. Clone repository

    git clone https://github.com/Zebaro24/Miner-2D.git
    cd Miner-2D
  2. Create virtual environment

    python -m venv venv
    # Windows
    venv\Scripts\activate
    # Linux/Mac
    source venv/bin/activate
  3. Install dependencies

    pip install pygame

🚀 Launching the Game

Starting the Server

python sockets/server.py

Default address: 127.0.0.1:12345

Launching Clients

python runner.py

Game Controls

  • Movement: WASD keys
  • Inventory: E key
  • Mining: Left mouse button
  • Building: Right mouse button
  • Camera: Mouse wheel zoom

🌐 Multiplayer Setup

  1. Start server on host machine
  2. Players launch game clients
  3. Connect using server IP:port format
  4. All world changes sync in real-time
  5. See other players mining and building

🗂️ Project Structure

blocks/
├── all_block.py        # Block type management
├── block.py            # Base block class
scenes/
├── inventory.py        # Inventory UI system
├── menu.py             # Game menus
├── miner_2d.py         # Core gameplay scene
sockets/
├── client.py           # Client networking
├── server.py           # Server backend
images/                 # Game textures
config.py               # Game settings
map_miner.py            # Procedural world generation
player.py               # Player controller
runner.py               # Main game executable

🎮 Gameplay Preview

Single Player Multiplayer
Solo Mining Team Play
Inventory Team Play

📬 Contacts

👨‍💻 Developer 📧 Email 💻 GitHub
Denys Shcherbatyi zebaro.work@gmail.com @Zebaro24
Dmitro Itsko cloud.me.fr@gmail.com @WhiteDh

About

⛏️ 2D mining sandbox with procedural world generation and multiplayer support. Mine resources, build structures, and explore infinite worlds with friends in real time.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages