RecAnalyst v4
https://github.com/goto-bus-stop/recanalyst
I put together a small demo to showcase what RecAnalyst can do here:
http://idlebeaver.ninja/recanalyst/
You can upload a recorded game and it'll show you some information about the game.
A screenshot from the demo.
Technical information
This is a fork of Biegleux's PHP RecAnalyst with a modern API and support for many more game versions. It supports recorded game files from Age of Kings, The Conquerors, UserPatch, Forgotten Empires, and HD Edition (optionally with expansions).
Usage can be as simple as:
Differences from biegleux's RecAnalyst
Over time, RecAnalyst v4 has essentially been completely rewritten. The major difference is that RecAnalyst v4 supports HD Edition games. It's also set up in a modular way, so support for SWGB or data modded games might be on the cards The API has been redesigned and is hopefully simpler. It also reads more things, such as UserPatch achievement data, and it integrates well with other packages such as the Laravel framework and the Intervention Image library.
Requirements
RecAnalyst v4 works with PHP 5.6+ and PHP 7. The Imagick or GD extensions need to be installed to generate map images.
Installation
RecAnalyst v4 can currently only be installed using Composer. Composer is a package manager for PHP.
In your PHP project's root folder, run:
Then require the vendor/autoload.php generated by Composer before using RecAnalyst:
I might package it up as a standalone library that can be used without Composer at some point in the future. But if you're not using Composer already, perhaps now is the time to look into it, because it's incredibly useful
Configuration
RecAnalyst v4 includes translations for things like research names, and images for civilizations and researches. View the Readme for more. There's also a Laravel integration that makes configuring RecAnalyst a breeze in Laravel projects.
API Documentation
The best way to get started with the RecAnalyst v4 API is to check out the usage examples. Full generated API documentation is also available.
Other stuff that doesn't really belong to any other header
Since this package supports HD Edition recorded games (but not yet Rise of the Rajas!), perhaps it could be used to add analyses for HD Edition games on AoCZone?
If you have questions about usage, the best places to go are the Issue tracker or the Gitter chat.
If the Demo doesn't accept a file you uploaded (i.e. if it responds with a blank page), there's probably something going on in the game that RecAnalyst can't deal with. In that case please share the game in the Gitter chat, or send me a PM on AoCZone
https://github.com/goto-bus-stop/recanalyst
I put together a small demo to showcase what RecAnalyst can do here:
http://idlebeaver.ninja/recanalyst/
You can upload a recorded game and it'll show you some information about the game.
A screenshot from the demo.
Technical information
This is a fork of Biegleux's PHP RecAnalyst with a modern API and support for many more game versions. It supports recorded game files from Age of Kings, The Conquerors, UserPatch, Forgotten Empires, and HD Edition (optionally with expansions).
Usage can be as simple as:
Code:
$rec = new \RecAnalyst\RecordedGame('recorded_game.mgx2');
$rec->mapImage()->save('minimap.png');
foreach ($rec->players() as $player) {
printf("%s (%s)", $player->name, $player->civName());
}
Differences from biegleux's RecAnalyst
Over time, RecAnalyst v4 has essentially been completely rewritten. The major difference is that RecAnalyst v4 supports HD Edition games. It's also set up in a modular way, so support for SWGB or data modded games might be on the cards The API has been redesigned and is hopefully simpler. It also reads more things, such as UserPatch achievement data, and it integrates well with other packages such as the Laravel framework and the Intervention Image library.
Requirements
RecAnalyst v4 works with PHP 5.6+ and PHP 7. The Imagick or GD extensions need to be installed to generate map images.
Installation
RecAnalyst v4 can currently only be installed using Composer. Composer is a package manager for PHP.
In your PHP project's root folder, run:
Code:
composer require recanalyst/recanalyst
Then require the vendor/autoload.php generated by Composer before using RecAnalyst:
Code:
require_once 'vendor/autoload.php';
$rec = new RecAnalyst\RecordedGame($filename);
I might package it up as a standalone library that can be used without Composer at some point in the future. But if you're not using Composer already, perhaps now is the time to look into it, because it's incredibly useful
Configuration
RecAnalyst v4 includes translations for things like research names, and images for civilizations and researches. View the Readme for more. There's also a Laravel integration that makes configuring RecAnalyst a breeze in Laravel projects.
API Documentation
The best way to get started with the RecAnalyst v4 API is to check out the usage examples. Full generated API documentation is also available.
Other stuff that doesn't really belong to any other header
Since this package supports HD Edition recorded games (but not yet Rise of the Rajas!), perhaps it could be used to add analyses for HD Edition games on AoCZone?
If you have questions about usage, the best places to go are the Issue tracker or the Gitter chat.
If the Demo doesn't accept a file you uploaded (i.e. if it responds with a blank page), there's probably something going on in the game that RecAnalyst can't deal with. In that case please share the game in the Gitter chat, or send me a PM on AoCZone