Minecraft style terrain generation (new issues)

What about changes to the chunks, which are not near the player? Let’s say player places a TNT, moves away and the detonates it. That would add a new level of complexity. Also, with this method as you said you’d need to redraw every chunk player gets close too. So instead of regenerating chunks just when changes happen, you regenerate chunks when nothing changes at all. With my method you’d only need to redraw chunks, which are altered in some way doesn’t matter how far from the player that change occurs.

Hmmm, you do make a good point and I hadn’t thought about it like that previously. Time to do a bit more playing around. :slight_smile:

Awesome, I used the example from the Panda manual (since that’s what yours was based off of), though now I need to go back and figure out how to do the texture. Anyway, I am getting about 60fps consistently when I have generated a world that is 30x30x10 (or nine chunks of 10x10x10).

It was worth the effort!

Yeah, if you turn off vsync you’ll probably get few hundred or more. For textures just use different UV offset for faces depending on the type of a block.

Looking at how to use the offset…I see this in the other minecraft generator example:

        if id == 1:
            self.texcoord.addData2f(0.0, 1.0)
            self.texcoord.addData2f(0.0, 0.0)
            self.texcoord.addData2f(0.5, 0.0)
            self.texcoord.addData2f(0.5, 1.0)
        elif id == 2:
            self.texcoord.addData2f(0.5, 1.0)
            self.texcoord.addData2f(0.5, 0.0)
            self.texcoord.addData2f(1.0, 0.0)
            self.texcoord.addData2f(1.0, 1.0)

Uh…is that the percent of the image to use? Is there a way to use pixel values instead?