Skip to content

Commit 4d18597

Browse files
committed
deploy: 10351a2
1 parent 55f1445 commit 4d18597

28 files changed

+150
-122
lines changed
995 Bytes
Binary file not shown.
474 Bytes
Binary file not shown.

.doctrees/bots/setup.doctree

-86 Bytes
Binary file not shown.

.doctrees/bots/setupPython.doctree

1.44 KB
Binary file not shown.
-30 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.

.doctrees/environment.pickle

0 Bytes
Binary file not shown.

_sources/bots/index.rst.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ The server generally makes no assumption on whether a connection is a bot or a r
77
Specifically, bots cannot cheat - no more than a regular player could.
88

99
.. toctree::
10-
setup
11-
setupPython
12-
programOverview
13-
programSafety
14-
performance
15-
troubleshooting
10+
setup
11+
setupPython
12+
programOverview
13+
programSafety
14+
performance
15+
troubleshooting

_sources/bots/programOverview.rst.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,38 @@ At start, you are in full control of the program.
99
Initialization
1010
^^^^^^^^^^^^^^
1111

12-
- You need to change current working directory to the ``bin`` directory in the game installation.
13-
Without it, the game will be unable to load maps and assets (even if it might happen to load the shared library).
12+
1) Change current working directory to the ``bin`` directory in the game installation.
13+
Without it, the game will be unable to load maps and assets (even if it might happen to load the shared library).
1414

1515
.. warning::
16-
Do *not* change current working directory from now on.
16+
Do *not* change current working directory afterwards.
1717

18-
- Next, you load the shared library.
18+
2) Load the shared library.
1919

2020
.. tab-set::
2121
:sync-group: language
2222

2323
.. tab-item:: Python
2424
:sync: python
2525

26-
TODO
26+
Class UwapiLibrary is responsible for loading the library.
27+
This is done in the ``main.py``.
2728

2829
.. tab-item:: C#
2930
:sync: csharp
3031

31-
The library is automatically loaded when you first access the global ``Game`` object.
32+
The library is automatically loaded when you first access the global ``Events`` object.
3233
This happens inside the ``Bot`` constructor.
3334

34-
- Setup all your callbacks now.
35-
You may also set some parameters for the connection.
35+
3) Setup all callbacks now.
36+
You may also set some parameters for the connection.
3637

3738
Connect
3839
^^^^^^^
3940
There are multiple ways to connect to a game server.
4041
The usual approach is to first try reconnecting, in case the game has crashed previously.
41-
Second, you connect to an existing server using the parameters provided in the environment variables, if any.
42-
Third, you spin up your own server.
42+
Second, you connect to an existing game server using parameters provided in the environment, if any.
43+
Third, you spin up your own game server.
4344

4445
Alternatively, you may implement your own logic to determine how to connect to a server.
4546

@@ -54,10 +55,10 @@ Notably, the ``Update`` callback is periodically called, no matter the game stat
5455
This is where you keep track of the state of the game, and perform any of your actions.
5556

5657
.. warning::
57-
The ``Update`` callback, and some others, may be called before the game has actually started (eg. in ``Session``), or when the map is not yet ``Loaded``.
58-
Be mindful of what operations are valid in these circumstances.
58+
The ``Update`` callback, and some others, may be called before the game has actually started (eg. in ``Session``), or when the map is not yet ``Loaded``.
59+
Be mindful of what operations are valid in these circumstances.
5960

60-
You may prematurely close the connection with the ``Disconnect`` function.
61+
You may prematurely close the connection with the ``disconnect`` function.
6162
This will do a graceful closing of the connection, that is, you will get some additional callbacks called.
6263
After that the connect function will return.
6364

@@ -82,7 +83,7 @@ The construction will appear only after the game server has processed the reques
8283
It is recommended to wait several ticks between these kinds of actions, to avoid placing same construction multiple times in different places.
8384

8485
.. note::
85-
Test your program over a real network, not just localhost.
86+
Test your program over a real network, not just localhost.
8687

8788
Client-only State
8889
^^^^^^^^^^^^^^^^^

_sources/bots/programSafety.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Threads
1616
-------
1717

1818
.. important::
19-
The api is strictly single-threaded!
19+
Entire uwapi is strictly single-threaded!
2020

2121
Hardened Library
2222
----------------
@@ -33,11 +33,11 @@ It is recommended to use the optimized (non-hardened) library when not actively
3333
.. tab-item:: Python
3434
:sync: python
3535

36-
TODO
36+
Use ``-O``, eg. ``python -O your_bot.py``, to use the optimized (non-hard) library.
3737

3838
.. tab-item:: C#
3939
:sync: csharp
4040

41-
Define ``UW_USE_OPTIMIZED_LIBRARY`` macro to use non-hard library.
41+
Define ``UW_USE_OPTIMIZED_LIBRARY`` macro to use the optimized (non-hard) library.
4242

4343

0 commit comments

Comments
 (0)