BotStudio9
Game Optimizer

MMO Entity Tick Server

Stock vs tiered tick server for worlds with thousands of entities.

Open the workspace

Connect your own AI key and ask in plain language.

Latency (measured)
4.80 ms
Throughput (measured)
208/sec
Price
$800

Measured on win32-x64 (ZachsNitro · 13th Gen Intel(R) Core(TM) i5-13420H · 12 threads) · 2026-10-18 · 300 iterations · one scheduled server frame (20,000 entities, 32 players)

About this bot

Game Optimizer is a C++20 tick scheduler for entity-heavy game servers (FiveM/RedM, alt:V, or any main loop with too many entities). It replaces update-everything-every-frame with interest-managed tiering, per-frame budgeting and a closed-loop governor that holds frame time under target as the map fills. The saving depends on your world: entities far from every player are the ones that get cheap. Run the bench command with your own numbers before quoting a figure. Zero dependencies beyond a C++20 compiler. Runs offline.

Code preview

first 100 lines of src/scheduler.cpp - c++20 - 16 files - 1,890 lines in the archive
src/scheduler.cppc++20
1#include "bs9/scheduler.hpp"
2
3#include <algorithm>
4#include <cmath>
5#include <limits>
6
7namespace bs9 {
8
9float distance_sq(const Vec3& a, const Vec3& b) noexcept {
10 const float dx = a.x - b.x;
11 const float dy = a.y - b.y;
12 const float dz = a.z - b.z;
13 return dx * dx + dy * dy + dz * dz;
14}
15
16const char* tier_name(Tier t) noexcept {
17 switch (t) {
18 case Tier::Hot:
19 return "hot";
20 case Tier::Warm:
21 return "warm";
22 case Tier::Cool:
23 return "cool";
24 case Tier::Cold:
25 return "cold";
26 case Tier::Frozen:
27 return "frozen";
28 default:
29 return "?";
30 }
31}
32
33void EntityScheduler::set_entities(std::vector<Entity> entities) {
34 entities_ = std::move(entities);
35
36 tiers_.assign(entities_.size(), Tier::Frozen);
37 next_due_.assign(entities_.size(), 0);
38 phase_.resize(entities_.size());
39
40 // A fixed per-entity phase offset is what keeps a 30-frame tier from
41 // updating all of its entities on the same frame.
42 for (std::size_t i = 0; i < entities_.size(); ++i) {
43 phase_[i] = static_cast<std::uint32_t>(entities_[i].id * 2654435761u >> 16);
44 }
45
46 deferred_.clear();
47 queued_.assign(entities_.size(), 0);
48 retier();
49
50 // Stagger the first update of every entity across its interval, otherwise
51 // the whole world comes due on frame 0 and again every `interval` frames.
52 for (std::size_t i = 0; i < entities_.size(); ++i) {
53 const std::uint32_t interval =
54 cfg_.intervals[static_cast<std::size_t>(tiers_[i])];
55 next_due_[i] = interval > 1 ? phase_[i] % interval : 0;
56 }
57}
58
59void EntityScheduler::set_players(std::vector<Vec3> players) {
60 players_ = std::move(players);
61}
62
63Tier EntityScheduler::classify(const Entity& e) const {
64 if (e.pinned || e.activity >= cfg_.activity_promote) return Tier::Hot;
65 if (players_.empty()) return Tier::Frozen;
66
67 float best = std::numeric_limits<float>::max();
68 for (const auto& p : players_) {
69 best = std::min(best, distance_sq(e.position, p));
70 }
71
72 // Activity shrinks the effective distance: a moving vehicle is treated as
73 // if it were closer than it is, so it does not go dormant mid-manoeuvre.
74 const float scale = 1.0f - 0.5f * std::clamp(e.activity, 0.f, 1.f);
75 const float d = std::sqrt(best) * scale;
76
77 if (d <= cfg_.hot_radius) return Tier::Hot;
78 if (d <= cfg_.warm_radius) return Tier::Warm;
79 if (d <= cfg_.cool_radius) return Tier::Cool;
80 if (d <= cfg_.cold_radius) return Tier::Cold;
81 return Tier::Frozen;
82}
83
84void EntityScheduler::retier() {
85 for (std::size_t i = 0; i < entities_.size(); ++i) {
86 const Tier before = tiers_[i];
87 const Tier now = classify(entities_[i]);
88 if (now == before) continue;
89 tiers_[i] = now;
90
91 if (now < before) {
92 // Promotion takes effect immediately — an entity that just became
93 // relevant must not wait out the rest of a 30-frame interval.
94 next_due_[i] = static_cast<std::uint32_t>(frame_);
95 } else {
96 // Demotion re-phases the entity so a whole cohort dropping to a slow
97 // tier together does not then come due together.
98 const std::uint32_t interval =
99 cfg_.intervals[static_cast<std::size_t>(now)];
100 next_due_[i] = static_cast<std::uint32_t>(

This is the real file from the archive you receive, with your listing's metadata already substituted.

What is in the archive

  • .gitignore
  • CMakeLists.txt
  • README.md
  • include/bs9/affinity.hpp
  • include/bs9/frame_clock.hpp
  • include/bs9/governor.hpp
  • include/bs9/scheduler.hpp
  • include/bs9/workload.hpp
  • src/affinity.cpp
  • src/governor.cpp
  • src/main.cpp
  • src/scheduler.cpp
  • src/workload.cpp
  • tests/test_opt.cpp
  • wasm/game-optimizer.cpp
  • wasm/wasm_json.hpp
  • LICENSE.txt
  • bs9-manifest.json

Licence options

Every licence ships the same source. What differs is how far you may deploy it and whether you may put your own brand on it.

Personal is for one person on one deployment, not for business use. Commercial costs more because it covers your whole organisation on up to 3 deployments, including services you sell to your own clients: the same code, with the rights a business needs.

This listing is $800 — Pro build tier. The price decides what is in the archive; the licence marked below decides what you may do with it, and is the one that ships in your LICENSE.txt.

LicencePriceDeploymentsWhite-labelIncluded
Personal - Single deployment
This listing
$800 one-time1No
  • 1 person, 1 deployment
  • Personal, non-commercial use
  • No client resale
  • No white-label
Commercial - Team use
$1,500 one-time3No
  • Up to 3 deployments
  • Any number of users in one organisation
  • Commercial use, including services you sell
  • No source resale or sublicensing
  • No white-label
Agency Bundle - 5 Client Pack
$5,000 one-time
(all bots · contact sales)
Email to buy
5No
  • Up to 5 client deployments
  • Per-client keys
  • Agency use allowed
  • Email support
  • No white-label
Agency Unlimited ($7500 one-time)
$7,500 one-time
(all bots · contact sales)
Email to buy
UnlimitedNo
  • Unlimited deployments
  • Unlimited keys
  • Agency use allowed
  • Priority support
  • All future updates
  • No white-label
Enterprise / White-label (Custom)
CustomRequest a quoteUnlimitedYes
  • Everything in Agency Unlimited
  • Full white-label with your logo
  • Custom domain
  • Source code option
  • Dedicated support
  • Custom SLA

Personal and Commercial are sold here. Agency and Enterprise cover every bot in the catalogue and are arranged by email: use the button on that row and we reply with a payment link. Questions first? Contact us.

Enterprise is quoted rather than listed. The licence that ships in your archive's LICENSE.txt is the one marked above. Licence prices are what each grant is worth; checkout charges this listing's price, once.

Questions before you buy

+Can I try it before I buy?
Yes. The live terminal on this page runs the same engine the download ships, on our server. Paste your own numbers into it; nothing you type is kept.
+Does it run on Mac or Linux?
The download includes a ready-to-run program for Windows, Linux, macOS.
+Can my team use it?
Personal is 1 person, 1 deployment, not for business use. Commercial covers one organisation: any number of its staff, up to 3 deployments, commercial use including services you sell. Need more deployments or client use? The Agency licences in the table above are arranged by email.
+Are updates included?
You buy this version with its full source, and it keeps working without us. Personal and Commercial do not include future updates; Agency Unlimited does.
+What if it does not work?
Before you download, you can have a full refund within 14 days for any reason. After download, you are refunded if the archive does not build from its own README, a feature named on the listing is missing or broken, or the licence does not match - a fix is offered first. Full terms: refund policy.
Read from the source

What's inside

Game optimizer: 37KB of source (855 lines of logic, 10 files), plus the shared agent core. Everything below is counted from that code — nothing on this list comes from the listing text.

5 commands you can run
  • bot bench
  • bot benchmark
  • bot cores
  • bot help
  • bot tiers
Tests
None ship with this engine yet.
Output
readable text · JSON
Speed
Measured: 4.80 ms mean / 208/sec — win32-x64, 2026-10-18, 300 iterations, one scheduled server frame (20,000 entities, 32 players). The live test below runs on this site's server, which has fewer cores than the build machine, so its timings are lower than this.
Outright purchase

What's inside the zip

The download is the real program and its full source, yours to keep. The terminal further down this page is a separate, read-only demo copy of the same engine: it keeps nothing and cannot write files.

game-server-tick-optimiser/
  (the START files are one folder up, beside App/; everything below is in App/)
  START_HERE.bat / start_here.command / start_here.sh   opens the workspace in your browser
  workspace/                   the workspace page, with the engine and a terminal inside it
  START_TERMINAL.bat / .command / .sh   the program itself, in a terminal window
  COMMANDS.txt                 every command, with examples
  README.md                    build, run, test, licence notes
  bin/bot.exe (or bot-macos / bot-linux)   the program, ready to run
  src/, include/ ...             the full C++ source you own
  LICENSE.txt                  what your licence allows

How it works

  1. 1Download the zip

    Unzip it anywhere. No installer, no account.

  2. 2Double-click START_HERE

    Or run the commands below from a terminal in that folder.

  3. 3Read the output

    It generates a world of 20,000 entities and 32 players and ticks it for 600 frames twice - once updating every entity every frame, once through the scheduler - then prints the entity updates and the time each took on your machine, and the difference.

All commands

Click one to put it in the live terminal below, or to copy it for the download. The full list, with every option, is COMMANDS.txt in the zip and bot --help.

  • Naive vs scheduled on the default world (20,000 entities, 32 players, 600 frames), timed on this machine
  • The same on a world you size: use your server's entity and player counts
  • With a hard cap on entity updates per frame: overflow is deferred to the next frame, not dropped
  • With the closed-loop governor moving the per-frame budget from measured frame time
  • How many entities land in each interest tier, and how often each tier updates
  • The cores this process may run on, and whether thread pinning is supported here
  • The standard measurement the published speed comes from (fixed world, one scheduled frame)
  • Self-test: a small world must tick, with less work than naive
  • Every command and option

Live output

Captured from a real run of bot bench --entities 20000 --players 32 --frames 300 on linux-x64 (the Linux x64 prebuilt program, prebuilt/game-optimizer/bot-linux, on a 2-core Intel Xeon 2.80GHz container; the seconds and microseconds are that machine's), 2026-10-05. Unedited.

  • entity updates 6000000 1794253
  • entity updates avoided 70.10 %
  • cpu time saved 60.80 %
Full output
$ bot bench --entities 20000 --players 32 --frames 300
world           20000 entities, 32 players, 300 frames
per-entity work 24 units
budget cap      unlimited

                    naive        scheduled
entity updates       6000000          1794253
cpu seconds             1.87             0.73
mean frame us        6229.69          2442.30
p99 frame us         8498.00          5092.00
worst frame us      10192.00          6524.00

entity updates avoided  70.10 %
cpu time saved          60.80 %

checksums 138786383989435432960.000000 / 36976580744980676608.000000

What the price buys

  • ✓ The full C++ source - you own your copy
  • ✓ A single ready-to-run program, no dependencies
  • ✓ Pay once and keep it
  • ✓ Runs offline, on your machine; your numbers never leave it
Personal
$800

One person, one deployment, personal use. The same program and source.

Commercial
$1,500

One organisation, any number of its staff, up to 3 deployments, commercial use - including services you sell. No source resale, no white-label.

Both licences ship the identical archive; the difference is what you may do with it.

Subscription workspace

Ask in plain language, or speak your question.

Type or speak a request. The engine answers from its own expert brief, using the AI key you connect (Gemini, OpenAI or Anthropic). Your key stays on your computer. Subscribers also get the desktop app.

  • Connect your own AI key once, on the Connect AI tab.
  • The engine never shows its code or file names.
  • Works in your browser, and as the desktop app with a subscription.
TEST IT - LIVE RUN

This listing ships its own engine tree, which does not have a live test build yet.