AAO25.com

America's Army => mAAp Project => Topic started by: Spanky on Saturday, January 14, 2012, 22:43:55 PM

Title: Karma (Physics) Mod
Post by: Spanky on Saturday, January 14, 2012, 22:43:55 PM
Compiled a karma mod for AA earlier today. Here's a test video:
http://youtu.be/DQDCx7R8m0M?hd=1

First time physics has worked online for AA, aside from ragdoll. This has the potential to radically change gameplay.
Title: Re: Karma (Physics) Mod
Post by: Jason on Saturday, January 14, 2012, 23:53:14 PM
lol barrel surfing
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Sunday, January 15, 2012, 03:26:04 AM
lol barrel surfing

You should try it on the vending machines :D
Title: Re: Karma (Physics) Mod
Post by: Koden on Sunday, January 15, 2012, 04:19:18 AM
O_O wow. Physics in AA? That's a great step ahead  :D :D i couldn't believe it when i saw you surfing on the barrel, lolz.

Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 05:02:27 AM
There's 1 problem with this mod that I see; objects stay where they are, even with a new round. I made a post over at the Epic Games forum to see if a UScript guru can help force all Karma objects to reset to their original location at round end. If so, this mod will make a limited debut in mAAp v7. I don't want to trust it too much, it works fine in LAN games but I don't know what 150 ping will do to it.
Title: Re: Karma (Physics) Mod
Post by: Jonnym on Sunday, January 15, 2012, 06:25:32 AM
amazing!
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 14:24:42 PM
for online play perhaps u could make the barrels only respond to certain munitions? A burst from a rifle will put holes in it but wouldn't push it around, maybe explosive (grenades rpgs m203's) can be what moves them? after u refined it all and what not, just my opinion it would be silly for in a 'realistic' shooter that barrels are flung everywhere like they where beer cans

The easiest thing to do would to be add more mass and ground friction to it. I know that can be done, it's just an option. The barrels in the video have default Karma settings. Coding for certain munitions... I'm not sure how Karma objects respond to explosions and whatnot.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Sunday, January 15, 2012, 14:48:48 PM
Karma doesn't respond well to a lot of things in AA since AA is vastly different from UT. The objects respond to impacts like pegging it with a G or RPG. But if you throw a nade near it, nothing happens.

I've already been testing for the proper values for certain objects and I've gotten good numbers for crates and cardboard boxes already. We'll have to do some more work on the barrels because for some reason the AA devs gave rectangular collision boxes on barrels lmao.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 14:51:39 PM
I've already been testing for the proper values for certain objects and I've gotten good numbers for crates and cardboard boxes already.

The objects on Spankyville are boss. I'm so tempted to add Karma objects to Pipeline but I don't want to hear back from the GoodKarma dev and have all my work be pointless.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 17:59:46 PM
Bad news from the GoodKarma dev:
Quote
I'm sorry, but it's more or less the same story this time around.  I'm still going to school (full time graduate school... going on 7 years of college), but am also working part time to pay the bills, as well as the usual compliment of projects.  I can certainly try and remember specifics of the original builds, but I haven't had a UE2.5 engine game installed for quite some time.

That all being said, If you're willing to dive into the source code there may be a couple of hints I can offer:
Unrealscript is very similar to C++ and Java in syntax, if you can code in either, it's not difficult to pick up.  The class structure of the content is basically textbook examples of object oriented programming.  I don't believe the online documentation of the game's scripts is still available where I was using it, but if you're going to code, use the editor to extract all of the Unrealscript files into a directory and use them as a reference.  If you're working with GoodKarma, it may be worth exporting UT2004's scripts, since that's what it was designed to work with.  I also liked using the Context editor... it's basically just notepad, but you can download a highlighter plugin for Unrealscript which makes things visually easier to keep track of.  You can also link run commands to the function keys, so you can compile a mod and capture the output of the compiler all in the same window.

