group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
main.cpp File Reference

Multi-bot load-test launcher. More...

#include "Bot.hpp"
#include "ecs/AssetCatalog.hpp"
#include "ecs/MapConfig.hpp"
#include "ecs/physics/MapLoader.hpp"
#include "ecs/physics/WorldData.hpp"
#include "network/NetworkConfig.hpp"
#include <SDL3/SDL.h>
#include <SDL3_net/SDL_net.h>
#include <algorithm>
#include <atomic>
#include <chrono>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <string>
#include <thread>
#include <vector>
Include dependency graph for main.cpp:

Functions

int main (int argc, char *argv[])

Detailed Description

Multi-bot load-test launcher.

Usage: ./clientbot # 1 bot, defaults to config.toml host:port ./clientbot 10 # 10 bots ./clientbot 50 host:port # 50 bots, override host:port

On Ctrl+C (SIGINT) or SIGTERM, all bots are signalled to stop and the process waits for them to finish their current tick before exiting.

All bots run in a single process — no fork, no GPU. One std::thread per bot, sharing the SDL_net global state. Each bot owns its own TCP socket

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )
Here is the call graph for this function: