Download the PHP package allejo/bzflag-networking.php without Composer

On this page you can find all versions of the php package allejo/bzflag-networking.php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bzflag-networking.php

BZFlag Networking

Packagist Code coverage License

A PHP 7.1+ library for reading and handling BZFlag network packets.

BZFlag Replay files are simply the raw packets stored in a file together, so this library will let you read replay files and unpack them into PHP classes that can be serialized into JSON.

Installation

This project is available via Composer.

Related Libraries

Usage

This library has all of the utilities for unpacking BZFlag network packets and world packets. However, the only convenience methods available in this library is reading those packets from replay files.

Analyzing Replay Packets

The recommended use of this library is to "stream" the replays in your code with the getPacketsIterable() method, which reads and yields a packet at a time. This allows for you to iterate through a replay file once and not have to store the entire replay in memory as you're working with it.

If you'd like to get all of a replay file's packets as an array, use the getPacketsAsArray() method. Keep in mind, that this will incur high-memory usage as the entire replay will be stored in an expanded format in memory. Additionally, all of the packets are read and if your code would like to perform any type of analysis, you will need to iterate through all of the packets again.

Embedded Worlds in Replays

As of version 1.1+, this library supports extracting the world data that's embedded inside of replay files. The BZFlag World Database is not an easy object to navigate and contains a lot of "managers" that have an inventory of textures, obstacles, world weapons, etc.

Take a look at the allejo/bzflag-rendering.php library for example usage of how to navigate the World Database.

Exporting to JSON

:warning: High Memory Usage

The built-in json_encode function PHP will not be able to handle writing large JSON files from replays. At this point, it's necessary to stream your JSON using something like streaming-json-encoder. See the PHP port of rrlog for sample usage.

In Other Languages

This library was originally written a few times in other languages with less features. However, those other projects are now end-of-life and this project has taken their place.

License

MIT


All versions of bzflag-networking.php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
ext-zlib Version *
mossadal/math-parser Version ^1.3
symfony/deprecation-contracts Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package allejo/bzflag-networking.php contains the following files

Loading the files please wait ....