With UE2.5, and quite annoyingly, the physics are done externally through the Karma engine (whereas the collision detection is done entirely in the game engine...), so there is relatively little control you actually have in Unrealscript.  I used the KActor class (which I could verify worked in online play) as the basis for my work and at least once I had to go back to the original and paste in my added content carefully because it had stopped working.  For debugging it's an absolute must to run a dedicated server on your machine, then connect to that server with your client - even when it seems to be working in single player, the whole point is that it gets replicated over the server to all of the clients.  I think my earliest releases actually didn't work online because I wasn't testing this way and didn't know.

Take a look at the different releases and changelogs, to see which of the added features you want to be able to use - then compare the source files.  Generally, you can tell what chunks of code were added, and if you can isolate them, you can add that functionality to your own existing KActor class (or whatever your working base is) without having to tackle the whole mod.  I don't know what version of the engine your current build is, but it is entirely possible that my existing code will not function properly on it, so I would stick to working code and then try to splice in the extra functionality.

Finally... if you can find an old build of Killing Floor as a mod (before it was a separate game), for at least a little while they used GoodKarma for their physics stuff as well.  He may have moved on to something else (or even a different engine), but the mod's developer had continued using GoodKarma into the commercial stage, so there should be probably close to a year worth of Killing Floor builds (as a mod for UT2004) that have working versions of GoodKarma which may have different functionality or may be more of what you're looking for.  Generally the editor can unpack .u engine files into their Unrealscript (.uc) components, so if you can find the .u files for the mod, you can probably get the source code from them, even if it wasn't explicitly released.

Good luck, and while I don't have time to be a legitimate developer, I can certainly take some sporadic time to answer questions.  I don't know if you have the files the original email mentions, but if you need another copy, I think they've moved to here:
http://www.medpants.com/pages/projects/GoodKarma/GoodKarma.zip

-Jon
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Sunday, January 15, 2012, 18:15:37 PM
That's pretty definitive. I appreciate the guy taking the time to type all that out.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 21:47:22 PM
A practical taste of what Karma can do:
[youtube]http://www.youtube.com/watch?v=vU6bLh2_1bI&feature=youtu.be&hd=1[/youtube]
http://youtu.be/vU6bLh2_1bI?hd=1

This is a poor representation actually. I got a whopping 15FPS during this but it could be from the 44 triangle bricks hitting the other 44 triangles. If it were just 12 triangle flat bricks, FPS might be better. Might be able to shoot holes in walls. That actually gives me a good idea. Generic hole in wall with a zone sheet and fill in the gap with square bricks. Add a crack projector to tell the player there's something there and voila, insta-door.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 15, 2012, 22:52:17 PM
A minor victory for our mod:
Quote
01/15/12 19:48:25 ScriptLog: Respawn at 356.00,1838.00,-1024.00 Karma: 356.00,1838.00,-1024.00
01/15/12 19:48:25 ScriptLog: LawDogsKActor respawned at 356.00,1838.00,-1024.00 and should be at 356.00,1838.00,-1024.00

Looks like objects can respawn to their original location... I just need to find out how to get them to respawn at the end of the round.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 00:20:07 AM
:) Major victory today. I got Karma objects to respawn when a round is done.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 00:32:32 AM
:O
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 00:54:39 AM
After re-reading GoodKarma's code, I found it actually had respawn code in it. I trimmed it down to a few Karma variables and of course location & rotation. Got that combined with a if(!Level.Game.IsInState('MatchInProgress')) check every 5 seconds and respawning Karma objects are mine!

Credit for the timer and "MatchInProgress" goes to here:
http://dg.nexuz.net/forums/viewtopic.php?f=15&t=85&start=10

Here's the server log of it working online, you can pretty much follow what's going on. I can disable the debug logs for a final release but it works :)

