Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit 1663c04

Browse files
Revert "Update COMMON_MISTAKES.md"
This reverts commit cb52307.
1 parent c95c0cd commit 1663c04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/COMMON_MISTAKES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Make sure export resource settings look exactly like this or you may run into the error
55
`[Warning]: Failed to open res://Scripts/Lua, Error: 'InvalidParameter'`
66

7+
## Copying `enet.dll` to the release folder
8+
Do not forget to copy `enet.dll` next to the games executable when exporting the game or the netcode will not function properly.
9+
710
## Thread Safety
811
The netcode uses a while loop that runs constantly and thus needs to be on a separate thread from the Godot thread. Two methods are used to safely send data between threads, ConcurrentQueue<T> and Interlocked.Read(). ConcurrentQueue<T> allows any kind of data to be enqueued on one thread and dequeued on another. Interlocked.Read() is a nice and easy way to read a bool from any thread. If data is not accessed through one of these methods, then the rules of thread safety are being violated and will vastly increase the chances of the program crashing with no errors. Trying to debug errors that do not appear in the console is a nightmare, please be mindful when sending data between threads.
912

0 commit comments

Comments
 (0)