Skip to content

v0.1.X Readme

Kasugaccho edited this page Apr 30, 2019 · 1 revision

Dungeon Template Library (DTL)

slack

DTL

DTL (Dungeon Template Library)

>> Japanese

Overview

Matrix Type

Main Code

using dungeon_t = std::uint_fast8_t;
constexpr std::size_t x_size{ 12 };
constexpr std::size_t y_size{ 8 };

STL Matrix stl_matrix

no_default_array std_array std_bitset std_vector std_deque no_std_unique__ptr

Required Class Function: operator[] size
std::array<std::array<dungeon_t, x_size>, y_size> dungeon_stl_matrix{ {} };

Default Matrix default_matrix

default_array std_array std_bitset std_vector std_deque std_unique__ptr

Required Class Function: operator[]
dungeon_t dungeon_default_matrix[y_size][x_size]{};

Array Matrix array_matrix

default_array std_array std_bitset std_vector std_deque std_unique__ptr

Required Class Function: operator[]
dungeon_t dungeon_array_matrix[x_size*y_size]{};

๐Ÿ‘พTest๐Ÿ‘พ

Wandbox(1-4)

Version 0.1.30 [ C++14 ]

View Test Code
PC View Wandbox
SP View WandBox
Compiler Pass_C++14 Pass_C99
MSVC cl cl
GCC gcc gcc
Clang clang clang
Zapcc zapcc zapcc
ICC icc icc

[Type] Terrain Generation

[1] Simple Voronoi Island (v0.1.0~)

cpp14 c99

#include <SimpleVoronoiIsland.hpp>
Default Value Name Image Color
0 Sea Pale Brown
1 Land Dark Olive
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

voronoi

[3] Fractal Island (v0.1.1~)

cpp14 c99

#include <FractalIsland.hpp>
Default Value Name
0-255 Height
Capacity Requirement
8 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

FI1 3D fi3d

[15] Chunk Island (v0.1.20~)

cpp14 c99_no

#include <FractalIsland.hpp>
Default Value Name
0-255 Height
Capacity Requirement
8 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

chunk

[16] Simple Diamond Square Average Island (v0.1.21~)

cpp14 c99_no

#include <FractalIsland.hpp>
Default Value Name
0-255 Height
Capacity Requirement
8 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

sdsai

[14] Simple Diamond Square Average Island Corner (v0.1.19~)

cpp14 c99_no

#include <FractalIsland.hpp>
Default Value Name
0-255 Height
Capacity Requirement
8 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

sdsai

[Type] Dungeon Generation

[2] RogueLike (v0.1.0~)

cpp14 c99_no

#include <RogueLike.hpp>
Default Value Name Image Color
0 Outside Wall Blue
1 Inside Wall White
2 Room Green
3 Entrance Black
4 Way Yellow
Capacity Requirement
3 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

rl1 rl4

[5] Simple RogueLike (v0.1.3~)

cpp14 c99

#include <SimpleRogueLike.hpp>
Default Value Name Image Color
0 Wall Black
1 Empty White
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

STL1 srl3d

[4] Maze Dig (v0.1.2~)

cpp14 c99

#include <MazeDig.hpp>
Default Value Name Image Color
0 Wall Blue
1 Empty White
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

maze_dig maze_dig_3d

[17] RogueLike Cave (v0.1.25~)

cpp14 c99_no

#include <RogueLike.hpp>
Default Value Name Image Color
0 Wall Black
1 Room Brown
2 Unknown
3 Unknown
4 Unknown
Capacity Requirement
3 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

rl1 rlc

Maze ฮฑ

cpp14 c99_no

Underdevelopment...

[Type] Normal Generation

[6] DungeonInit (v0.1.10~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::DungeonInit<dungeon_t> dungeon_init(dungeon);

//function
dtl::dungeonInit(dungeon);
Matrix Size Min Matrix Size Max
0 (Variable Max)
Default Value Name Image Color
0 Empty Black
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix default_matrix array_matrix

Generation Type

gt_f

Image

di

[7] Border (v0.1.10~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::Border<dungeon_t> border(dungeon);

//function
dtl::createBorder(dungeon);
Matrix Size Min Matrix Size Max
1 (Variable Max)
Default Value Name Image Color
0 Empty White
1 Wall Black
Capacity Requirement
1 bit

Variable

bool_true int_true

Generation Type

gt_f

Image

db border

Matrix Type

stl_matrix default_matrix array_matrix

[8] BorderOdd (v0.1.10~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::BorderOdd<dungeon_t> border_odd(dungeon);

//function
dtl::createBorderOdd(dungeon);
Matrix Size Min Matrix Size Max
2 (Variable Max)
Default Value Name Image Color
0 Empty White
1 Wall Black
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix default_matrix array_matrix

Generation Type

gt_f

Image

bo

[9] PointGrid (v0.1.10~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::PointGrid<dungeon_t> point_grid(dungeon);

//function
dtl::createPointGrid(dungeon);
Matrix Size Min Matrix Size Max
0 (Variable Max)
Default Value Name Image Color
0 Empty White
1 Wall Black
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix default_matrix array_matrix

Generation Type

gt_f

Image

pg

[10] PointGridField (v0.1.10~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::PointGridField<dungeon_t> point_grid_field(dungeon);

//function
dtl::createPointGridField(dungeon);
Matrix Size Min Matrix Size Max
2 (Variable Max)
Default Value Name Image Color
0 Empty White
1 Wall Black
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix default_matrix array_matrix

Generation Type

gt_f

Image

pgf

[12] PointGridFieldPutBlock (v0.1.13~)

cpp14 c99_no

#include <DungeonStandard.hpp>
//class
dtl::PointGridFieldPutBlock<dungeon_t> point_grid_field_put_block(dungeon);
Matrix Size Min Matrix Size Max
3 (Variable Max)
Default Value Name Image Color
0 Empty White
1 Wall Black
2 Block Red
Capacity Requirement
2 bit

Variable

bool_false int_true

Matrix Type

stl_matrix default_matrix array_matrix

Generation Type

gt_r

Image

pgfpb

[Type] BoardGame Generation

[11] Reversi (v0.1.10~)

cpp14 c99_no

#include <BoardGame.hpp>
//class
dtl::Reversi<dungeon_t> reversi(dungeon);
Matrix Size Min Matrix Size Max
2 (Variable Max)
Default Value Name Image Color
0 Empty Green
1 White White
2 Black Black
Capacity Requirement
2 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_f

Image

re

re32

[13] Chess (v0.1.14~)

cpp14 c99_no

#include <BoardGame.hpp>
//class
dtl::Chess<dungeon_t> chess(dungeon);
Matrix Size Min Matrix Size Max
4 (Variable Max)
Default Value Name
0 Empty
1 White King
2 Black King
3 White Queen
4 Black Queen
5 White Bishop
6 Black Bishop
7 White Knight
8 Black Knight
9 White Rook
10 Black Rook
11 White Pawn
12 Black Pawn
Capacity Requirement
4 bit

Variable

bool_false int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_f

Image

chess

Variable

bool_false int_true

[Type] Horizontal Scroll Generation

[18] Mountain (v0.1.26~)

#include <HorizontalScroll.hpp>
Default Value Name Image Color
0 Empty Blue
1 Mountain Green
Capacity Requirement
1 bit

Variable

bool_true int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Generation Type

gt_r

Image

mountain

Paint Tool

Pen (v0.1.9~)

cpp14 c99_no

#include <DungeonPaint.hpp>
dtl::Pen<dungeon_t> pen(dungeon, x, y, paint_value);

Variable

bool_true int_true

Matrix Type

stl_matrix default_matrix no_array_matrix

Image

pen

Bucket (v0.1.9~)

cpp14 c99_no

#include <DungeonPaint.hpp>
dtl::Bucket<dungeon_t> bucket(dungeon, x, y, paint_value);

Variable

bool_true int_true

Matrix Type

stl_matrix no_default_matrix no_array_matrix

Image

bucket

File

File Read

Name Function Version
.csv fileRead_csv v0.1.12~
.dtlm fileRead_dtlm v0.1.12~

File Write (Text)

Name Function Version
.csv fileWrite_csv v0.1.12~
.dtlm fileWrite_dtlm v0.1.22~
.md fileWrite_md v0.1.24~
.txt fileWrite_0_9 v0.1.24~

File Write (Picture)

Name Function Version
.pbm fileWrite_pbm v0.1.22~
.svg fileWrite_svg v0.1.22~
.bmp fileWrite_bmp v0.1.23~

File Write (3D)

Name Function Version
.obj fileWriteTerrain_obj v0.1.27~
.obj fileWriteBoard_obj v0.1.28~

Artificial Intelligence

Reversi AI (v0.1.11~)

๐Ÿ”ฑWinning percentage๐Ÿ”ฑ

Priority > Simple โ‰ˆ Greed > Unselfishness

reversiAI_Priority

Winner Priority Priority Empty Count
-0.0074 31.7925 31.9628 0.2447 60.1488
Winner Priority Simple Empty Count
0.7835 40.8016 22.229 0.9694 59.9489
Winner Priority Greed Empty Count
0.7053 39.5965 23.2626 1.1409 59.304
Winner Priority Unselfishness Empty Count
0.7996 42.5181 20.7563 0.7256 60.0602

reversiAI_Simple

Winner Simple Priority Empty Count
-0.5458 22.6688 41.2262 0.105 60.913
Winner Simple Simple Empty Count
-1 19 45 0 64
Winner Simple Greed Empty Count
0.09 32.0689 29.3282 2.6029 60.1052
Winner Simple Unselfishness Empty Count
0.4185 37.246 26.5962 0.1578 60.8609

reversiAI_Greed

Winner Greed Priority Empty Count
-0.7032 23.237 39.6584 1.1046 59.3413
Winner Greed Simple Empty Count
-0.1217 30.7936 32.1165 1.0899 61.4612
Winner Greed Greed Empty Count
-0.0097 31.7787 32.1442 0.0771 60.3203
Winner Greed Unselfishness Empty Count
0.3536 35.073 24.5509 4.3761 57.4842

reversiAI_Unselfishness

Winner Unselfishness Priority Empty Count
-0.7935 20.9607 42.3865 0.6528 60.1339
Winner Unselfishness Simple Empty Count
-0.4015 26.6318 37.2226 0.1456 60.9599
Winner Unselfishness Greed Empty Count
-0.3935 23.6703 35.5719 4.7578 57.0582
Winner Unselfishness Unselfishness Empty Count
-0.0295 31.7327 32.2625 0.0048 60.7481

Matrix

matrix

License

These codes are licensed under CC0.

CC0

Created by Gaccho on December 15th, 2018.

Contact

E-mail: wanotaitei@gmail.com
Twitter: @wanotaitei
svg As Project
gaccho Made by Gaccho.

Japan Terrain Generation Research Institute

Clone this wiki locally