⚠️ DISCLAIMER: This is an unofficial fan project and is NOT affiliated with, endorsed by, or connected to Mojang Studios or Microsoft. All block textures and sound effects must be sourced by the user from their own Minecraft installation (version 1.21.1+). Minecraft® is a registered trademark of Mojang Synergies AB.
An isometric 2.5D creative sandbox inspired by voxel building games. Build structures, explore dimensions, and place blocks in this Pygame-powered building simulator.
Bloc Fantôme is a creative building sandbox that brings the essence of voxel-based block-placing into a clean, isometric 2.5D perspective. Built entirely in Python with Pygame, this simulator allows users to place blocks onto a grid-based canvas, construct structures, and explore different dimensions. Users must provide their own textures and sounds from a legitimate Minecraft installation (version 1.21.1 or later).
The project serves as both a creative tool for designing and visualizing Minecraft-style builds and a technical demonstration of isometric rendering, sprite management, and interactive GUI design in Python. Every block placement triggers authentic sounds with 3D positional audio. Volume fades with distance, and stereo panning shifts based on where the block is placed on screen.
The world remembers every block you place.
Goal: Provide an accessible, lightweight building sandbox where users can experiment with block placement, load pre-made structures, and explore the creative possibilities of voxel-based construction without the overhead of a full 3D engine.
Some doors, once opened, cannot be closed.
The core experience revolves around intuitive block placement on an isometric grid. A ghost preview shows exactly where your block will land before you commit, and an unlimited undo/redo system (Ctrl+Z / Ctrl+Y) ensures you can always fix mistakes. Or undo them one hundred times over if needed.
Building tools include adjustable brush sizes (1×1, 2×2, 3×3) for rapid construction, a fill tool for quickly covering large areas, and mirror mode for perfectly symmetrical builds. All saves are automatically compressed and backed up, so your creations are never lost.
...and some features that found their way in on their own.
Over 100 authentic Minecraft blocks organized into expandable categories. Water, lava, fire, and portals feature real-time animations that bring your builds to life.
| Category | Examples |
|---|---|
| Natural | Grass, Dirt, Stone, Sand, Gravel, Snow, Ice |
| Wood | Oak, Birch, Spruce, Dark Oak, Acacia, Jungle |
| Ores | Coal, Iron, Gold, Diamond, Emerald, Lapis, Redstone |
| Nether | Netherrack, Soul Sand, Blackstone, Basalt, Ancient Debris |
| End | End Stone, Purpur, Obsidian |
| Decorative | Glass, Wool (16 colors), Concrete, Terracotta |
| Interactive | Doors, Stairs, Slabs, Chests |
| Liquids | Water, Lava (with flow simulation) |
# Stairs can be rotated to face different directions
if event.key == K_r:
rotate_stair_facing() # Cycles: North → East → South → West
# Slabs can be flipped between top and bottom position
if event.key == K_f:
flip_slab_position() # Toggles: Bottom ↔ Top
# Doors can be opened and closed with right-click
if right_click_on_door:
toggle_door_state() # Swings open/closed with soundInstantly place complete structures: houses, towers, trees, portals, temples, and more. Load bastion remnants from the Nether or end city towers from the void. The structures panel lets you preview each build before placing it in your world.
. . .
Have we met before?
You look familiar.
No, that's not right.
I would remember a face like yours.
Wouldn't I?
. . .
A comprehensive tutorial guides users through all features, from basic block placement to advanced tools like mirror mode and dimension switching. Each step demonstrates concepts hands-on with example structures you can interact with immediately.
The tutorial will always be here for you. Always.
Three distinct dimensions await, each transforming your building canvas with unique floor textures, ambient soundscapes, and atmospheric music. Switching dimensions does not just change the scenery. It transports you to an entirely different realm with its own character and mood.
The default dimension greets you with familiar grass-covered ground and the gentle sounds of a calm meadow. Peaceful piano melodies drift in the background as you build under open skies. This is home. Comfortable. Safe. Full of creative possibility.
Step through the portal and the world transforms. Netherrack stretches beneath your feet, cracked and ancient. The air fills with deep, ominous rumbling: the sound of a realm that exists in eternal twilight between fire and shadow. Crimson forests and warped fungal growths dot the landscape, their bioluminescent glow cutting through the perpetual haze. Here you will find soul sand valleys, bastions of blackstone, and rivers of flowing lava that illuminate the darkness with their molten glow. The music shifts to something darker, more primal. Drums echo in the deep.
Journey to the edge of existence itself. End stone forms an alien landscape floating in an infinite void, its pale yellow surface stark against the absolute darkness that surrounds it. The atmosphere here is different. Ethereal. Empty. Unsettling. Distant, haunting tones drift through the emptiness, and the purple-tinged sky holds no stars, no sun, no moon. End cities rise from the void, their purpur spires reaching toward nothing. This is a place of endings, where the familiar rules of the world no longer apply.
The sky knows when you are watching.
Weather transforms your world from static canvas into something alive. The system simulates atmospheric effects that respond to the space around them, creating moments of beauty and drama. Or something else entirely.
Rain arrives without warning. First a whisper. Then a downpour. Each raindrop is individually simulated, falling at slightly different speeds and angles. As drops strike the ground, they burst into tiny splash particles that fade naturally. The intensity ebbs and flows over time. Sometimes lightening to a drizzle. Other times intensifying into a driving storm.
You did not ask for thunder.
Lightning strikes illuminate your entire build in a flash of white. The bolts themselves are procedurally generated, branching and forking as they arc from sky to ground. During storms, the sky darkens gradually, casting your world in moody shadow. The shadows remember their shapes.
Snow brings a gentler atmosphere. Delicate flakes drift downward with realistic physics, swaying side to side as they fall. The effect is constrained to your building platform, creating a cozy snow globe effect around your creations. Inside looking out. Or outside looking in?
Clouds drift lazily overhead when enabled, their parallax movement creating depth against the sky. Multiple layers at different altitudes move at different speeds. They are patient.
The lighting system adds depth and atmosphere through dynamic illumination. Light-emitting blocks cast a warm glow that propagates outward, falling off naturally with distance. Place a glowstone and watch as nearby blocks brighten; surround it with walls and observe how light fills the interior space.
Multiple light sources interact realistically, their influences combining to create nuanced illumination. A room lit by sea lanterns feels different from one lit by shroomlight. Each source has its own color temperature and intensity. Magma blocks provide dim, ominous underglow, while jack-o'-lanterns cast their carved grins in warm orange light.
The day/night cycle brings its own lighting drama. The sun traces a smooth arc across the sky, its position determining the overall brightness of your world. As dusk approaches, colors shift toward warm oranges and purples. Night brings darkness, punctuated only by starlight and whatever artificial illumination you've placed. Stars twinkle overhead, their brightness fluctuating gently, and the moon cycles through eight distinct phases just as it does in the real Minecraft.
# Light-emitting blocks and their intensities
GLOWSTONE: lightLevel = 15 # Maximum brightness
SEA_LANTERN: lightLevel = 15 # Cool, even glow
JACK_O_LANTERN: lightLevel = 15 # Warm, flickering
SHROOMLIGHT: lightLevel = 15 # Organic luminescence
MAGMA_BLOCK: lightLevel = 3 # Dim, dangerous glow
LAVA: lightLevel = 15 # Molten brillianceWater and lava behave as true fluids, flowing and spreading according to the same rules that govern them in Minecraft itself. Place a water source and watch it cascade downward, filling available space, spreading horizontally across flat surfaces, and tumbling over edges to continue its descent.
The flow simulation tracks liquid levels from 1 to 8, where 8 represents a source block and lower values indicate flowing liquid at various distances from the source. Water spreads quickly, seeking the lowest available path with each simulation tick. Lava moves six times slower, its molten viscosity creating a more ponderous, threatening spread.
When water meets lava, the interaction produces obsidian or cobblestone depending on the circumstances: source lava becomes obsidian, while flowing lava hardens to cobblestone. These interactions are accompanied by the satisfying hiss of rapidly cooling stone.
def update_liquid_flow(liquid_type, position):
"""
Simulate liquid spread from a source block.
Water flows every 400ms, lava every 2400ms (6x slower).
"""
current_level = get_liquid_level(position)
# Flow downward first (gravity)
if can_flow_to(position.below()):
spread_liquid(position.below(), level=current_level)
# Then spread horizontally with decreasing level
for neighbor in horizontal_neighbors(position):
if can_flow_to(neighbor) and current_level > 1:
spread_liquid(neighbor, level=current_level - 1)The liquid simulation runs continuously in the background, so you can place a water source at the top of a staircase and watch it tumble down step by step, or create lava falls that slowly creep toward your structures. Liquid flow can be toggled on and off if you prefer static water features.
. . .
L'eau sait où elle veut aller.
Elle trouve toujours un chemin vers le bas.
Tu peux essayer de l'arrêter.
Construire des murs. Placer des blocs.
Elle attendra.
Elle a toujours attendu.
. . .
The simulator employs a 2:1 dimetric projection, the standard for pixel-art isometric games. World coordinates
where
The inverse mapping for screen-to-world picking requires solving the underdetermined system. Given screen coordinates
def world_to_screen(grid_x, grid_y, grid_z):
"""Convert 3D world coordinates to 2D isometric screen position"""
screen_x = (grid_x - grid_y) * (TILE_WIDTH // 2) + offset_x
screen_y = (grid_x + grid_y) * (TILE_HEIGHT // 2) - grid_z * BLOCK_HEIGHT + offset_y
return screen_x, screen_yBlocks are rendered back-to-front using the Painter's Algorithm. For blocks at positions
This defines a total preorder on the block set
For a block at position
def render_world():
"""Render all blocks in correct depth order"""
blocks_to_draw = []
for (x, y, z), block_type in world.blocks.items():
sort_key = x + y + z # Isometric depth
blocks_to_draw.append((sort_key, x, y, z, block_type))
blocks_to_draw.sort(key=lambda b: b[0]) # Furthest first
for _, x, y, z, block_type in blocks_to_draw:
draw_block(x, y, z, block_type)The world state is a partial function
Block operations define a group action on world states:
The undo/redo system maintains a history stack
class World:
def __init__(self, width, depth, height):
self.blocks = {} # (x, y, z) → BlockType
self.properties = {} # Special block states (doors, stairs, slabs)
self.liquidLevels = {} # Liquid level tracking (1-8)Liquid flow follows a discrete diffusion model. Let
where
Light propagates via breadth-first flood fill from emissive sources. For a light source at
where
| Input | Action |
|---|---|
| Left Click | Place block |
| Right Click | Remove / Interact |
| Middle Mouse | Pan camera |
| Scroll | Zoom |
| WASD | Move camera |
| Q / E | Rotate view |
| R | Rotate stairs |
| F | Flip slab / Fill mode |
| B | Brush size |
| M | Mirror mode |
| Ctrl+Z/Y | Undo / Redo |
| Ctrl+S/O | Save / Load |
# 1. Install dependencies
pip install pygame
# 2. Setup assets (requires Minecraft 1.21.1+ installed)
cd Code
python setup_assets.py
# 3. Run
python blocFantome.py
# 4. Build!
# Left-click to place, right-click to remove
# Select blocks from the right panelNote: You must own a legitimate copy of Minecraft Java Edition and have it installed to use this application. The setup script will extract textures and sounds from your local installation.
This project would not be possible without:
- Mojang Studios for creating Minecraft, whose assets this project is designed to work with
- Minecraft Wiki for comprehensive documentation
- Pygame Community for the excellent 2D game framework
- ...and to those who watch from beyond the render distance
Note
This simulator requires assets from your own Minecraft installation. Please support the official game at minecraft.net.
Author: Jeffrey Morais
???
The gallery is quiet now.
You have viewed all the paintings.
. . .
Merci de votre visite.
Revenez bientôt.
Édition Miette















