PHPackages                             allejo/bzflag-rendering.php - 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. [Image &amp; Media](/categories/media)
4. /
5. allejo/bzflag-rendering.php

ActiveLibrary[Image &amp; Media](/categories/media)

allejo/bzflag-rendering.php
===========================

A library for rendering thumbnails of BZFlag worlds

v0.2.2(4y ago)63321[1 PRs](https://github.com/allejo/bzflag-rendering.php/pulls)MITPHPPHP &gt;=7.1

Since Jun 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/allejo/bzflag-rendering.php)[ Packagist](https://packagist.org/packages/allejo/bzflag-rendering.php)[ Fund](https://www.buymeacoffee.com/allejo)[ GitHub Sponsors](https://github.com/allejo)[ RSS](/packages/allejo-bzflag-renderingphp/feed)WikiDiscussions 0.2 Synced 4d ago

READMEChangelog (6)Dependencies (6)Versions (9)Used By (0)

BZFlag Rendering
================

[](#bzflag-rendering)

[![Packagist](https://camo.githubusercontent.com/df9942deb3cd63d088b1900147858bc9b78c57a5fa749de44811a6785b9257d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6c656a6f2f627a666c61672d72656e646572696e672e7068702e737667)](https://packagist.org/packages/allejo/bzflag-rendering.php)[![Code coverage](https://camo.githubusercontent.com/f5e546c6fe12b6dce1619463a9c8aadc2c4020f01b07bb87cba485cd4a2053bc/68747470733a2f2f636f6465636f762e696f2f67682f616c6c656a6f2f627a666c61672d72656e646572696e672e7068702f6272616e63682f302e322f67726170682f62616467652e7376673f746f6b656e3d4f424f384a475250484a)](https://codecov.io/gh/allejo/bzflag-rendering.php)[![License](https://camo.githubusercontent.com/a695c6d4ef41ea61adb3e0a8f3ad85ab76db84d50d8ec8be09fd92b524bdfcc4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c6c656a6f2f627a666c61672d72656e646572696e672e7068702e737667)](LICENSE.md)

A PHP 7.1+ package for drawing BZFlag related things such as map thumbnails; this is a sister project to [bzflag-networking.php](https://github.com/allejo/bzflag-networking.php).

Installation
------------

[](#installation)

This package can be installed via [Composer](https://getcomposer.org).

```
composer require allejo/bzflag-rendering.php
```

Usage
-----

[](#usage)

This library currently supports exporting maps as SVGs or PNGs. Using the `WorldRenderer` class, you can give it a `WorldDatabase` instance from version 1.1+ of `bzflag-networking.php`.

```
// use allejo\bzflag\graphics\PNG\Radar\WorldRenderer;
use allejo\bzflag\graphics\SVG\Radar\WorldRenderer;
use allejo\bzflag\replays\Replay;

$replay = new Replay('official-match.rec');
$world = $replay->getHeader()->getWorldDatabase();

$renderer = new WorldRenderer($world);

echo $renderer->writeToFile("thumbnail.svg");
```

### Namespaces in this package

[](#namespaces-in-this-package)

This package is dedicated to drawing and rendering BZFlag related images or files, meaning this will have dependencies for drawing. In order to allow these dependencies to be "opt-in," it is a separate package.

However, the namespace of this project is shared with its sister project. The namespaces available in this package are the following:

- `allejo\bzflag\graphics`

Examples
--------

[](#examples)

Here are some examples of SVG images generated by this library.

   [![Radar thumbnail of HiX](./examples/hix.svg)](./examples/hix.svg)   [![Radar thumbnail of a random map](./examples/random_map.svg)](./examples/random_map.svg)     [![Radar thumbnail of Pillbox](./examples/pillbox.svg)](./examples/pillbox.svg)   [![Radar thumbnail of Unknown Mini](./examples/unknown_mini.svg)](./examples/unknown_mini.svg)  Obstacle Drawing Support
------------------------

[](#obstacle-drawing-support)

This project currently has support for drawing the following BZW 2.x object types.

Object TypeSupportarc❌base✅box✅cone❌group✅mesh✅pyramid✅sphere❌teleporter✅tetra❌License
-------

[](#license)

[MIT](./LICENSE.md)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.5% 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 ~98 days

Recently: every ~168 days

Total

8

Last Release

1488d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d66778910a0fa5d2df6f837ebcb61c9b2385767450d7e7325b4afa637b205988?d=identicon)[allejo](/maintainers/allejo)

---

Top Contributors

[![allejo](https://avatars.githubusercontent.com/u/1246453?v=4)](https://github.com/allejo "allejo (65 commits)")[![RighthandSon](https://avatars.githubusercontent.com/u/59427094?v=4)](https://github.com/RighthandSon "RighthandSon (1 commits)")

---

Tags

bzflagphpsvg

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/allejo-bzflag-renderingphp/health.svg)

```
[![Health](https://phpackages.com/badges/allejo-bzflag-renderingphp/health.svg)](https://phpackages.com/packages/allejo-bzflag-renderingphp)
```

###  Alternatives

[lasserafn/php-initial-avatar-generator

A package to generate avatars with initials for PHP

4374.2M13](/packages/lasserafn-php-initial-avatar-generator)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[imagekit/imagekit

PHP library for Imagekit

47795.6k9](/packages/imagekit-imagekit)[contao/image

Contao image library

131.7M9](/packages/contao-image)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)

PHPackages © 2026

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