Skip to content

Commit cc7a495

Browse files
committed
add sample logs and enhance timers
1 parent f526eb7 commit cc7a495

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+137
-41
lines changed

samples/ConsoleGame/PluginSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public void OnSessionStart(INetcodeSession session)
1818
if (session.TryGetLocalPlayer(out var player))
1919
suffix = $"player_{player.Number}";
2020

21-
var fileName = $"logs/log_plugin_{session.Mode}_{suffix}.txt";
21+
var fileName = $"logs/log_plugin_{session.Mode}_{suffix}.log";
2222
textWriter = FileTextLogWriter.GetLogFileWriter(fileName, false);
2323

2424
Log("Starting Session");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
del logs\*.log
12
dotnet build -c Debug
23
start dotnet run --no-build -- 9000 2 local 127.0.0.1:9001
34
start dotnet run --no-build -- 9001 2 127.0.0.1:9000 local

samples/ConsoleGame/start_2players_1spec.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
del logs\*.log
12
dotnet build -c Debug
23
start dotnet run --no-build -- 9000 2 local 127.0.0.1:9001 s:127.0.0.1:9100
34
start dotnet run --no-build -- 9001 2 127.0.0.1:9000 local

samples/ConsoleGame/start_2players_2spec.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
del logs\*.log
12
dotnet build -c Debug
23
start dotnet run --no-build -- 9000 2 local 127.0.0.1:9001 s:127.0.0.1:9100
34
start dotnet run --no-build -- 9001 2 127.0.0.1:9000 local s:127.0.0.1:9101

samples/SpaceWar.Lobby/scripts/linux/start_2peers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
source "$(dirname "$0")/build_server.sh"
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9000 &
78
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9001 &

samples/SpaceWar.Lobby/scripts/linux/start_3peers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
source "$(dirname "$0")/build_server.sh"
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9000 &
78
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9001 &

samples/SpaceWar.Lobby/scripts/linux/start_4peers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
source "$(dirname "$0")/build_server.sh"
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9000 &
78
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9001 &

samples/SpaceWar.Lobby/scripts/linux/start_5peers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
source "$(dirname "$0")/build_server.sh"
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9000 &
78
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9001 &

samples/SpaceWar.Lobby/scripts/linux/start_6peers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
source "$(dirname "$0")/build_server.sh"
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9000 &
78
dotnet SpaceWar.dll -ServerURl "$LOBBY_SERVER_URL" -Username player -LocalPort 9001 &

samples/SpaceWar.Lobby/scripts/linux/start_6remote.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
dotnet build -c Release "$(dirname "$0")/../.."
33
pushd "$(dirname "$0")/../../bin/Release/net8.0" || exit
44
rm ./*.log
5+
rm ./logs/*.log
56

67
export LOBBY_SERVER_URL=https://lobby-server.fly.dev
78

0 commit comments

Comments
 (0)