PHPackages                             sensorario/dungeon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sensorario/dungeon

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sensorario/dungeon
==================

PHP library for Dungeons generation

1.0.0(10y ago)0129[1 issues](https://github.com/sensorario/dungeon/issues)PHP

Since Feb 26Pushed 10y agoCompare

[ Source](https://github.com/sensorario/dungeon)[ Packagist](https://packagist.org/packages/sensorario/dungeon)[ RSS](/packages/sensorario-dungeon/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

sensorario/dungeon
==================

[](#sensorariodungeon)

Questa è una libreria php per la creazione di dungeon a base esagonale.

Classes
-------

[](#classes)

```
Sensorario\Dungeon\Map       - una mappa che si può estendere senza limiti
Sensorario\Dungeon\LittleMap - una piccola mappa di 19 tiles
Sensorario\Dungeon\World     - gestisce la crescita di una mappa

```

LittleMap
---------

[](#littlemap)

```
         / \ / \ / \
        |   |   |   |
       / \ / \ / \ / \
      |   |   |   |   |
     / \ / \ / \ / \ / \
    |   |   |   |   |   |
     \ / \ / \ / \ / \ /
      |   |   |   |   |
       \ / \ / \ / \ /
        |   |   |   |
         \ / \ / \ /

```

Utilizzo
--------

[](#utilizzo)

Per creare una cella, basta istanziare la classe Tile indicando le coordinate di partenza.

```
$tile = new Tile(0, 0); // 0, 0

```

Ci si può spostare di tile in tile usando le sei direzioni disponibili:

```
Directions::DOWN_RIGHT
Directions::DOWN_LEFT
Directions::LEFT
Directions::LEFT_UP
Directions::RIGHT_UP
Directions::RIGHT

```

La libreria fornisce una classe che genera automaticamente un piccolo dungeon. Verranno generate tile fino ad una distanza di due tile dalla centrale.

```
$map = new LittleMap();

```

C'è anche una classe Map che istanziata funziona esattamente come LittleMap(). La differenza è che alla Map possono essere aggiunte Tile a piacimento. Inoltre, è anche possibile far crescere la mappa partendo da una delle celle di confine. Attorno a questa cella, fino a due tile di distanza, verranno generate le nuote tile.

```
$center = new Tile(0, 0);
$map = new Map($center, 2);
$map->addTile(new Tile(2, 1), 1);

```

La classe forse più importante è la classe World.

```
$world = new World('dungeon');
$world->growAroundTile($world->getEdgeTile());

```

Questa classe fornisce un metodo World::growAroundTile(Tile $tile); che fa crescere la mappa in maniera casuale. Un altro metodo importante, è World::getEdgeTile() che restituisce una Tile casuale, tra quelle presenti nei confini della mappa generata sino a questo momento.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3729d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6deb026c846017d92a6feb598acbbf7ad4ac8852bdd39448647dee004402182f?d=identicon)[sensorario](/maintainers/sensorario)

---

Top Contributors

[![sensorario](https://avatars.githubusercontent.com/u/820248?v=4)](https://github.com/sensorario "sensorario (67 commits)")

### Embed Badge

![Health badge](/badges/sensorario-dungeon/health.svg)

```
[![Health](https://phpackages.com/badges/sensorario-dungeon/health.svg)](https://phpackages.com/packages/sensorario-dungeon)
```

###  Alternatives

[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[jimbojsb/workman

PHP process forking &amp; daemonizing library

608.8k](/packages/jimbojsb-workman)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