Quote
01/15/12 21:49:07 Log: Log file open, 01/15/12 21:49:07
01/15/12 21:49:07 Init: Name subsystem initialized
01/15/12 21:49:07 Init: Detected: Microsoft Windows NT 6.1 (Build: 7601)
01/15/12 21:49:07 Init: Unreal Version: 3339
01/15/12 21:49:07 Init: AGP Version: 3339.2.5.0
01/15/12 21:49:07 Init: Character set: Unicode
01/15/12 21:49:07 Init: Base directory: D:\America's Army\System\
01/15/12 21:49:07 Init: Ini:server.ini   UserIni:User.ini
01/15/12 21:49:07 Init: Build label:  Build AmericasArmy_Build_[2004-06-01_02.01.01]
01/15/12 21:49:07 Init: Object subsystem initialized
01/15/12 21:49:08 Log: Executing Class Engine.ServerCommandlet
01/15/12 21:49:08 Log: Encryption key located and validated.
01/15/12 21:49:08 Log: Cheat protection disabled
01/15/12 21:49:08 Log: Browse: bridge2.aao?Name=Recruit?Class=AGP_Characters.AGP_Character?;Character=Recruit?team=255
01/15/12 21:49:08 Localization: No localization: Engine.Progress.LoadingMap (int)
01/15/12 21:49:09 Log: Collecting garbage
01/15/12 21:49:09 Log: Purging garbage
01/15/12 21:49:09 Log: Garbage: objects: 40216->40212; refs: 507346
01/15/12 21:49:09 Log: URL Option string: ?Name=Recruit?Class=AGP_Characters.AGP_Character?;Character=Recruit?team=255
01/15/12 21:49:09 Log: URL option: Name=Recruit
01/15/12 21:49:09 Log: URL option: Class=AGP_Characters.AGP_Character
01/15/12 21:49:09 Log: URL option: ;Character=Recruit
01/15/12 21:49:09 Log: URL option: team=255
01/15/12 21:49:09 Log: Still no game class, now trying ini:Engine.Engine.DefaultServerGame
01/15/12 21:49:10 Log: Game class is 'AGP_GameTeamObjective'
01/15/12 21:49:10 Log: Bringing Level bridge2.myLevel up for play (25) appSeconds: 2.218000...
01/15/12 21:49:10 Log: (Karma): Autodetecting CPU for SSE
01/15/12 21:49:10 Log: (Karma): Using SSE Optimizations
01/15/12 21:49:10 ScriptLog: GameInfo::InitGame : bEnableStatLogging True
01/15/12 21:49:10 ScriptLog: Error creating log file!
01/15/12 21:49:10 ScriptLog: SimpleQR: This is a LAN server.
01/15/12 21:49:10 ScriptLog: SCIQR: This is a LAN server. Not talking to Andromeda master.
01/15/12 21:49:10 ScriptLog: GameSpyQR - IP: 127.0.0.1 port:1716 lan: 1 nat: 0
01/15/12 21:49:10 Log: GameSpy - IP: 127.0.0.1 port: 7778 Public: 0 NAT: 0
01/15/12 21:49:15 ScriptLog: the round must have ended
01/15/12 21:49:15 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:15 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:15 ScriptLog: the round must have ended
01/15/12 21:49:15 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:15 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:15 ScriptLog: the round must have ended
01/15/12 21:49:15 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:15 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:49:20 ScriptLog: the round must have ended
01/15/12 21:49:20 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:20 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:20 ScriptLog: the round must have ended
01/15/12 21:49:20 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:20 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:20 ScriptLog: the round must have ended
01/15/12 21:49:20 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:20 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:49:25 ScriptLog: the round must have ended
01/15/12 21:49:25 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:25 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:25 ScriptLog: the round must have ended
01/15/12 21:49:25 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:25 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:25 ScriptLog: the round must have ended
01/15/12 21:49:25 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:25 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:49:28 NetComeGo: Open myLevel 01/15/12 21:49:28 127.0.0.1:50667
01/15/12 21:49:28 Log: Client netspeed is 10000
01/15/12 21:49:28 AccessControl: Checking Ban Policy for: Name=asdf; IP=127.0.0.1; MAC=1c:6f:65:9d:49:fb
01/15/12 21:49:29 ScriptLog: New Player Recruit id=22e43ba8cf596238f8f2726b4cbe5a4d
01/15/12 21:49:30 ScriptLog: the round must have ended
01/15/12 21:49:30 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:30 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:30 ScriptLog: the round must have ended
01/15/12 21:49:30 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:30 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:30 ScriptLog: the round must have ended
01/15/12 21:49:30 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:30 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:49:35 ScriptLog: the round must have ended
01/15/12 21:49:35 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:35 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:35 ScriptLog: the round must have ended
01/15/12 21:49:35 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:35 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:35 ScriptLog: the round must have ended
01/15/12 21:49:35 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:35 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:49:40 ScriptLog: the round must have ended
01/15/12 21:49:40 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:49:40 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:49:40 ScriptLog: the round must have ended
01/15/12 21:49:40 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:49:40 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:49:40 ScriptLog: the round must have ended
01/15/12 21:49:40 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:49:40 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:50:25 ScriptLog: the round must have ended
01/15/12 21:50:25 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:50:25 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:50:25 ScriptLog: the round must have ended
01/15/12 21:50:25 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:50:25 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:50:25 ScriptLog: the round must have ended
01/15/12 21:50:25 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:50:25 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:50:30 ScriptLog: the round must have ended
01/15/12 21:50:30 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:50:30 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:50:30 ScriptLog: the round must have ended
01/15/12 21:50:30 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:50:30 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:50:30 ScriptLog: the round must have ended
01/15/12 21:50:30 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:50:30 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:50:35 ScriptLog: the round must have ended
01/15/12 21:50:35 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:50:35 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:50:35 ScriptLog: the round must have ended
01/15/12 21:50:35 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:50:35 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:50:35 ScriptLog: the round must have ended
01/15/12 21:50:35 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:50:35 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:50:38 ScriptLog: AGP_Pawn::Dying::EndState() - entered
01/15/12 21:51:00 ScriptLog: the round must have ended
01/15/12 21:51:00 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:51:00 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:51:00 ScriptLog: the round must have ended
01/15/12 21:51:00 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:51:00 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:51:00 ScriptLog: the round must have ended
01/15/12 21:51:00 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:51:00 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:51:05 ScriptLog: the round must have ended
01/15/12 21:51:05 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:51:05 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:51:05 ScriptLog: the round must have ended
01/15/12 21:51:05 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:51:05 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:51:05 ScriptLog: the round must have ended
01/15/12 21:51:05 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:51:05 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:51:10 ScriptLog: the round must have ended
01/15/12 21:51:10 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:51:10 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:51:10 ScriptLog: the round must have ended
01/15/12 21:51:10 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:51:10 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:51:10 ScriptLog: the round must have ended
01/15/12 21:51:10 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:51:10 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:51:15 ScriptLog: the round must have ended
01/15/12 21:51:15 ScriptLog: Respawn at 2135.00,-8392.00,-2.00 Karma: 2135.00,-8392.00,-2.00
01/15/12 21:51:15 ScriptLog: LawDogsKActor respawned at 2135.00,-8392.00,-2.00 and should be at 2135.00,-8392.00,-2.00
01/15/12 21:51:15 ScriptLog: the round must have ended
01/15/12 21:51:15 ScriptLog: Respawn at 2167.00,-8490.00,30.00 Karma: 2167.00,-8490.00,30.00
01/15/12 21:51:15 ScriptLog: LawDogsKActor respawned at 2167.00,-8490.00,30.00 and should be at 2167.00,-8490.00,30.00
01/15/12 21:51:15 ScriptLog: the round must have ended
01/15/12 21:51:15 ScriptLog: Respawn at 2251.00,-8360.00,30.00 Karma: 2251.00,-8360.00,30.00
01/15/12 21:51:15 ScriptLog: LawDogsKActor respawned at 2251.00,-8360.00,30.00 and should be at 2251.00,-8360.00,30.00
01/15/12 21:51:16 ScriptLog: AGP_Pawn::Dying::EndState() - entered
01/15/12 21:51:24 NetComeGo: Close TcpipConnection 127.0.0.1:50667 01/15/12 21:51:24
01/15/12 21:51:27 Exit: Preparing to exit.
01/15/12 21:51:27 Log: Purging garbage
01/15/12 21:51:27 Log: Unbound to Andromeda.dll
01/15/12 21:51:27 Log: Unbound to Core.dll
01/15/12 21:51:27 Log: Unbound to Engine.dll
01/15/12 21:51:27 Exit: Game engine shut down
01/15/12 21:51:27 Log: Unbound to AGP.dll
01/15/12 21:51:27 Log: Unbound to IpDrv.dll
01/15/12 21:51:27 Log: Unbound to XInterface.dll
01/15/12 21:51:27 Log: Unbound to Fire.dll
01/15/12 21:51:27 Log: Unbound to Editor.dll
01/15/12 21:51:27 Log: (Karma): Level Karma Terminated.
01/15/12 21:51:27 Exit: Socket shut down
01/15/12 21:51:27 Log: (Karma): MePoolMallocDestroy(): 252806448 structs still allocated
01/15/12 21:51:27 Log: Garbage: objects: 44077->0; refs: 507346
01/15/12 21:51:27 Exit: Object subsystem successfully closed.
01/15/12 21:51:27 Exit: Exiting.
01/15/12 21:51:27 Log: FileManager: Reading 0 GByte 112 MByte 681 KByte 103 Bytes from HD took 0.280000 seconds (0.215000 reading, 0.065000 seeking).
01/15/12 21:51:27 Log: FileManager: 0.018000 seconds spent with misc. duties
01/15/12 21:51:27 Uninitialized: Name subsystem shut down
01/15/12 21:51:27 Uninitialized: Allocation checking disabled
01/15/12 21:51:27 Uninitialized: Log file closed, 01/15/12 21:51:27
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 01:06:08 AM
Blue, it's up on dropbox if you want to try it. Both compiled and .uc are there. I changed tick time to 7 seconds. I think that's going to be about the limit. Time between rounds is about 15-16 seconds and I want to make sure the respawn gets executed.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 01:50:13 AM
Sounds good Ill try it out right now.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 01:53:55 AM
In the code you'll see:

