GithubHelp home page GithubHelp logo

n3rdium / pycraft Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 2.0 33.91 MB

A Minecraft clone written in python and glfw/OpenGL.

License: MIT License

Python 100.00%
minecraft python opengl game-development

pycraft's Introduction

🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧

This game is undergoing a major remake and will be 'unplayable' for some time.

🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧

DeepSource DeepSource Hits Contribs Repo Size Lines of code Downloads issues Discussions license commits
social social social Open Source Helpers

A Minecraft clone written in python.

Controls

Move Forward  : W
Move Left     : A
Move Backward : S
Move Right    : D
Lock mouse    : E
Jump          : Space
Sprint        : Ctrl
Crouch        : Shift
Break Block   : Left Click
Place Block   : Right Click
Change Block  : Scroll

Running PyCraft

To run PyCraft, run the following code:
git clone https://github.com/n3rdium/PyCraft.git
cd PyCraft
python launch.py
(assuming that you already have git and python installed)

Known issues

  • Please let us know if you find any.

pycraft's People

Contributors

n3rdium avatar deepsource-autofix[bot] avatar allcontributors[bot] avatar genius398 avatar imgbotapp avatar devaanshpathak avatar lolkh avatar deepsourcebot avatar ashishagarwal2023 avatar

Stargazers

 avatar  avatar colombo avatar  avatar xuegoo avatar C_Corp2002 avatar Golden Mumanikidzwa avatar  avatar Anand avatar Tarunav BA ⚑ avatar New Dragon Warrior avatar Automi avatar Chiantine P. Manigos avatar Tarek MESSAOUDI avatar Roman Hossain Shaon avatar Γ‰rik Freitas avatar Gabriel Mendes de Campos avatar

Watchers

 avatar  avatar Gabriel Mendes de Campos avatar

pycraft's Issues

The Framerate of the game drops tremendously as the number of chunks increases.

The game's framerate deteriorates as we go further exploring the world.

Steps to reproduce the behavior:

  1. Run the game
  2. Move around a lot in one direction, allow many chunks to form.

Expected behavior
The game should run smoothly even when we go further into the world.

Solution
We need to remove chunks which are too far away from the memory, maybe even create a separate renderer for each chunk.

The game hangs while loading chunks.

Describe the bug
The FPS meter goes lower than 1.0 while loading chunks.

To Reproduce
Steps to reproduce the behavior:

  1. Run the code.
  2. Wait, and keep checking the FPS meter on the bottom left.

Expected behavior
We need to add multiprocessing or threading for efficiency.

Desktop

  • OS: Windows 10
  • NVIDIA GTX Graphics card: 2GB
  • Processor: intel 11th gen i5: six cores
  • 8GB RAM

Texture remake?

The game textures currently are AWFUL. We need better textures for the game. Anyone who is good with textures can open a PR with new textures. Please note that the textures should be 16x16 pixel PNGs.

Block shading overlay

Currently, PyCraft has plain textured blocks. We need to add some kind of shader, or a translucent overlay for shading blocks. We also need to add a new Lighting class in terrain/, which will store all the block shading values when the game is running. The shading value of a face depends on the lighting values of the nearby coordinates.

Add cross platform support

Right now, PyCraft only runs on Windows. We need to make it cross-platform. As @cixtor has pointed out in #54, the game doesn't run on MacOS. We need to add a cross-platform dep installer.

How to execute script?

So, whether I want to contribute, before contributing please make a dep installer (dependinces installer) so we can execute your scripts. After that, If possible, I will contribute. Please help!

Dep installer for packages

Suggestion on how to fix the game lagging while displaying chunks

Hi, I saw on the README that you pointed out the game freezes while loading chunks.

What I think you should do is add a render distance feature. If you've played Minecraft, you would know that there is a value
called render_distance that basically detect the player's position in the world, and then renders a certain number of chunks so that the game does not lag. Else, if the world is infinitely generated, and the render distance is set to infinite (as it is now), it could cause the game to freeze like anything or even crash the game. Please implement this feature so that the game runs as expected.

Thanks,
@Adatta1276

The following packages do not install with dep_installer.bat

Deps are the following - glfw , PyOpenGL , pillow , pygame

Suggested fix -
add the following code

python -m pip install --upgrade glfw
python -m pip install --upgrade PyOpenGL
python -m pip install --upgrade pillow
python -m pip install --upgrade pygame

import pyglet, i already import in conda, where else?

Traceback (most recent call last):
File "C:\Users\pdv\PyCraft_main_.py", line 1, in
import pyglet
ModuleNotFoundError: No module named 'pyglet'

I already install pyglet in my conda env. what else i do to play the game?

  • OS: windows 10
  • Browser chrome
  • Version v94

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.