UT2U1 - Loathsomes UT Tweak - v2.0 Final

Search, find and discuss about Mutators!
User avatar
papercoffee
Godlike
Posts: 9269
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: UT2U1 - Loathsomes UT Tweak

Post by papercoffee » Sat Jun 15, 2013 7:07 pm

I want only to show you what you have done to me MrLoathsome...


I can normally win this map in 20 minutes. with a lot fewer kills.
Shot0001.png

IT WAS AWESOME!!

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Sun Jun 16, 2013 6:49 am

Excellent.

Few quick questions. Were you using any other mutators or mods in this game? And if so, which ones?

Was anything not working right? Any errors in the log file? (If you looked at it...)

(Based on your screenshot there, this has made things run approx. 3x better. :mrgreen: :wtf: :?: :ironic2: :what: :noidea)

Stay tuned. I may figure out what I did soon. :loool:
blarg

[]KAOS[]Casey
Novice
Posts: 29
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey » Sun Jun 16, 2013 8:35 am

The removal of a ton of IsA checks should reduce a lot of overhead yes. It shouldn't make the AI intrinsically behave faster, unless the tickrate of the server never actually reached what it said it would with AI on. If you're in single player, it shouldn't matter since your tickrate is your FPS, period.

IsA is a pretty shitty function. If you use IsA on ANY class, it tries to match the class to every subclass.

so if you use IsA('Nali') on, say, UnrealGameInfo it will do this.. {psuedocode obviously}

Code: Select all

if (class'UnrealGameinfo'.Name == 'Nali')

then

if (class'Gameinfo'.Name == 'Nali')

if (class'info'.Name == 'Nali')

if (class'Actor'.Name == 'Nali')

if (class'Object'.Name == 'Nali')
Obviously, none of these conditions will ever be true. So the higher up an actor tree a class is, the slower it is to perform an IsA. So to do tons of them in a row would relieve a lot of cycles.

In the future, if you're using an IsA in a mutator, and you're checking for a pawn, you can do a REALLY quick reject instead of looping over the classes for everything.

if(Other.bIsPawn) //I know it's at least a pawn now, and if i'm looking for a pawn why not use IsA?

ClassIsChildOf is probably not much faster, if any. That one has a downside of hard linking Class unless you dynamic load.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Sun Jun 16, 2013 9:55 am

Exactly !!!

And from what I have seen in the log files when doing quite a lot of logging during testing this, CheckReplacement in the BaseMutator always gets
called regardless of what any other mutator is doing.

And it gets called every single time any actor is spawned into the map. Every pawn, bullet, gib, decal, sound effect, pathnode, respawning
ammo and inventory items. Everything.
It seems the cumulative effect of eliminating all those IsA checks is the root of this nifty overall performance improvement side effect.
Can't be anything else. I added nothing here.

Compare the CheckReplacement function in Botpack.DMMutator to what I did here. Look specifically at the number of checks I removed....

I had never really looked at the DMMutator code before this. I was just tracking down one of the several reasons the troopers where having all their weapons
issues. As I was looking at it I realized that this might also enable lots of U1 content in UT without anything else happening at all. And it did.

Other than it being incompatible with gametypes or anything else that might hijack the BaseMutator position, nobody has reported a single error yet.
So far only things I am aware of that do that are various coopgame types.... Almost everything else out there is running with default DMMutator code I think.
Correct me if I am wrong. Log files in my testing, off and online have been clean. Testing with a variety of other mutators. If this has broken any of them
I haven't noticed it yet.
But it should break everything as it is. :loool:

Will do more testing soon as I get my current PC issues resolved.
blarg

[]KAOS[]Casey
Novice
Posts: 29
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey » Sun Jun 16, 2013 10:10 am

Unreal's base mutator is Mutator, which does nothing at all. The only reason DMMutator has any code is to prevent the non working U1 weapons, i'm sure. It's sad, since it was just an if/else to fix in ServerMove. If you make a gametype that fixes ServerMove in Tournamentplayer, you are pretty much 100% safe to have a stubbed basemutator.

Really, you're safe to have a stubbed base mutator almost all of the time. An ideal version of the DMMutator would scan the map for in-map versions of U1 weapons and replace them right there, instead on everything ever.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Sun Jun 16, 2013 10:27 am

