-
Notifications
You must be signed in to change notification settings - Fork 1
Settings
gnysek edited this page Aug 6, 2023
·
1 revision
This example allows to create either Server or Client(s) - but no both at once (however creating obj_client
while obj_server
is existing would do it - the only issue would be that both have Esc
key event, so pressing it destroys both).
Settings can be changed in Scripts > Settings
, however there's isn't much to configure:
-
option_ip
- it's IP to which we connect.127.0.0.1
by default, which means we're connecting to same machine. -
option_port
- port on which server would listen. Why14804
by default? That's inside joke from gmclan.org :) -
option_player_speed
- default speed of players -
option_sync_every_frames
- how often send data about player position to server - by default it's5
. It's best to not send player position data too often, as amount of data which needs to be send grows with every connected player (having 10 players means that each time we get position from one player we gonna send it to other 9, so by default it's 60/5 * 10 * 9 = 1080 stacks of id,x,y data in buffer, plus some additional TCP headers, per second).
To configure how many games is ran at once, go to Extensions > Multiclient > Multiclient
and change Number_Of_Clients
option:
By default it's 2
. For example, if you set it to 3
, it's gonna look like this:
-
option_auto_create_serv_client
- as this example is using MultiClient, it can start more than one.exe
. With this setting set totrue
instead of showing main menu, it would automatically create Server for first created window, and automatically connect as Client for every other. -
option_auto_move_window
- same as above, it would move windows to left side of screen, and then each next window would be placed +820 pixels more to right. Having 3-5 clients requires at least 2 monitors, and having even more requires more monitors.
(C) gmclan.org