Categories > Board > rex_maze_gen

Introduction

Generate random maze asynchronously.

Reference: rot.js

Links


Categories > Board > rex_maze_genIntroductionLinksDependenceUsageGenerate mazeSave & load

Dependence

None

Usage

Generate maze

CompletedAction:GenerateGenerating...Condition:Is generatingCondition:On completedExpression:MapWidthExpression:MapHeight Expression:ValueAtCondition:Is a wall

Sample capx

  1. Action:Generate

  2. Generating in webworker

    • Action:Cancel
  3. Trigger Condition:On completed when completed

    • Map size

      • Expression:MapWidth, Expression:MapHeight
    • Cell symbol

      • Expression:ValueAt

        • 0 : empty space,
        • 1 : wall
        • -1 : not in map
      • Condition:Is a wall, returns true if a tile is a wall (or an empty space)

      • Expression:MapAsJson

    • A possible solution to create map


Save & load

It supports official saving & loading feature.