The ideal version of DMMutator would have done nothing else other than the fix for the U1 weapons online.

By having it not replace anything, quite a bit of U1 content just works automatically. You can then mix U1 and UT classes in the same game with no issues.
The decision to have whatever items in the game then falls upon both mappers and the users/server admins.

Edit --

If you look close at the DMMutator code, it is not only replacing the weapons, it checks for U1 Ammo, Pickups, Jumpboots, Amplifiers, WeaponPowerUps,
KevlarSuits, SuperHealths, Armor, Bandages, Health Pickups, ShieldBelts and Invisiblitiy classes.
Every time anything spawns.

WTF were they thinking?

Without that code running in BaseMutator, you would be able to write a simple basic checkreplacement mutator to tweak UT maps to U1 items or
tweak U1 maps to contain UT items I think.

You can try that now. Just run UT2U1 with it.
blarg

User avatar
papercoffee
Godlike
Posts: 9269
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: UT2U1 - Loathsomes UT Tweak

Post by papercoffee » Sun Jun 16, 2013 12:39 pm

MrLoathsome wrote:Excellent.

Few quick questions. Were you using any other mutators or mods in this game? And if so, which ones?

Was anything not working right? Any errors in the log file? (If you looked at it...)

(Based on your screenshot there, this has made things run approx. 3x better. :mrgreen: :wtf: :?: :ironic2: :what: :noidea)

Stay tuned. I may figure out what I did soon. :loool:
This was the combo I used for this match... the Damage mutator is only set to a minimal momentum if you get killed and low self damage.
Shot0002.png
No noticeable error ...and no I didn't look into the log file ...can do next time.

User avatar
Dr.Flay
Godlike
Posts: 3210
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: UT2U1 - Loathsomes UT Tweak

Post by Dr.Flay » Sun Jun 16, 2013 2:38 pm

@Loathsome. Are you going to have to rebuild your various game-type mods ?

I just remembered a map I was mixing pickups in (or failing to). I'll have to check when I get home.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Mon Jun 17, 2013 6:00 am

@Paper. Cool. I have been testing with a few other mutators, and no problems here either.
Notice you are still using the RC1 version. If you do notice a glitch with that, grab RC2 and try it first.

@Dr.Flay. I won't have to change anything with the new gametypes. This just dropped in and worked.

Try that broken map. This might just fix it for you.

Currently my MegaTDM and MegaDomination servers are running this tweak, as well as the new
unreleased version of Swarmspawner. (99.67.106.156:7877 & 99.67.106.156:7777)

On the TDM servers, teams are 5 SkaarjTroopers with Unreal guns, and 2 teams of bots/players.
The number of bots will vary by map size as I am running the AutoFill mutator on there.

The Domination server has a monster team, and 1 or 2 teams of players/bots, depending upon which kind
of map you pick. Currently configured for normal 2 control point domination on DM or CTF maps, and
DoubleDomination with the default number of controlpoints for DOM maps.

The only change I had to make to the servers, was to decrease both the bot and monster skill quite a lot.

At the moment, the Troopers are not configured to drop their guns, so the absence of that is not a bug.

The Swarmspawner mutator is however spawning a couple of the Oldskool weapons that work good online.
Stingers and the Unreal Mini-gun. It also spawns a small amount of ammo for both of them at random
locations on the map.

I was just about to release the new versions of the gametypes and Swamspawner when my main PC took
a crap on me, and this backup that hasn't been on in 2 years is working, but having a bunch of hardware issues also.
Either the agp card died, or one of the many updates clobbered agp support.

The PC issues and some other things have me all pissed off atm, so I am just going to test what I have now
on the server for a week or 2.
blarg

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: UT2U1 - Loathsomes UT Tweak

Post by JackGriffin » Mon Jun 17, 2013 6:32 am

