restpartner.blogg.se

Tinykeep update log
Tinykeep update log






tinykeep update log
  1. Tinykeep update log full#
  2. Tinykeep update log code#

This new version is in Scripts3D/Delauna圓D.cs, in case anyone else was looking for an MIT licensed, easy to understand version.Ī staircase starting at the solid blue square and moving up one floor Since it’s mostly 4×4 matrix operations I just used Unit圓D’s Matrix4x4 type to do the heavy lifting. I still don’t really understand why circumcircles are so important, but I was at least able to write it using circumspheres instead, using this page from Wolfram MathWorld. In the end, I had to learn how the Bowyer-Watson algorithm actually worked so I could change it myself.

Tinykeep update log code#

The other was that the code was so heavily templated and inscrutable, that I didn’t actually find where they implemented the algorithm. One was that this module was only available under the GPL ?. The closest was CGAL’s implementation of 3D triangulation, but there were two problems with it. Searching for either ” 3D Delaunay triangulation” or ” Delaunay tetrahedralization” returned a lot of research papers but no actual source code that I could find. Next, find the 3D Delaunay triangulation of the rooms, or rather the Delaunay tetrahedralization. Note that rooms can be multiple floors tall.Ģ. I’ve also added a 1 unit wide buffer on each side (to ensure that rooms aren’t touching), but this is not required for the algorithm to work.

tinykeep update log

It doesn’t matter that much how they are arranged, so for this example, I’ve just placed and sized them randomly.

tinykeep update log

Place rooms arbitrarily such that they don’t overlap with each other.

Tinykeep update log full#

In a full game, 1 unit may correspond to 5 meters, for example. I assume that 1 unit is wide enough to represent a hallway. The world is divided into a rectangular grid. The code for this is in the Scripts2D folder. It works mostly the same as the TinyKeep algorithm, but has been simplified in some ways (especially room generation) and is more complex in others. Two Dimensionsįirst, I had to write the algorithm to work in two dimensions. I’m using Unit圓D for this demonstration, but these concepts are, of course, usable in any game engine. The code for this example is available in this Github repo. I extended the algorithm to work in 3D, to create dungeons with multiple floors. There are a lot of different ways to approach this problem, but I eventually decided to base mine off of TinyKeep’s algorithm, described here. I’ve been playing some roguelikes recently, so I wanted to try writing my own procedural dungeon generator.








Tinykeep update log