Skip to content

Commit 29f3abe

Browse files
committed
Multiplayer on LAN finally finished
- Table in join-game menu is working as it should be - LAN broadcasting and listening finished (using UDP clients)
1 parent 5c49c2d commit 29f3abe

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed
Binary file not shown.
4 KB
Binary file not shown.

docs/NetworkDiscovery.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
### How to implement net discovery ?
3+
4+
1. use integrated NetworkDiscovery from unity
5+
6+
2. do it yourself with UDP clients
7+
8+
***
9+
10+
### NetworkDiscovery pros:
11+
12+
- house-keeping done for you (performance, multiple threads ?, errors when reading data ?, broadcast key, version, etc)
13+
14+
- works on all platforms ?
15+
16+
17+
### NetworkDiscovery cons:
18+
19+
- networking is no longer maintained by unity
20+
21+
- needs a separate game object because it calls DontDestroyOnLoad()
22+
23+
- sometimes mixes broadcast hostId with the one from network server - when you try to start network server, it says it can not open port (even through server was stopped, and noone should be listening on that port)
24+
25+
- can't properly shutdown sockets, hosts or whatever - so when you start/stop broadcasting or receiving multiple times, it suddenly displays error that it can not open socket on specified port
26+
27+
- who knows what more bugs it has
28+
29+
- some of these bugs are inside NetworkTransport class, which is closed source, so they can't be fixed
30+

docs/todo.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@
2929

3030
- disable *end round* button when round system is disabled
3131

32-
- events in NetworkEventsDispatcher should be invoked exception safe
32+
- score canvas should be scaled with screen size (too small letters and too large scoreboard on full HD)
33+
34+
- choose-team window is too large on full HD
35+
36+
- fix flash which happens when exiting settings menu - possible cause for it is random execution order of scripts - Menu.Update() of the menu which should be opened, is executed 1 frame later, and hence the flash - menus should be enabled/disabled by MenuManager
3337

3438

3539
### BUGS:
3640

3741
- player prefs are not working on linux – randomly saves configuration to disk or adds new cvars
3842

39-
- teams are not correct in clients’ scoreboard ?
40-
4143

4244
### TIPS:
4345

@@ -68,13 +70,17 @@
6870

6971
- if FFA is on, spawn player when he logs in, and when scene changes - add separate script FFASpawnPlayer
7072

73+
- teams are not correct in clients’ scoreboard
74+
7175
- ignore network log message : host id {0} has been already deleted
7276

7377
- when starting server, check if online scene is assigned ; when starting client, check if ip address is valid
7478

7579
- scoreboard – should we bother with adapting to UI table ? no ; add option to override entry creation (for example, to add buttons)
7680

77-
- change project name
81+
- events in NetworkEventsDispatcher should be invoked exception safe
82+
83+
- LAN : test broadcasting on windows ;
7884

7985
- **editor tool for setting map cycle from build settings**
8086

0 commit comments

Comments
 (0)