U3D Engine - Walls, Floors, Pillars, Textures, and More!

U3D: a 3D voxel heightmap engine for MakeCode Arcade



U3D is a raycasting engine that renders a 3D world from a heightmap and colormap image pair, with tilemap-based textured walls on top. It runs as an extension.

What it does:

  • Heightmap terrain with vertical scale and smooth camera stepping
  • DDA raycaster with perspective-correct wall texturing, distance shading, and a lava/floor texture layer
  • Billboard sprites with bob, velocity, bounce, scale, animations, and pathfinding to the player
  • Per-tile height overrides at runtime: lets you animate doors, moving floors, collapsing platforms without touching the tilemap
  • Height-based collision so those dynamic tiles actually block the player
  • spinAround for orbit-cam cutscenes
  • Block extension with full visual block support

This has been a long build. There were some genuinely tricky bugs along the way (perspective metric mismatch causing wall shear, texture clamp-stretch at close range, literally sooooo many others) that took real work to track down. Posting this partly because I think other people might find the heightmap+raycaster combination interesting, and partly to get feedback before I keep going.

Runs at 40-50+ FPS in the MakeCode simulator on my iMac 2019 (Intel i5, AMD Radeon 570X). Physical hardware performance will vary, though the engine has gone through several rounds of optimization specifically with hardware constraints in mind.

Demo Project - Boiler Lab:



Extension Link (v0.4.0+):



Sources

Raycasting 3D render -- Blocks Edition
Mode 7 Engine

14 Likes

YES! YOU MADE IT AN EXTENSION! Now I gotta finish mine and make a game with both.

3 Likes

why does that look so cool :sob:

4 Likes

Are we sure we are using the same game engine? Sure doesn’t feel like it…

4 Likes

Unique you are the goat @UnsignedArduino get this on awesome arcade right this instant

2 Likes

DROP EVERYTHING IM DOING THIS TODAY!

1 Like

wow how long did it take to make?

1 Like

YES! now we can make DOOM.

1 Like

Is this it? The 3D Renaissance? It has come…

1 Like

Might be releasing an AMAZING demo game for this soon so stay tuned. But this is fully usable right now so definitely give U3D a shot.