XC_Engine [20] - XC_Core [7b] - XC_IpDrv

Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [14b] - XC_Core [1] - LZMA dec

Post by Higor »

Alright, some changes done during development:

Added minimal atomic operation support in XC_Core, these operations should give the ability to use thread safe access to variables, considering I took these from the UE4 sources, I shouldn't have too many problems with a linux build, unless I actually need updated libraries...
With that done, the game will create up to 4 threads (XC_GameEngine.ThreadCount setting)(I may increase the cap to 8.), dedicated to catching the moment whenever actors are ready to be replicated.

The replication loop will take a whole block targeted to a specific player and process it as a block, this means that once a single thread decides to update a remote player, it does the entire combo of prioritizing/relevancy/replication in the same task.
Since threads can only sleep for 1 millisecond (WINDOWS :mad2:) without hogging up too much CPU, the first... and maybe second player's replication task will be processed almost invariantly by the main thread an not the extra ones.

Either way, the whole new code caches the actor consider list and dispatches tasks so I can't say that the whole new replication loop being slower at < 4 player count is a failure, while the loop runs 35% slower at 1-3 player scenarios compared to non-XC_Engine loop, it becomes much faster as you add more and more players.
This means that a good box could run a 20 player server at 100 tickrate without having framerate problems, or needing a net rate adjuster.


Other info:
- Before the actor prioritization is done, the player's View is acquired using the event PlayerPawn.PlayerCalcView on the server.
That had to be left out of the multithreaded code due to being an UnrealScript event, UnrealScript uses a lot of global variables in a non-thread safe way, so technically, UnrealScript would NEVER run in more than one thread at a time without having most functions and macros rewritten (full game recompile), I guess that was yet another reason to drop in in UE4.
- Traces have their fair share of non-thread safe stuff, namely a single global variable used for 'bright corners surfaces'... had to grab a UE3 fast trace function and edit it a bit so it could be called from more than one thread.
- Lastly, the 'ReplicateActor' calls needed spin locks, basically, I can never call ReplicateActor (or initialize Channels) more than once at the same time

So in the end not everything in the replication loop runs in parallel, or start running at the same time but having at least 70% of the replication load being distributed among cores is a huge win for me.


PD: Finally fixed that faulty FCollisionCacus encroachment checks, and with no speed loss at all !
With that done, the FCollisionCacus physics behaviour should be 99% accurate to the old one, until I decide to add static mesh collision one of these days (at least for non-movable decorations, trees!)...
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [14b] - XC_Core [1] - LZMA dec

Post by sektor2111 »

If UScript calls a native function that one technically won't have multi-core support?
By example you spoke about "ISA" as being slow. What if is executed in 2 or 4 cores ? Is that possible... and other operators calling C++ code ?
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [14b] - XC_Core [2]

Post by Higor »

XC_Core version 2 update

== Merged UBinary into XC_Core
UBinary updates:
- Cannot write files outside of the game's main directory.
- ANSI raw text writing mode (statlog style).
- Works in Linux due to fixed file manager usage.
- SerializeString reformatted, can load/save in ether ANSI or UNICODE character formats.
*** Breaks compatibility with older binary files that used SerializeString
*** UNICODE saving not supported in linux (Linux strings are all ANSI, so ANSI save mode is selected)
*** UNICODE loading truncates chars to ANSI in linux


== Natives:
Optimized MakeColor native.
Changed the Actor|Actor operator into Object|Object.
Added StringToName native.


== Globals:
Added SortStringsA global (moved from XC_Engine, optimized).
Added SortStringsSA (static array version).
Moved XC_Engine's class cache structs and code into XC_Core.


== C++:
Created FPlatformAtomics macros (based on UE4 code)
These give the user basic, crossplatform access of thread safe atomic operations.
See Atomics.h (you need to include XC_CoreObj.h)


== Other:
Added missing XC_Core.int with the required commandlet definitions.
With it you can use the commandlets:
- LZMACompress
- LZMADecompress
- StripSource
- DeobfuscateNames

Exposed some more source code.
User avatar
[rev]rato.skt
Adept
Posts: 438
Joined: Mon Aug 16, 2010 1:09 pm

Re: XC_Engine [14b] - XC_Core [2]

Post by [rev]rato.skt »

Hi Higor,

how I see the mutator is working is installed correctly?
Brazilian Server:
Alma Negra - 34.95.189.187:7777
Classic - madruga.utbr.cf:7777
Duel - x1.utbr.cf:6666
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [14b] - XC_Core [2]

Post by Higor »

Find this at the beginning of your game/server log:

Code: Select all

Log: Bound to XC_Engine.dll
Log: Bound to XC_Core.dll
Init: ========= XC_ENGINE - Test build 14 =========
Init: ================= By Higor ==================
XC_Engine: Enabling Native Extensions.
Init: Unreal engine initialized
Log: Bound to WinDrv.dll
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [14b] - XC_Core [2]

Post by sektor2111 »

Code: Select all

XC_Engine: Enabling Native Extensions.
I don't have this one :)
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [14b] - XC_Core [2]

