This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

MatheMagician presents ...



This is a demo of using z-sorting to draw 3d worlds. Move using the wasd keys and rotate with the mouse. This scenario uses two coloring methods: one in daylight and one at night where the only light is coming from you. You can toggle between methods by pressing "m". You can also remove blocks by clicking them minecraft style. z-sorting is explained well in this article While the article is designed for flash, it does a good job of explaining the technique.

It still needs some work in the way of collision detection, but the 3d is pretty good.

7604 views / 1635 in the last 7 days

27 votes | 0 in the last 7 days

Tags: mouse game simulation physics demo with-source 3d

This scenario is a member of: Minecraft-like Games

open in greenfoot
Your browser does not support the canvas tag.


you have GOT to improve on this idea!


this should have waaaaay more votes!


As you said "Ah! That would not be hard: the only difficulty would be in modeling a badguy to chase you." You should make one!
That's basically what my obj file reader is for. I am going to publish a first person shooter using this engine and the obj drawer.




Thanks, JetLennit!


I remember noticing this ages ago, but I can't remember if I ever commented to say that it's awesome :P If you fall through the floor, it crashes. Managed to make something fun out of that though:


Haha! That is awesome Duta. Yes, I know about the edge of the world bug. I never removed it because it was a simple way to know you are out of bounds.


Wow, this looks really cool. I downloaded it and started playing around with the generation, but I noticed something: There is no render limit. I liked the darkness setting which you get after you press M, but I decided to expand upon it. I added some variables for render distance so it still runs smoothly even after you have large 'maps' loaded. I tried adding block placement, but I've found it's sorta difficult to detect which face you're targeting and add a block there. That and I don't really understand the 3D code itself very much at all, XD. Still, this is a really awesome project, and you should expand upon it.
This is EPIC!

See all comments

Want to leave a comment? You must first log in.

Who likes this?

JavaForever Entity1037 PigPen DarkMageCkmario lordhershey Zamoht Rudy Artyoum SPower 8bitcarrotjuice JetLennit FlyingRabidUnicornPig Kartoffelbrot azazeel bourne Game/maniac -nic- Upupzealot Eli.A askgriff