Higor wrote:Jack, if you're going for coopgame3, count me in.
I started both FerBotz and my old coop game at the same time way back and I feel I should have done more about it, as my post hinted, I can contribute with some interesting stuff (that code is ancient btw).
If this is still on the table Higor then let's discuss it. I was going to move to Unreal but I was a complete failure at trying to communicate with the active people. Most of the guys still dev'ing there are working at a pretty high level and maybe don't want to fool with someone multiple steps behind/below them. That's cool, I understand that. I'd end up having a lot of basic questions anyway and that might not be something they want to put up with.

So if I were to create coopgame3 what needs to be different from the way coopgame2 is done? Should I take Casey's route or Loath's?
So long, and thanks for all the fish

[]KAOS[]Casey
Novice
Posts: 29
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey » Mon Jun 17, 2013 7:18 am

Ok, for like the 8th time, Dante banned you because he's brainless. You don't have to advertise in a million places that it happened. The fact of the matter was that Dante had no idea who you were and just banned you before you could speak. I gave you the TS IP with full intentions to talk to you, and same with pcube, he has emailed you on the matter.

It's Dante's fault. > Not Yours. <

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Mon Jun 17, 2013 8:17 am

JackGriffin wrote:If this is still on the table Higor then let's discuss it. I was going to move to Unreal but I was a complete failure at trying to communicate with the active people. Most of the guys still dev'ing there are working at a pretty high level and maybe don't want to fool with someone multiple steps behind/below them. That's cool, I understand that. I'd end up having a lot of basic questions anyway and that might not be something they want to put up with.

So if I were to create coopgame3 what needs to be different from the way coopgame2 is done? Should I take Casey's route or Loath's?
Don't compare the apples to the oranges. (Which I think everybody still is doing.....)

Since I determined, with your help, that the only thing I have found this doesn't work with is gametypes, (or other mods....), that might
change the default UT DMMutator in Deathmatchplus. Then it does pretty much nothing but spew a log file accessed none errors for every actor spawned.

And the only things we have found so far that does this is coopgame2, Ecoop, the coopcontroller Jack has been working on, and possibly Caseys thing.
Haven't had time to even glance at that yet, and probably won't for a while.

As mentioned the only code I have been looking at for several years now has been Epic code.

I did break that rule last week and looked at the oldskool code when I was trying to track down why the error in coop games was occurring.
And made my brain hurt. Had to stare at it too long before I noticed the obvious change to the default BaseMutator class for the gametype.

Everybody who has ever messed with this, starting with Oldskool, has ripped out all the default DMMutator checkrepacement stuff, but then
instantly added a bunch of new stuff, and then gone directly to working on the non-trivial task of getting the Unreal SP maps to work in UT with
their new gametype. I am guessing nobody even thought about what would happen if that was just gone from default UT gametypes.

I was not even thinking about Unreal SP maps at all when I stumbled upon this. Apples vs Oranges.

I was trying to track down the reasons the Troopers had all their gun problems in regular UT games, and the checkreplacement code in DMMuator
was one of them.

Soon as I looked at it, and the amount of checks it was making, I was sure overall game performance would increase if it was gone.
Then I blinked, and looked again, and noticed that just by taking it out the vast majority of Unreal weapons/pickups should be able to co-exist with all the UT stuff.
And all the Unreal Dm maps might just drop into UT and play as they should.

Again, this is totally incompatible with every type of coop game, and not needed there anyway.

Somebody who knows told me the other day that MonsterHunt does not change the default BaseMutator. (Hi Jack)

There is a good chance this will work with MH. Somebody try it with a live MH server and let us know what happens.

Just tested a few hours on my servers. Seems to work even better there than offline.
This runs serverside in online games.

Ping seemed to be better even.
blarg

[]KAOS[]Casey
Novice
Posts: 29
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey » Mon Jun 17, 2013 8:24 am

The vast majority of gametypes probably don't change the basemutator. I think for all intents and purposes, replacing the base mutator is safe. There may be one or two gametypes where that's not the case, but chances are they're someone's personal gametype.

At the very least Loathsome, I'd recommend peeking at NSTournamentPlayer to see how ServerMove is changed. I don't know why you'd only look at epic code, there is much to learn from others, and it's how I got where I am. Epic code is usually consistent in style and you can tell when someone other than the main programmers made something. There are lots of neat tricks of how to do things with unreal that simply aren't in Epic code, but I can sort of understand your viewpoint. Just keep your eyes open and you'll learn.

