Skip to content

[Example] Generating a platformer level #25

@danbraik

Description

@danbraik

Hello,
thank you for this wonderful addon. After reading some of the discussion, I understood better how to use Precondition. It gave me the idea to use WFC as a better autotile feature than builtin one.
Moroever, the idea is to draw the shape of a platformer level and let WFC fill it. I had to use a special tile for the AIR since it is a 2D side view.
You can find the prototype project so everyone can learn from it. test-wfc.zip

So, the settings is:

  • we have a tileset with marked tile for the platform (grass, dirt) and tiles for the air (purple one and foliage decoration)
  • we have a sample map to explicitly teach how to connect platform tiles
  • we have a negative map to reject wrong combinations
  • we have a level tilemaplayer to draw the shape of the level
  • we have a special new class WFC2DPreconditionPlaftorm

Demo:

Level map:
image

Result in game:
image

Now I am just wondering if it will take more times to set the rules than actually and manually draw levels myself ;-)
Have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions