Code Monkey home page Code Monkey logo

dungeontemplatelibrary's Introduction

DTL (Dungeon Template Library) BSL-1.0

Logo-GIF


Overview 💬

Version 0.4.14 [ C++11/14/17 ]


>> SDK Downloads 📥

>> Web Trial 🏷

Image Viewer Downloads📥

>> Viewer Download [Windows/.exe/(x86)] 📥

>> Viewer Download [Windows/.exe/(x64)] 📥

>> Viewer Download [Android/.apk/(ARM/ARM64/x86/x64)] 📥

>> Roguelike🌏 Viewer Download [Windows/.exe/(x64)] 📥

>> Unreal Engine 4 Viewer Download [Windows/.exe/(x86/x64)] 📥

>> What is Image Viewer?


>> API reference 📚

>> Version History 📜

>> Roadmap 🏛

API reference


Supported Compilers 🔧

Compiler C++17 C++14 C++11
MSVC 14.0-passing 14.0-passing 14.0-passing
GCC 5.1.0-passing 4.9.0-passing 4.8.1-passing
Clang 5.0.0-passing 3.6.0-passing 3.4.0-passing
Zapcc unknown 1.0.1-passing 1.0.1-passing
ICC unknown unknown unknown
Compiler C++17 C++14 C++11
MSVC 14.20-passing 14.20-passing
GCC 4.9.2-passing 4.9.2-passing
Clang 8.0.0-passing 8.0.0-passing 8.0.0-passing

Supported IDE ⚙

Visual Studio 🆚
Visual Studio 2019 version 16.0.0~
Visual Studio 2017 version 15.0.0~
Visual Studio 2015 Update 3

Supported Game Engines 🎮

Unreal Engine

Unity


>> Dungeon Template Library for Unity

>> Dungeon Template Library for Unreal Engine

>> Unreal Engine 4 Viewer Download [Windows/.exe/(x86/x64)] 📥


Quick Start (CMake) ⏩

First clone this code.

git clone https://github.com/AsPJT/DungeonTemplateLibrary.git
cd DungeonTemplateLibrary/

For macOS or Linux

mkdir build
cd build
cmake ..
make ci

For Windows (VS2017)

mkdir build
cd build
cmake .. -G"Visual Studio 15 2017 Win64"
MSBuild DTL.sln /p:Configuration=Release

>> View License 💳

Copyright (c) 2018-2019 As Project.

Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


Related Items 🎮

PAX_SAPIENTICA AsLib GenkaiSyuraku


On September 10, 2021, 1000 days have passed since the birth of DTL. 🎉

dungeontemplatelibrary's People

Contributors

aspjt avatar kariya-mitsuru avatar loligothick avatar sitryo avatar stmtk1 avatar yumetodo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dungeontemplatelibrary's Issues

複数の翻訳単位からインクルードすると未定義動作となる

MersenneTwister32bit.hpp には複数の static な変数がありますが、これらは inline 関数内で使用されています。
このため、複数の翻訳単位からインクルードすると未定義動作となってしまいます。
(正確には、これらの inline 関数を複数の翻訳単位から使用すると未定義動作となる)

解決方法としては、以下のいずれかになると思います。

  1. 複数の翻訳単位から使用することを諦めて、複数の翻訳単位からのインクルードを禁止する。
  2. C++17 以降のみ対応として、変数を inline にする。
  3. static 変数を諦めて、inline 関数内の static 変数にする。

非リテラル型な任意のUDT(User-Defined Type)に対して、constexprコピーコンストラクタはill-formedになる

以前某中3女子に質問をしたことがあって、

https://gcc.gnu.org/ml/libstdc++/2012-10/msg00120.html

diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index 209f395..d920a7d 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -250,7 +250,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
    // 20.11.5.1 construction / copy / destroy
    constexpr duration() = default;

-   constexpr duration(const duration&) = default;
+   // NB: Make constexpr implicit. This cannot be explicitly
+   // constexpr, as any UDT that is not a literal type with a
+   // constexpr copy constructor will be ill-formed.
+   duration(const duration&) = default;

    template<typename _Rep2, typename = typename
           enable_if<is_convertible<_Rep2, rep>::value

という変更がどういう意味かを問い合わせたことがありました。

