fogleman / Minecraft

Simple Minecraft-inspired program using Python and Pyglet
MIT License
5.25k stars 1.24k forks source link

Python 3.5 not rendering all blocks #81

Closed tleeuwenburg closed 7 years ago

tleeuwenburg commented 7 years ago

After a quick run of 2to3 and fixing some float/int issues, this works great on my machine!

The main issue is that not all the blocks render correctly at first. I think the logic around what's exposed is NQR somehow. When I add a block, that works fine. If I remove a block, the adjacent ones become visibly. I'm happy to put some time into debugging this, but I thought maybe it would be work contributing to a Python 3 compatibility branch or something similar. I also thought that perhaps others had run across the issue before and might have some advice for me.

Is there interest in me working on Python 3 compatibility for a potential merge later, or should I continue to just noodle around on my own machine?

Cheers! :) -T

Crayder commented 7 years ago

After a quick run of 2to3 and fixing some float/int issues, this works great on my machine!

I suppose you mean the following:

#this (line 712):
x, y = self.width / 2, self.height / 2
#to:
x, y = self.width // 2, self.height // 2

I fixed that, and also had to replace all xrange with range. And now I'm having the same issue.

image

And when you break a block you get a small set of visible, neighboring blocks:

image


A 3.5 fix would be great! I've been trying to play with the code and find something useful, but no luck.

Crayder commented 7 years ago

SOLVED! It's so simple! It's just another line of / to // (in the sectorize function)... Kinda feel dumb for being stuck on this all last week...

progval commented 7 years ago

I made a fix here ;) https://github.com/fogleman/Minecraft/pull/34

Lewiscowles1986 commented 7 years ago

I haven't noticed a problem since the latest merge #34

Crayder commented 7 years ago

Well, I have apparently... Chunks of blocks are just disappearing.

image

Note that this doesn't happen when I only change all xrange to range and correct the division symbols. It's definitely something to do with the pull request.

tleeuwenburg commented 7 years ago

Seems to be working for me now following the latest merge. Great! :) ... Is there a backlog somewhere, maybe I'll pick up a feature...

tleeuwenburg commented 7 years ago

Hey, so it's silly, and it's not related to an issue. But I thought someone might get a giggle out of what I did. Here's a mandelbrot fractal in bricks... https://youtu.be/LQiqR8UOp9g

On 10 January 2017 at 12:56, Corey Iles notifications@github.com wrote:

Well, I have apparently... Chunks of blocks are just disappearing.

[image: image] https://cloud.githubusercontent.com/assets/9919010/21791002/ecbb8b46-d6ad-11e6-840a-f2f6a624f478.png

Note that this doesn't happen when I only change all xrange to range and correct the division symbols. It's definitely something to do with the pull request.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fogleman/Minecraft/issues/81#issuecomment-271464652, or mute the thread https://github.com/notifications/unsubscribe-auth/AADuGsEAkz2hhc__tYk5YN1pEMIce6uDks5rQuVRgaJpZM4Ldkte .

--

Tennessee Leeuwenburg http://myownhat.blogspot.com/ "Don't believe everything you think"