Changes for version 0.01

  • First version, over the C API of libtfdemo 1.3.0, which the distribution compiles in (libtfdemo/): Games::TF2::Demo opens a demo from a file or from bytes with the decoding options entities, temp_entities, sounds and summary, reads its header and steps or runs through it with a handler, an object that does Games::TF2::Demo::Handler. Only the methods a handler implements are wired: on_tick, on_game_event, on_user_message, on_entity, on_temp_entity, on_string_table_changed, on_console_command, on_sound and on_message (net messages), each with an item object of copied values.
  • items(kinds => [...]) iterates over the items of the kinds asked for, sharing the position with step and run; each_item() calls a function with each.
  • Between steps: entity(), game_state() and game_state_at(), summary() (with the summary option: users, chat, deaths, rounds, pauses, direct hits), players(), player_by_entity(), player_by_user_id(), string_tables(), string_table(), server_info(), diagnostics(), last_frame_type() and last_frame_tick(). A user message item has its chat line.
  • Teams, player classes and kinds as numbers with *_name methods giving the names of the tfdemo tool (Games::TF2::Demo::Names).
  • Property values (of entities and temp entities) as numbers, character strings, array references and Games::TF2::Demo::Vector objects, keyed 'table.prop', repeated keys numbered '#2', '#3', ...; game event values read by key index, repeated key names numbered the same way.
  • Strings from demos decoded from UTF-8, bytes that start no well-formed sequence replaced by U+FFFD.
  • A handler's exception ends the frame's callbacks and is thrown again by step and run once the frame is done.
  • Library errors as Games::TF2::Demo::Error objects, one class per status of the C API, with Network, Timeout and Rejected for live connections.
  • A demo that changes the map starts over for the new map, as libtfdemo 1.2.0 does.
  • Games::TF2::Server: live connections to a Team Fortress 2 server over libtfnet (tfnet.h), compiled in with libtfdemo. Games::TF2::Server::SourceTV watches a server's SourceTV as a spectator, Games::TF2::Server::Player joins a server on sv_lan 1 as a player (libtfnet's LAN guard refuses public addresses). Both take the address, the send tables of a demo of the server, name, version, password, user info, cvar answers, timeouts and the decoding options; a player also a SteamID64.
  • poll() returns the events since the last poll as objects of Games::TF2::Server::Event::* (ServerInfo, InGame, LevelChange, Disconnected, EntityFrame, GameEvent, UserMessage, Chat, Menu with its items, Convars, Print, Stats, CvarQuery); run() hands them to a Games::TF2::Server::Handler until the connection ends. subscribe() and unsubscribe() choose what is reported: entities by index or class, a player's own entity, properties, game events, user messages, chat, menus, convars, console output, cvar queries and statistics.
  • send_command(), set_cvar_answer(), silence(), disconnect(), stats(), phase(), version(), simulation_tick(), a player's set_controls(), and the state readers of Games::TF2::Demo (entity, game_state, players, player_by_entity, player_by_user_id, string_tables, string_table, server_info), shared through Games::TF2::Demo::StateReader. Array properties of an entity frame are read from the entity of the state.

Documentation

Modules

Read Team Fortress 2 demos
A chat line of a user message
What a demo had that the engine tolerates
A projectile that hit a player directly
An entity of a demo, as it was between two steps
The errors of Games::TF2::Demo
The players, buildings, projectiles, points and carts at a moment
A building of a game state
A payload cart of a game state
A control point of a game state
A player of a game state
A projectile of a game state
The role of a demo's handler
The header of a demo
What every item a handler gets has
A console command of the recording client
What one update did to an entity
A game event of a demo
A net message of a demo
A sound of a demo
A string table entry added or changed
A temp entity of a demo
A NET_Tick of a demo
A user message of a demo
The items of a demo, one at a time
The names of teams, classes and kinds
A player of the userinfo string table
The server info of a demo
Reading the state of a demo or a connection
A string table of a demo, as it was between two steps
The match summary of a demo
A chat line of the match summary
A player_death of the match summary
A pause of the match summary
A round of the match summary
A user of the match summary
A point or direction of a demo
Follow a Team Fortress 2 server live
What every event of a connection has
A chat line of a connection
Cvars the server set
A cvar query of the server and its answer
The subscribed entities of a frame
A game event of a connection
The signon of a connection is complete
The server changes the level
A menu the server shows
Console output of the server
A signon of a connection started
Statistics of a connection
A user message of a connection
An entity of an entity frame
The role of a connection's handler
An item of a menu
Join a Team Fortress 2 LAN server as a player
Watch a Team Fortress 2 server through its SourceTV
The statistics of a connection