Post by Higor »

sektor2111 wrote:

Code: Select all

XC_Engine: Enabling Native Extensions.
I don't have this one :)
bEnableDebugLogs=True


On a different note, release 15 won't have many changes.
I'll settle with having the multiple replication threads as an experimental thing once I see that the single threaded code is stable.
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [14b] - XC_Core [2]

Post by sektor2111 »

Request for future update - IF possible
Speaking about client-side - maybe is subject for XConsole too.
I'm a player with a clean UT, I'm out from a server and I pick another one. If these servers have 2 different files, after exiting from the first I'll get a "mismatch file version" from the second. Actually this will need an UT restarted to gain a clean client and later I have to find that second server from list. Alternate solution: Just disconnect normally from first server and launch Console, input obj garbageand hit ENTER. Will be good to have this as a native option ? Does it bugs or not a travel ordered (losing weapons, etc.) ? Alternate solution works normally when switch MH servers from 5.03 to 5.04 without restarting game and preventing any mismatch. I guess this should be written in Tricks section ?
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: XC_Engine [14b] - XC_Core [2]

Post by Chamberly »

OMG! :shock: :idea: :loool: :tu:
Image
Image
Image Edit: Why does my sig not work anymore?
RocketJedi
Inhuman
Posts: 850
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: XC_Engine [14b] - XC_Core [2]

Post by RocketJedi »

i found something really interesting!!! you can pick up items weapons whatever as a spectator! this only happens *sometimes as now i cant do it. i posted earlier sometimes before match start i can do this as well only sometimes.

edit: i love how mapvote map reloads are instant now!
https://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image InstaGib + ComboGib + Jailbreak
Image ROSEBUM ROCKET-X RB
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [14b] - XC_Core [2]

Post by sektor2111 »

Qwerty wrote:this only happens *sometimes as now i cant do it
In any of my servers as a sane random admin I wouldn't accept spectators to mess up pickups especially when there runs a competition - player entered has less chances to win because spectator steal items ? C'mon.... It simply doesn't make any sense. Speaking different, what can do spectator with pickups after all ? I don't see any logic here. I don't recall good mods to allow messing like this, even I recall EUT games which are moving player at bottom of space to prevent anything stupid before to start match - don't say it's a bug because is not.
Chamberly wrote:OMG! :shock: :idea: :loool: :tu:
I cannot understand what you mean. Have you checked this?
User avatar
[rev]rato.skt
Adept
Posts: 438
Joined: Mon Aug 16, 2010 1:09 pm

Re: XC_Engine [14b] - XC_Core [2]

Post by [rev]rato.skt »

Hi,

Look my ini and help-me, what I did something wrong....

Brazilian Server:
Alma Negra - 34.95.189.187:7777
Classic - madruga.utbr.cf:7777
Duel - x1.utbr.cf:6666
RocketJedi
Inhuman
Posts: 850
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: XC_Engine [14b] - XC_Core [2]

Post by RocketJedi »

sektor2111 wrote:
Qwerty wrote:this only happens *sometimes as now i cant do it
In any of my servers as a sane random admin I wouldn't accept spectators to mess up pickups especially when there runs a competition - player entered has less chances to win because spectator steal items ? C'mon.... It simply doesn't make any sense. Speaking different, what can do spectator with pickups after all ? I don't see any logic here. I don't recall good mods to allow messing like this, even I recall EUT games which are moving player at bottom of space to prevent anything stupid before to start match - don't say it's a bug because is not.
Chamberly wrote:OMG! :shock: :idea: :loool: :tu:
I cannot understand what you mean. Have you checked this?
regardless of what you think, if spectators can steal items during a game as well as cap a flag before game start it can effect the game. It doesn't always happen, but does happen every few games.
https://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image InstaGib + ComboGib + Jailbreak
Image ROSEBUM ROCKET-X RB
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: XC_Engine [14b] - XC_Core [2]

Post by Chamberly »

Spec stealing items? FLAGS? Such thing exist? :loool:

I didn't know about the mismatch using obj garbage you mentioned, gotta try it, like omg.
[rev]rato.skt wrote:Hi,

Look my ini and help-me, what I did something wrong....

Rato, you are missing a [XC_Engine.XC_GameEngine] entry. Look at mine for example:
Spoiler
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [14b] - XC_Core [2]

Post by sektor2111 »

Chamberly wrote: I didn't know about the mismatch using obj garbage you mentioned, gotta try it, like omg.
Keep in mind, works if player doesn't have them added in system, just as Cache content. Command will remove old file from memory and a new one is added in next server.
Qwerty wrote:It doesn't always happen, but does happen every few games.
It's interesting your mods running there then... Running a normal CTF I did not see such issue as long as I'm not waiting 1 week to start game. Else if stuff get's loaded messing up player physics before starting game then you have a problem with "ModifyPlayer", so to speak, bug is successfully created as long as in default it doesn't seems to exist. And yes, AFTER ending game pickups can be collected, in next games of mine I have to fix this because it looks stupid.
Post Reply