Playing with Triton Data


I was inspired by @Qwerty’s api so I started down the road of playing with Triton’s Data. These are the fruits of the last 24 hours.

First thing I did was to write a PHP wrapper for the server’s data API…

phpTriton: a PHP wrapper

Get the client on GitHub:

It’s really easy to work with:

require "phpTriton/client.php";

$client = new TritonClient($alias, $password);
    $game = $client->GetGame($game_id);
    $universe = $game->GetFullUniverse();

Another API endpoint

With a client written, I made my own endpoint for getting public game data. The format is subtly different, I wanted it to be compatible with Ember RESTAdapter.

Endpoint:<game number>

  games: {
    id: "4985364317995008",
    name: "Phi Achernar",
    tick: 92,
    stars: [...],
    players: [...]

Making Charts

With my own api in place I then got to making some Google Charts.

The results of my playing can be seen at A game number can be dynamically enter in the interface, or include it in the url to auto load.


I was lacking creativity though. If anyone can think of plots they’d like to see I’ll add them to the interface.

Theducky account is suspended
Gathering and reviewing game progression
Intel: Total Research

This is on so higher level!

Now I have this star-to-player@tick relation table, which looks like this


it is called like this<range>/<game_number>/<type>

where <range> can be
/x/     shows relation data for tick x
/x-/    shows for tick x and later
/-x/    prior to x, inclusive
/x-y/   from x to y
//      all ticks from database

<game_number> is game number, like

<type> can be 
/full      (not yet working)

The question is, can you draw it?

More info, such as number of games stored, here.


Here you go :slight_smile:


Neat!! You are awesome! Now can you make it mobile compatible and add alliance support? :stuck_out_tongue:

See “Usage” how I am doing it. Map tweaks (alliances, hide personal info,...)