3 ms·
It was somewhere between a sudoku solver and wave function collapse. Had to work out what tiles to use to accurately reproduce the slopes for rendering a Mario
by andrewingram 4y ago
It was somewhere between a sudoku solver and wave function collapse. Had to work out what tiles to use to accurately reproduce the slopes for rendering a Mario Maker 2 level. Most of the level tiles are just X/Y/TileID, but for slopes all you know is the start/end nodes. So you have to look at all the adjacent tiles to work out the correct TileID to use for each X/Y paid within the bounding box of the slope. But there's also ambiguity where there are multiple possible tiles with the same edge properties, so I had to work out the right priority/weighting to favour certain tiles over others.
I had to derive and then write out all the edges rules by hand, which was many hundreds of lines.