Quote
if(bChanged)
   {
      NextNetUpdateTime = Level.TimeSeconds + MaxNetUpdateInterval;
      KRepState = KState;
      StateCount++;
   }

Which basically says, if the KActor has moved, update it on the client. I tried to add the respawn it in so that if a round ended, just respawn instead of updating on the client. It only worked part of the time so I reverted back to a tick timer of checking if a round is going every 10 seconds. The majority of bandwidth seems to be used while the KActor is moving. Seeing a drop in bandwidth usage while nothing is happening is quite promising.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 01:58:32 AM
Awesome. Works fine on my end respawn and all, except sometimes is takes a while for the objects to get moving.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 02:04:55 AM
Yea, there's something weird after the respawn. If you place the objects off the ground, they don't spawn in that exact location, it's almost like they've been triggered but they snap back to that location. There's something screwy there. I think it's got to do with how I copy-pasta'd GoodKarma code, maybe an extra variable that doesn't need to be there. I mean, there's a bunch of Karma values that are reset too, I only really need the location & rotation to be reset.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 02:14:21 AM
Well don't be up to your ass in code all day :D
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 02:24:47 AM
Time for you to catch up :)
Title: Re: Karma (Physics) Mod
Post by: Koden on Monday, January 16, 2012, 04:37:19 AM
You hanged-pasted that poor AI to the stairs  ;D (*mid-mouse click to switch on the roll grenade - before pressing launching key).

