Skip to content
Attention ! Verglas cover

Video game

Attention ! Verglas

December 17, 2022
Puzzle

About

An ice puzzle generator inspired by the Ice Path (and other similar locations) from the Pokémon Gold and Silver games. The goal is to move the small slime from its starting point to the hole to fall down to the next level. However, once you start moving in a direction you cannot stop until hitting a wall or landing on a snow patch. Controls Arrow keys, swiping a direction (on mobile) - move the slime around Clicking the snow patch button (on the left) - reset the level Clicking the hole button (on the right) - solves the level automatically Level generation Here is the procedure used to generate levels: On an empty 12 by 12 grid, rocks are placed at random until at most 40% of all tiles are coveredA starting point is chosen at randomAll tiles reachable from this starting point are listed, and the furthest one gets changed into a snow patchThis step is repeated until the path to the furthest tile no longer increases in sizeThe furthest tile from the starting point gets changed into a hole, to mark it as the goal of the levelThe whole map is then scanned tile by tile 5 times, applying a cleanup and a clutter procedure at each stepThe cleanup procedure changes a rock or a snow patch to an ice tile if doing so does not decrease the length of the shortest solution; useless tiles are left in with a 40% random chance for aesthetic purposes and to confuse the playerThe clutter procedure changes a tile into a rock if doing so increases the length of the shortest solutionIf the shortest solution takes lower than 7 moves, the whole generation process is restarted from the first step up to 5 times, at which point the algorithm gives up Notes on the generation procedure Most if not all of the values mentioned in the generation procedure could be altered to try and influence the length of the solutionWhile the generation succeeds most of the time, it is not guaranteed to do so (and I did manage to make it fail at least one)There is currently no safeguard against locking the player in an unwinnable stateFocusing on the longest path tends to produce levels "on a railroad", where the next step feels fairly obvious if not forced entirely. Intentionally not targeting the "longest-shortest solution" as the level goal could help with mitigating this issueHaving multiple "hidden goals" as additional constraints during the generation might help to keep the level more "explorable"Adding multiple starting and end points could be done to help integrate the generated level into a bigger cave or dungeon for a fully-featured game

System requirements

System requirements for this game aren't available yet — check back soon.

Related games