DemoRecords in Server - Notes, facts tested

Development assistance and tutorials here.
Post Reply
Nelsona
Posts: 715
Joined: Sat Sep 30, 2017 5:03 am

DemoRecords in Server - Notes, facts tested

Post by Nelsona » Thu Jan 16, 2020 11:41 am

The EUTSource package made me curious about how a match record works on the server, not on the client side via Via network replication. Some maps caused valid records, others just DEM files. It is true that EUT has a lot of details on the server, some not even the server's job, but it helps with various troubleshooting ... I mention that the registrations do not run with XC_Engine even version 21, but registrations can be made on XC servers.
What was the problem with some recordings? I suspect the name that was processed by the EUT was not exactly in good condition and the generation of unusual invalid altered filenames. If you ask me if I solved the problem, the answer is: It seems to have been solved.
I have changed the strategy of recording names using the old and ancient "underline" character instead of ":" and "." used in time-stamp...
Then I wrote a small mutator that does pretty much what EUT says, but it automatically starts recording when the game starts. Using a "more normal" filename, we generated a DEM record named after the map name, start date and time.
The recording can then be moved more or less automatically somewhere to be examined. We have a small advantage from udemo which shows us which files are not OK to view the recording and it is desirable to have EXACT the files we have in the server. I repeat, the recordings have details in HUD and sounds very much like what a client sees when playing EUT games, it is not the same everywhere. The toy addressing server is basically like here, simple without a configuration so far:

Code: Select all

class SDemo expands Mutator;

var bool bDemoStarted;
var string filename;

event PrebeginPlay()
{}

event PostBeginPlay()
{}

function ModifyPlayer(Pawn Other)
{
	Super.ModifyPlayer(Other);

	if (bDemoStarted) return;
	else
	{
		if ( DeathMatchPlus(Level.Game).bStartMatch && !Level.bDemoRecording )
		{
			filename = String(Outer.Name);
			filename = filename$"_";
			filename = filename$LogDate();
			log("Match and Record have been started using"@filename,'AutoRecord');
			Level.ConsoleCommand("demorec \""$filename$"\"");
		}
		bDemoStarted = True;
	}
}

function string LogDate()
{
	local string d, t;

	d = Level.Year$"-"$PrePad(Level.Month,"0",2)$"-"$PrePad(Level.Day,"0",2);
	t = PrePad(Level.Hour,"0",2)$"_"$PrePad(Level.Minute,"0",2)$"_"$PrePad(Level.Second,"0",2);
	return d$"__"$t;
}

function string PrePad(coerce string rv, string p, int i)
{
	while (Len(rv) < i) rv = p$rv;
	return rv;
}
After more testing I will see if it needs some other properties or... it's enough to be only a Server-Side thing.

Good and... less good things recommended in said EUT server with regard to INI - simplified... if not too simplified.

Code: Select all

[Engine.Engine]
NetworkDevice=IpDrv.TcpNetDriver
Console=UTMenu.UTConsole
Language=int
GameEngine=Engine.GameEngine
DefaultServerGame=EUTSource.EUTDeathMatchPlus
Input=Engine.Input
Canvas=Engine.Canvas //I don't see which demoDriver it's used - does it work then ?
... //there is no render defined and nothing else related to clients
[Core.System]
PurgeCacheDays=30 //Server won't cache anything anyway
SavePath=../Save
CachePath=../Cache
CacheExt=.uxx
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
Suppress=DevLoad
Suppress=DevSave
Suppress=DevNetTraffic
Suppress=DevGarbage
Suppress=DevKill
Suppress=DevReplace
Suppress=DevSound
Suppress=DevCompile
Suppress=DevBind
Suppress=DevBsp
Suppress=DevNet
Suppress=ScriptWarning //Hooligan behavior - you should be arrested quickly and jailed !
Suppress=NetComeGo
Suppress=NotifyAcceptingConnection //I did not know this
...
[Engine.GameEngine]
CacheSizeMegs=128
UseSound=False //I suspected that server don't need this - it's stupid - plain servers by EPIC are having this TRUE, after messing up with GetSoundDuration too... 
ServerPackages=EUTSource //This is probably pointless - game-type goes automated mapped in ServerPackages
ServerPackages=EUT_Sounds
ServerPackages=EUT_Textures
...
ServerActors=EUTSource.EUT //this is firing mutator responsable with demo record and HUD and... all that stuff - excuse me but these docs have holes
...
[Engine.GameInfo]
...
PlayerViewDelay=1.000000
PlayerSpeechDelay=0.300000
PlayerTauntDelay=2.000000
bLogAdminActions=True
LoginDelaySeconds=3.000000
MaxLoginAttempts=3
ActionToTake=DO_KickBanPlayer //Now this is good for spoofing logins in order to gain a native weak ban...
...
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -

Nelsona
Posts: 715
Joined: Sat Sep 30, 2017 5:03 am

Re: DemoRecords in Server - Notes, facts tested

Post by Nelsona » Thu Jan 16, 2020 5:32 pm

Reporting time
It looks like if server is another machine with another way of working (using UCC and Not U..T...exe) these demo files have no use. I don't know if that DEM file it's storing or not some performance data and then running on a different machine won't really happen. A few times demo has started, and the only thing which I could see was the map (without weapons, without Bots) and one or two kill messages. So to speak server might have things incompatible with a client on another machine and... I could figure this with other demo files posted in forums by people and being totally useless. This is shortly what was happening so far, I'll do other checks in next time...
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -

Post Reply