The physics behavior is really nice, the stone wall is a little funny but falls down in a quite realistic way. The bullets collision seems accurate. Great job!  :D
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 05:09:10 AM
Thanks Koden. Here's a video showing online Karma working properly:
[youtube]http://www.youtube.com/watch?v=XOhlJFC0HAk&feature=youtube_gdata[/youtube]
http://youtu.be/XOhlJFC0HAk?hd=1
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 16:52:40 PM
Does it still reset other karma values?
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 16:54:13 PM
Does it still reset other karma values?

I think you can tell it to reset any value of the object as long as you pull that info in PreBeginPlay() I think it is.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 16, 2012, 16:56:45 PM
Ok cool. You wouldn't want all the hard work of figuring out nice values for an object to go the waste at the end of a round :D
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 16, 2012, 17:00:00 PM
Ok cool. You wouldn't want all the hard work of figuring out nice values for an object to go the waste at the end of a round :D

I think I'm just going to have the objects reset to their original location & rotation. I imagine that Karma values would stay the same. That's something else to test though.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 02:20:22 AM
I give up. I can't get the Karma objects to respawn properly, even in situations where the objects aren't suspended in mid-air. I tried corrugated metal and stacks of barrels. It seems like all the objects respawn on the server but not on the client. I've tried a ton of stuff and I just don't know enough about UScript to fix it.
Title: Re: Karma (Physics) Mod
Post by: Jonnym on Wednesday, January 18, 2012, 02:30:13 AM
have you tried looking in the code from the killing floor mod from ut2004 to see how they did it?
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 02:37:50 AM
The Killing Floor code is based on GoodKarma and I've e-mailed the developer of GoodKarma a few times but he's largely unable to help with a busy life. GoodKarma fails to compile in AA due to a LOT of missing resources and code that UT2004 has but AA doesn't. I don't know enough to find valid replacements for the missing code. The version I have compiled is the very root of Karma. This clan called LawDogs created it and that's what GoodKarma is based on. Maybe I'm just in a bad/tired mood now and I'll give replication another shot another time.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 16:16:07 PM
Tried compiling a severely stripped down version of GoodKarma. It works but has the same problem of respawning like LawDogs. Seems everything respawns on the server but doesn't get replicated to the client.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Wednesday, January 18, 2012, 16:48:32 PM
Take a break from it for a while. This is aggravating stuff because uscript doesn't control that much.
Title: Re: Karma (Physics) Mod
Post by: Jonnym on Wednesday, January 18, 2012, 16:57:06 PM
I though uscript controlled everything, i though the whole game was built on it, I'm wrong?

