Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual Environment
venv/
env/
ENV/
env.bak/
venv.bak/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# PyCharm
.idea/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# Environments
.env
.venv

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Project specific
*.log

73 changes: 49 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,44 @@ The API could contain functionality for the following:

## How to Run

```shell
pip install pyglet
git clone https://github.com/fogleman/Minecraft.git
cd Minecraft
python main.py
### Método Rápido (Recomendado)

```bash
./run.sh
```

O script `run.sh` criará automaticamente o ambiente virtual e instalará as dependências se necessário.

### Método Manual

1. Crie um ambiente virtual:
```bash
python3 -m venv venv
source venv/bin/activate # No Windows: venv\Scripts\activate
```

2. Instale as dependências:
```bash
pip install -r requirements.txt
```

3. Execute o jogo:
```bash
python3 main.py
```

## Requisitos

- Python 3.6 ou superior
- pyglet 1.5.31 (versão específica para compatibilidade com OpenGL fixed pipeline)
- OpenGL (geralmente já instalado no sistema)

## Notas Importantes

- Este projeto usa **pyglet 1.5.31** que suporta OpenGL fixed pipeline (glMatrixMode, gluPerspective, etc.)
- Versões mais novas do pyglet (2.x+) não são compatíveis pois usam OpenGL moderno
- O arquivo `requirements.txt` especifica a versão correta do pyglet

### Mac

On Mac OS X, you may have an issue with running Pyglet in 64-bit mode. Try running Python in 32-bit mode first:
Expand All @@ -59,12 +90,6 @@ defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
```

This assumes you are using the OS X default Python. Works on Lion 10.7 with the default Python 2.7, and may work on other versions too. Please raise an issue if not.

Or try Pyglet 1.2 alpha, which supports 64-bit mode:

```shell
pip install https://pyglet.googlecode.com/files/pyglet-1.2alpha1.tar.gz
```

### If you don't have pip or git

Expand All @@ -84,23 +109,23 @@ See the [wiki](https://github.com/fogleman/Minecraft/wiki) for this project to i

### Moving

- W: forward
- S: back
- A: strafe left
- D: strafe right
- Mouse: look around
- Space: jump
- Tab: toggle flying mode
- **W**: forward
- **S**: back
- **A**: strafe left
- **D**: strafe right
- **Mouse**: look around
- **Space**: jump
- **Tab**: toggle flying mode

### Building

- Selecting type of block to create:
- 1: brick
- 2: grass
- 3: sand
- Mouse left-click: remove block
- Mouse right-click: create block
- **1**: brick
- **2**: grass
- **3**: sand
- **Mouse left-click**: remove block
- **Mouse right-click**: create block

### Quitting

- ESC: release mouse, then close window
- **ESC**: release mouse, then close window
Binary file added assets/texturas/rochas.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading