Thanks to visit codestin.com
Credit goes to github.com

Skip to content

adrian-fitsios/PDGToolkit

Repository files navigation

PDGToolkit - a Toolkit for Procedural Dungeon Generation

Cross platform, game-engine independant .Net Core 3 Application for procedurally generating 2D dungeons from a configuration file

Requirements

You can use either the latest version of Visual Studio, JetBrain's Rider or .NET CLI for Windows, Mac and Linux.

Getting started

Toolkit

From the root of this repository:

  1. Build the project into a directory of your liking

    dotnet publish ./src/PDGToolkitCLI/PDGToolkitCLI.csproj -c Debug --output <YOUR-PATH>
  2. From <YOUR-PATH>, use the runtime to run the CLI

    dotnet PDGToolkitCLI.dll

Note: The CLI takes additional options, to view them, add the '--help' flag while executing the CLI

./<YOUR-PATH>/PDGToolkitCLI

Canvas

From the src/PDGCanvas directory:

  1. Install node dependencies

    npm install
  2. Start the application

    npm run start
  3. View the generated dungeon

    With a web browser of your choice, navigate to http://localhost:3000

Schema UI

To view the schema of the dungeons that the Toolkit produces, build and run the PDGToolkitUI project.

From the root of this repository:

   dotnet run --project ./src/PDGToolkitSchemaUI/PDGToolkitSchemaUI.csproj

You should now be able to access the swagger page at http://localhost:1337/swagger/index.html

Unit tests

To run Core's unit test, use the dotnet test command.

From the root of this repository:

dotnet test ./tests/PDGToolkitCore.UnitTests/PDGToolkitCore.UnitTests.csproj

Schema overview

TileConfig

{
  "size": 0
}

Properties

Name Type Required Restrictions Description
size integer(int32) false read-only none

TileType

{
  "name": "string"
}

Properties

Name Type Required Restrictions Description
name string¦null false read-only none

Position

{
  "x": 0,
  "y": 0
}

Properties

Name Type Required Restrictions Description
x integer(int32) false read-only none
y integer(int32) false read-only none

Tile

{
  "type": {
    "name": "string"
  },
  "position": {
    "x": 0,
    "y": 0
  }
}

Properties

Name Type Required Restrictions Description
type TileType false none none
position Position false none none

Grid

{
  "height": 0,
  "width": 0,
  "tileConfig": {
    "size": 0
  },
  "tiles": [
    {
      "type": {
        "name": "string"
      },
      "position": {
        "x": 0,
        "y": 0
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
height integer(int32) false read-only none
width integer(int32) false read-only none
tileConfig TileConfig false none none
tiles [Tile]¦null false read-only none

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published