@korial29/tiny-fps 0.136.0 → 0.138.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -101,6 +101,8 @@ PORT=8787 npx tiny-fps-server
101
101
 
102
102
  `MAP=tranquility` starts a new room on the moon map (the default is `highline`). In local mode the tab that hosts the room starts it on its client's `map` option, which the demo's Map menu sets.
103
103
 
104
+ `BOTS=8` fills each room with bots up to 8 players while at least one person plays: the bots even out the teams, and each one leaves when a person joins. In local mode it is the `bots` rule of `localSocket()`, which the demo's Bots menu sets. A bot takes the gun at its rack, runs the routes of Highline (jumps, dashes and wall-runs included) or the lanes of the Moon, takes the flag, chases the one who has its own and shoots the enemies it sees.
105
+
104
106
  ### The host picks the map
105
107
 
106
108
  The player in the room the longest is its **host**; when they leave, the next oldest player takes over. Press Esc in a game: the maps sit in the Game panel of the title screen. The host's are buttons, and the one they pick is played from the next match on, never in the middle of one (or from the next join when the room empties). Everyone else sees the maps read-only, with the host's name and pick, and the end screen says the map of the next match. The server checks that the pick comes from the host: anyone else's is ignored.
package/dist/cli.js CHANGED
@@ -4,7 +4,10 @@ import { serve } from "./server.js";
4
4
  var port = Number(process.env.PORT) || 8787;
5
5
  serve({
6
6
  port,
7
- rules: { map: process.env.MAP }
7
+ rules: {
8
+ map: process.env.MAP,
9
+ bots: Number(process.env.BOTS) || 0
10
+ }
8
11
  });
9
12
  console.log(`tiny-fps server on ws://localhost:${port}/<room>`);
10
13
  export {};