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.
Just keep in mind that updates will be released today and tomorrow for the extension. As of now, the latest release is v0.4.6. The next few updates will expose some functionality from the actual engine (sky color, FOV, player speed, etc.)
I’ve had bits and pieces of projects over the years, experimenting with allot of the components required to make an engine like this. So when I saw @SmolderDev 's code for heightmapping, I got really excited, since it’s a great way to add a floor and depth, which really transforms the normal Wolfenstein-esque raycaster.
Okay, I tested it a little yesterday, and here are my thoughts:
First and most important: pretty cool!
It would be nice if there was a way to change the sky color, unless I’m missing something.
Could you not use another tilemap to put floor textures on every tile?
The Distance Shading turns all of the floors 1 color down, which makes it hard to have the color you want.
The Distance Shading might benefit from being able to adjust it, like changing the distance it takes to shade.
I don’t know how this could possibly be fixed, but taking the height map and color map and then attempting to tile the right spots in the tilemap is really hard, expecially on bigger maps and more natural looking areas.