Spanky can you do it by loading a client side mod?
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 17:02:17 PM
I though uscript controlled everything, i though the whole game was built on it, I'm wrong?

Spanky can you do it by loading a client side mod?

I don't know how much UScript controls, I know the engine is a clusterfuck of C++ and UScript. If I'm thinking right, this isn't really a mod, it's more of a map-loaded feature. It's placed in the map and thus required by both the server and client and it's loaded when you load the map.

I started a thread not long ago on the Epic Games forum, here's a link:
http://forums.epicgames.com/threads/877555-Resetting-KActor-Location
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Wednesday, January 18, 2012, 19:18:37 PM
I though uscript controlled everything, i though the whole game was built on it, I'm wrong?

It really doesn't control everything. If the game was buiilt on uscript, everything would run incredibly slow. The game is built on C++ while uscript is an addition for extending the engine without touching the C++ code (which Unreal doesn't give the source of unless you buy the engine). Epic made unreal engine this way because games like quake had to be recompiled over and over everytime you changed something since they ran on dll's.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 20:48:10 PM
I'm working with the GoodKarma dev now and his suggestions have helped. Now all the KActors respawn properly but there's fighting, like the server wants to keep the objects stationary while the client says "hey, this stack of barrels should fall over".

On the positive side, Blue's suggestion for barrel collision works. They roll nicely.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Wednesday, January 18, 2012, 21:52:46 PM
I've never heard of a more epic battle of software.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 18, 2012, 23:07:06 PM
Watch the epic battle, keep an eye on the right side of the video in-between rounds:
http://www.youtube.com/watch?v=hQCmJIukfw4
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Thursday, January 19, 2012, 00:32:16 AM
I couldn't help but lol at that. Speechless.
Title: Re: Karma (Physics) Mod
Post by: Koden on Thursday, January 19, 2012, 04:08:42 AM
Lol, they truly have a life on their own. You gave it that spark ;D reminds me of some Fallout objects behavior.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Saturday, January 21, 2012, 16:50:17 PM
This guy on the EpicGames forums is going to help out with this mod:
http://forums.epicgames.com/members/1423669-VendorX

