Closed aniketm32012 closed 1 year ago
You're probably loading the chunks incorrectly. Are you sure you're running the same code as on this repo?
Yes I copied the code from your GitHub rep
but you're saying episode 10 works?
Yes, it works. Using windows 11 python v- 3.9.
I am using intellij idea IDE, latest version.
i have created this repo for you to help by searching errors - https://github.com/aniketm32012/python-minecraft-clone-ep-11.
It's not exactly the same. Yours is missing the textures/mossy_cobblestone.png
file. You shouldn't be getting a blank window, but the following error message telling you this much:
Traceback (most recent call last):
File "/tmp/python-minecraft-clone-ep-11/main.py", line 164, in <module>
game = Game()
File "/tmp/python-minecraft-clone-ep-11/main.py", line 158, in __init__
self.window = Window(config = self.config, width = 800, height = 600, caption = "Minecraft clone", resizable = True, vsync = False)
File "/tmp/python-minecraft-clone-ep-11/main.py", line 29, in __init__
self.world = world.World()
File "/tmp/python-minecraft-clone-ep-11/world.py", line 63, in __init__
_block_type = block_type.Block_type(self.texture_manager, name, texture, model)
File "/tmp/python-minecraft-clone-ep-11/block_type.py", line 34, in __init__
texture_manager.add_texture(texture)
File "/tmp/python-minecraft-clone-ep-11/texture_manager.py", line 34, in add_texture
texture_image = pyglet.image.load(f"textures/{texture}.png").get_image_data()
File "/home/obiwac/.local/lib/python3.9/site-packages/pyglet/image/__init__.py", line 177, in load
file = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'textures/mossy_cobblestone.png'
That may simply be a mistake in uploading the files - I'd advise you to learn about using Github Desktop or similar - but I'm still unsure then of if you've actually cloned this repository and tried running episode-11
.
Thanks, let me rearrange everything.
I did not have that thanks bro.
the window opens up but with a blank window and there's not even a block in the window. the resize statement is printed but not the fps on. It started when I completed ep 11.