4#include <aegis2d/ecs/components.hpp>
5#include <aegis2d/net/context.hpp>
27 using Clock = std::chrono::steady_clock;
40 [[nodiscard]] aegis2d::ecs::PlayerInput
update(Clock::time_point now);
44 [[nodiscard]] std::uint64_t
picks() const noexcept;
48 aegis2d::ecs::PlayerInput input_;
49 Clock::time_point until_{};
50 std::uint64_t picks_ = 0;
81 using Clock = std::chrono::steady_clock;
106 [[nodiscard]] aegis2d::ecs::PlayerInput
input() const noexcept;
110 [[nodiscard]] std::uint64_t
picks() const noexcept;
115 aegis2d::ecs::PlayerInput input_;
A client without window nor sound: a ClientSession whose inputs are RandomInputs, or ScriptedInputs w...
Definition bot.hpp:78
void leave()
Leaves the server: sends Logout; keep running the context a little for it to leave.
std::uint64_t picks() const noexcept
Number of inputs picked: random holds, or steps of the script.
const ClientSession & session() const noexcept
The session with the server: its state, error, traffic and world.
std::chrono::steady_clock Clock
Clock of the session and the inputs.
Definition bot.hpp:81
void start()
Connects to the server and logs in.
void update(Clock::time_point now)
Runs the session's timers and, in game, picks the inputs; a script starts at the first update in game...
Bot(aegis2d::net::NetworkContext &context, const BotSettings &settings)
Creates a bot, not started.
aegis2d::ecs::PlayerInput input() const noexcept
The actions held now.
The client side of a session (RFC section 3).
Definition client_session.hpp:103
The client's session with the server: TCP login, then UDP binding (RFC section 3).
R-Type game code, built on the Aegis2D engine.
Definition enemy_scripts.hpp:16
std::vector< BotSettings > bot_team(const BotSettings &base, std::size_t count)
The settings of count bots that play together, for --count.
What a bot needs to join a server.
Definition bot.hpp:54
std::uint32_t seed
Seed of its random inputs.
Definition bot.hpp:58
ClientSettings server
Server and player name.
Definition bot.hpp:56
std::optional< InputScript > script
Inputs to replay instead of random ones (--inputs).
Definition bot.hpp:60
What the client needs to join a server.
Definition client_session.hpp:70
std::string host
Numeric IPv4 or IPv6 address of the server, or "localhost".
Definition client_session.hpp:72