I got him setup with compiling and sent him various versions of the scripts. I told him too that I'd buy him a beer over Paypal for helping out.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Saturday, January 21, 2012, 18:02:44 PM
Well damn, I'm surprised you've found someone. My face is just :O
Title: Re: Karma (Physics) Mod
Post by: Spanky on Saturday, January 21, 2012, 19:35:39 PM
Yea, he actually mentioned too that he could write a C# class exporter so we could have the AA 2.5 source:

Quote
I can write AA class exporter in C#, but this will take some time...
Quote
I tell you about class exporter, because if you have your own server with independent AA version, than you can modify whole gameplay. To make restart NetKActor right we need add call to Reset() in GameInfo...
Title: Re: Karma (Physics) Mod
Post by: Spanky on Sunday, January 22, 2012, 17:43:26 PM
I'm finding out that part of the problem with this mod is (you guessed it) the engine. UT2004 was built on UE2, AA is UE2.5 which is build 3336 in UE. We're using build 2226 of UE Runtime to compile mods. Also, the AA editor we have is UE2.1. 3 different engine versions trying to create compatible stuff... gets things more complicated. But, I haven't heard from VendorX that it's "impossible".
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Sunday, January 22, 2012, 17:48:11 PM
Holy seatbelts. I had no idea lmfaooooooooooooo.

I always knew AA2.5 was running build 3336 (since thats ue2.5), but I thought the editor was 3336 as well.

Looks like the devs were winging all of E3 that year :P
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 23, 2012, 19:21:27 PM
From VendorX:
Quote
It's alive... It's alive...
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Monday, January 23, 2012, 19:27:38 PM
:O
Title: Re: Karma (Physics) Mod
Post by: Spanky on Monday, January 23, 2012, 19:45:59 PM
Slowly but slowly, it looks like it's possible but what works on UT2004, behaves odd on AA. Naturally. I think in a week we'll have something decent.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Tuesday, January 24, 2012, 01:46:43 AM
I think we made a step forward today, well, at least with respawning.

http://youtu.be/L-OxX-bCImo?hd=1
[youtube]http://www.youtube.com/watch?v=L-OxX-bCImo[/youtube]
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Tuesday, January 24, 2012, 01:53:39 AM
They behave in such an odd way, but you got them to reset! I like how theres that one barrel that slides away near the end of the video. Finding humor in inanimate objects.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Tuesday, January 24, 2012, 02:02:35 AM
They behave in such an odd way, but you got them to reset! I like how theres that one barrel that slides away near the end of the video. Finding humor in inanimate objects.

I seriously lol'd when I saw that barrel. It was sliding too, not rolling like you would expect. I think we're close to a solution, I think it's a matter of sorting commands differently. I also know that bumping KActors is possible online but the current version doesn't have it implemented.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Tuesday, January 24, 2012, 20:01:09 PM
Pop quiz hot shot: What's the difference between these two videos:
[youtube]http://www.youtube.com/watch?v=XOhlJFC0HAk[/youtube]
[youtube]http://www.youtube.com/watch?v=NFCUdZpM_uw[/youtube]

Seems like the first one works while the second and newer one doesn't. It finally struck me; KActors can't respawn if they're touching one another due to collision. Stack them on a shelf or just on the ground and they work fine. What a headache.
Title: Re: Karma (Physics) Mod
Post by: Jason on Tuesday, January 24, 2012, 20:48:02 PM
oh...i could have told you that
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Tuesday, January 24, 2012, 21:04:28 PM
lmfao Nate, these are some really stupid quirks man. It's like Unreal is a big joke book we're trying to piece together after it went through a paper shredder.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Tuesday, January 24, 2012, 21:05:51 PM
It could be Unreal or it could be the mod itself. All I know is that with the same code, box pyramids don't respawn while boxes on the ground do.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Tuesday, January 24, 2012, 21:08:23 PM
Even if you spread out the distance of the box pyramid?
Title: Re: Karma (Physics) Mod
Post by: Spanky on Tuesday, January 24, 2012, 21:26:37 PM
Even if you spread out the distance of the box pyramid?