@yumetodo 直訳:暗黙にconstexpr指定される。非リテラル型な任意のUDT(User-Defined Type)に対して、constexprコピーコンストラクタはill-formedになるため、明示的にconstexpr指定すべきでない。

— 狂える中3女子ボレロ村上/陶芸C++er (@bolero_MURAKAMI) 2016年3月14日

@yumetodo つまり、duration<Rep> の Rep は非リテラル型なユーザ定義型である可能性があるため、明示的にconstexpr指定しないようにする変更。Rep がリテラル型である場合、トリビアルコピーコンストラクタは暗黙にconstexpr指定される。

— 狂える中3女子ボレロ村上/陶芸C++er (@bolero_MURAKAMI) 2016年3月14日

と回答していただきました。

さて、例えば

		template<typename Int_>
		struct Coordinate1Dimensional {
			Int_ x{};
			constexpr Coordinate1Dimensional() = default;
			constexpr Coordinate1Dimensional(const Int_& x_) noexcept :x(x_) {};
		};

をみると、上と全く同じ状況であることがわかります。

CMake対応

./MSVC以下がmasterから消え去ったらPull Requestを投げつける

Dungeon/ImageWrite.hppとは?

/Sample/DTL/Storage以下の全ファイルについて

#include <Dungeon/ImageWrite.hpp>

とあるが

#include <DTL/ImageWrite.hpp>

ではないか?

nodiscard属性のプリプロセス時分岐をマクロとしてまとめるべき

#if defined(_MSVC_LANG) //C++17 use nodiscard
#if (_MSVC_LANG >= 201703L)
			[[nodiscard]]
#endif
#elif defined(__cplusplus)
#if (__cplusplus >= 201703L)
			[[nodiscard]]
#endif
#endif

という記述が多すぎてコードの見通しが悪くなっている。
以下のようなファイルにマクロ定義を用意してそれを使うべき。

// Macros/attribute/nodiscard.hpp
#ifndef INCLUDED_DUNGEON_TEMPLATE_LIBRARY_MACROS_NODISCARD_HPP
#define INCLUDED_DUNGEON_TEMPLATE_LIBRARY_MACROS_NODISCARD_HPP

#if __has_cpp_attribute(nodiscard)
#define DTL_NODISCARD [[nodiscard]]
#elif __has_cpp_attribute(gnu::warn_unused_result)
#define DTL_NODISCARD [[gnu::warn_unused_result]]
#else
#define DTL_NODISCARD
#endif

#endif

dtl::storage::FileMD: 書き出しファイルの拡張子はtxtではなくmdであるべきではないか?

問題

/Sample/DTL/Storage/FileMD.cpp

dtl::storage::FileMD<shape_t>("file_sample.txt").write(matrix);

のように書かれています。名前的にMarkdownじゃないかとおもうのですが、すると拡張子は.txtではなく.mdが妥当ではないでしょうか?

動機

cmake からビルドしたサンプルを走らせるときに、実行前にこれで生成するファイル名を削除するようにする予定である ( #15 ) 。この際に/Sample/DTL/Storage/FileMD.cppだけコンパイルするファイル名(file[A-Z]+.cpp)のパターンに引っかからない拡張子が採用されている。例外処理を書くのがだるいので差し障りがなければこっちを書き換えて対処したい

CIを有効にする

せっかく #18 でcmakeに対応したので、まだ単体テストはないけど、CIでビルドができることを保証したい。

サポートされる Matrix の形について

サポートされる Matrix の形について質問があります。
Matrix は完全に四角形のみサポートされるのでしょうか?
それとも、行によって長さが異なる形もサポートされるのでしょうか?

使用されている乱数エンジンに seed sequence を渡せない

MersenneTwister32bit.hpp に乱数エンジンが提供されていますが、こちらのクラスに seed sequence を渡すことができません。
メルセンヌツイスターの内部状態は非常に大きいため、seed に単一の整数のみしか渡せないのはちょっと残念です。

http://www.pcg-random.org/posts/cpp-seeding-surprises.html

ちなみに、std::random_device を std::seed_seq で使用する例がこちらに載っています。
https://codereview.stackexchange.com/questions/109260/seed-stdmt19937-from-stdrandom-device

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.