edit: I may as well add that the Ping you see in game is an approximation based off a few factors:
Your server tickrate
and your real ping to server + a fudge factor

use stat net to see your real ping, but the scoreboard shows a very, very bad approximation. The higher your tickrate, the better your effective ping is. At some point, you'll get diminishing returns, but a higher tickrate helps people with really bad ping, albeit only slightly.

MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome » Mon Jun 17, 2013 9:27 am

I will look at the Epic code, then figure out how to use this ServerMove thingy to fix the default guns myself, if I can...

Nobody is paying me, so I can take as long as I want. 8)

This somewhat different approach I have been taking was done specifically because I have noticed over the years that quite a lot of
the code that is out there is horribly flawed. Not all of it of course, but a lot.

I have spent a lot of time re-writing things just because of the horrible amount of coding errors and dead/useless code they contained.
Probably more time than I have spent writing any new content.

And Epics code is no different.
Lots of that stuff could be better.

I know all about ping in the gametypes. I have had UT servers running 24/7 for a long, long time.
Never on rented server space. On linux boxes here at my house that I built myself.

I played around with hosting servers in Unreal Gold before UT99 was released.
I worked as a network admin for 25 years. Before windows. Let alone Unreal.

And I have a vague idea of how this stuff relates to UT coop servers.
I remember DarkKnights excellent server. The first server that was online using coopgame2 and playing his
tweaked UnrealSP maps.

I also remember that a few months after that 2 more coop servers showed up. Me and 3.
Think I was 2nd, and 3 was 3rd, but not 100% sure.

I am sure I was the 1st running a UT Oldskool coopserver online that used mapvote so users could play more that just the
DK maps online. (Had DK maps and the version of UTLNP that EVERYONE should use on at first.)

I am also sure I was the first and probably only sever admin to make extensive use of the AKcoop stuff.
Still have that running on one of my servers.

Although I didn't start looking at Uscript until 3 or 4 years ago, (Whenever it was that I released the XBots9b and BotOrders stufff), I have
been programming computers one way or another since 1983.

I have looked at both the scoreboard ping result and the stat net output enough, that I can look at either one and know approx. where the
other is at.

Just wanted to point some of that out before you assume I am a total noob.
blarg

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: UT2U1 - Loathsomes UT Tweak

Post by JackGriffin » Mon Jun 17, 2013 12:18 pm

[]KAOS[]Casey wrote:Ok, for like the 8th time, Dante banned you because he's brainless. You don't have to advertise in a million places that it happened. The fact of the matter was that Dante had no idea who you were and just banned you before you could speak. I gave you the TS IP with full intentions to talk to you, and same with pcube, he has emailed you on the matter.

It's Dante's fault. > Not Yours. <
I only posted in one place, in my thread at Old Unreal. I did all my apologizing by PM's to the people involved.

Just as a moment of explanation let me tell you that 15 minutes before the above happened I had just finished erasing my entire redirect (Loath has access and can verfiy this) so I could begin the migration over. I was several shades of "Aw man, damn." thinking I had really messed up so that's why I posted to Old Unreal.

The climate among active people in Unreal is...different. It looks like the group at UDHQ is about the beginning and end of 'let's sit down and BS over beer and some code'. Other dev's I contacted either ignored me or (in one case) called me 'creepy' because I said "You can call me if you want". The couple of people that did answer spent two-thirds of their replies 'warning' me about some person or another. I appreciate people feel strongly about each other but damn, I just want to talk code and maybe boobies. Mostly code.

I used to enjoy the snarky interchange and quirky behavior (God knows mine was both) but I'm getting to where I just want to get a coop server done that works and try to steer clear of existing drama. So yeah, it was a total miscommunication on the ban, you guys addressed it very quickly, but there's a lot of stuff going on in the U1 community in general.

Anyway, Casey I'm going to experiment some with your NewSchool way of handling things (thank you for permissions). The results that Loath is getting in his testing servers is beyond encouraging and the added fixes that you addressed make a good marriage to a rewrite of coopgame. Hopefully I can get this to work the way a server should work.
So long, and thanks for all the fish

Post Reply