The problem I had with gaps is visible in the bridge video. After a round, the server "settles" the box to the ground yet the client is still in the air. Some kind of replication mis-match.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Wednesday, January 25, 2012, 06:54:22 AM
Another improvement was made:
http://www.youtube.com/watch?v=gbvZfF1dmwA

Respawn seems to show itself a few times. This is pretty much the full GoodKarma mod with destruction, pawn damage and push/bump so you can push objects around.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Wednesday, January 25, 2012, 17:33:08 PM
Looks cool. Awesome to see the bump stuff working. Respawn does indeed seem to be working :D
Title: Re: Karma (Physics) Mod
Post by: Spanky on Thursday, January 26, 2012, 20:51:11 PM
VendorX is brilliant. The mod is fully working. But, a new problem was introduced - default values. The mod totally resets the object including the staticmesh to a hard-coded value. I think this can be changed though.

Here's a video:
http://youtu.be/gNZGk6OqwlU?hd=1
[youtube]http://www.youtube.com/watch?v=gNZGk6OqwlU[/youtube]

VendorX is going to add KMass, KFriction, KRestitution and intialStaticMesh to the respawn so those don't reset to default values for a new round. That should make it so that we can have different objects of different mass around the map. I'm not sure what to think about the disappearing that happened in that video. It seems like the object was always there, it just wasn't being drawn. All in all, it's a working physics mod that allows players to shoot and push objects around. Can't complain about that!
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Friday, January 27, 2012, 01:55:34 AM
Awesome man. That's basically flawless. Great job to VendorX and Nate.

I like the part where you hop on the barrel and walk. Now if we could get buoyancy working we could have a good round of southern log racing :D
Title: Re: Karma (Physics) Mod
Post by: Spanky on Friday, January 27, 2012, 02:13:17 AM
That's the great part about his work... he converted the whole GoodKarma mod. WaterVolume is valid in the mod. The only thing that doesn't work is KActor destruction, for some reason the Karma engine in AA causes issues with KActors having "health" so that part is disabled. But we can do inactivity respawns, respawn effects, respawn sounds, bump damage, bouyancy and more. Check out the mod :) Just be sure to copy over the mAAp staticmeshes as well, the mod uses the barrel in there by default.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Friday, January 27, 2012, 19:32:17 PM
I have a tutorial on how to make subclasses for this mod so that means we can have unlimited meshes all with different physics properties and values and they should all respawn properly. Looks like the public beta will be full of win.
Title: Re: Karma (Physics) Mod
Post by: BlueBlaster on Friday, January 27, 2012, 20:45:46 PM
Awesome. I've got good values for the very large wooden crate and the asdf cardboard boxes. So I'll make some subclasses whenever. School has been piling up on me even though it just started lol.
Title: Re: Karma (Physics) Mod
Post by: Spanky on Friday, January 27, 2012, 21:33:06 PM
Awesome. Before you create a subclass or do anything for the mod, hop on MSN. I'm juggling different versions and just now got the latest version so I'm going to try to organize everything to make it tidy. I can also explain some stuff on MSN.

*EDIT*
I just created the default Wooden Box that's plastered all over Bridge. I also set it's Karma values and the default Barrel to the values you set in Spankyville, they seemed to be pretty accurate IMO. I'm going to compile then upload to Dropbox and start work on a Karma version of PBall for the public beta.

*EDIT*
Barrel and Box are in the mod on Dropbox. One thing I'm unsure of is to how to put the pivot point for the barrel in the center so the mass is in the center. Any idea on how to do that Blue? I know you can right-click and place the pivot but there's no vertex in the middle of the barrel to click on.