True spider walker project

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
alright, net code, here is where the mess begins lol

I have like the slightest idea of how network code "works" exactly.
so, anyone wanna fill me in on how KUpdateState() works?? haha
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
alite thx

n btw, i make great models, u be seein soon ;)
imma make this thing sooooo badass omfg LOL
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
o wow holy hell, i just looked at the kactor replication page, didnt realize how much ppl tried to get karma to work lol. i nue ppl tried to make it work but thats pretti extensive stuff haha. o wel now we have vehicles, and that sorta tells me the order of things. you know what though, ill extend sum random vehicle and put in logs and lets see the order!
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
not good...atm im in replication hell. not sure how im gonna replicate a dynamic array of structs across the network :S

edit: ok im getting desperate and got an idea. think it would be alright if i declare a non-dynamic array variable and that is what gets replicated. Downside is that you have to redefine its size everytime (re-declare it) when you extend this base class. think its alright?
 
Last edited by a moderator:

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
what are you trying to replicate here exactly?

if youre just sending across vehicle karma parameters then the best bet would be to simply extend off the SVehicle or ONSVehicle classes as they have all their stuff replicated natively (ie more efficiently)

That stuff on the KActor Replication page just covers replication of simple parameters that you'd use to make simple hard-body dynamics replicate nicely. I'm not sure how useful it would be to vehicles and stuff but you might be able to make it work.


oh yeah something else you might find handy is that you can create collision volumes and attach them to any bones in the animation browser. This means that you could concieveably create a collision box for the main body (and attach it to the root of your skeleton) and then some smaller ones and attach them to its leg bones. You could then use simple karma collision only as the collision of your object will be updating dynamically as it animates. It's probably a dodgy idea but it sounds cool and easy in my head. Of course youd have to make sure your bone animations replicate properly and probably also have bKStayUpright=true. On the other hand ive never heard of anyone trying anything like that (what with the whole multiple collision volumes on different bones thing) so it mightn't work at all.
 

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
alrdy tried, it was my first idea, its weird how the engine handles friction. the model ended up not moving at all. in all cases what i want to replicate is the vectors that are the targets for each leg. basically thats a dynamic array of structs. the issue is that the engine DOESNT replicate dynamic arrays, so im tryin to figure out how to keep em in sync. thats basically the main issue.
so any suggestions are highly appreciated :D

edit: oh and forgot to mention, yes this vehicle class does infact extend onsvehicle because i wanted to take advantage of karma replication; it just would be NICE if everything wasnt so NATIVE!!
 
Last edited by a moderator:

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
well, someone who knows more about replication might be able to answer this to you better, but would creating a static array that's quite large (say 20 members?) work? My understanding with static arrays is that when you change part of the array, the entire thing is replicated.

Now, does this mean that if you assign the first, say, two indices in the array to something and all the rest to null that it takes less to replicate than having assignments for 20 legs? I don't know, but it's something to think about. If this is the case then i'd say go for it, otherwise youre wasting a lot of bandwith.

Also, you should be sure to assign the variables for all the legs simultaneously in the same tick (I can't think why you would do it any other way but maybe you would) so that you get the most use out of replicating it.
 
Last edited:

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
funny you should mention the static array idea b/c thats exactly what i was thinking! i was thinking actually 16 members (powers of 2) and just to make sure about arrays, i read the Unreal Networking Architecture document and if you're wondering then yes, ALL OF IT. arrays are replicated 'efficiently' so as elements change, they're replicated independently as opposed to the entire array being replicated all at once. Now this doc was updated way back when in 99...but i figure it couldnt possibly get LESS efficient lol

so thats what im gonna do, leg replication issue i think is solved, FINALLY :mad:

it was actually kinda honoring to read that thing b/c tim sweeney wrote it. call me a fanboy but it kinda felt "special" :lol:

edit: completely forgot that ALL onslaught native code is posted (besides headers of course) on psyonix's website! now i can replicate chassis state PROPERLY!

edit2: scratch what i said about proper replication, been about 2 days now since ive said that and the BEST replication i can seem to get going is once every TEN SECONDS. holy **** I HATE how inaccessible replication is! OMFG SO FRUSTRATED. Im gonna subclass onshovercraft, get its replication code, and modify it as necessary, BECAUSE THIS IS MOTHER****ING BULL****
 
Last edited by a moderator:

Mr.CrackPot

New Member
Jul 23, 2005
181
0
0
alright so continuing the replication chronicles...
ive found out that replicating structs or arrays of structs is just not a good idea, you're much better off replicating separate arrays of whatever you want unreliably (not completely sure but i think reliable replication is slower for this), networks are a pain in the ass.
oh and another thing, if anyone wants to create oh...say a karma ball or something and wants it to replicate, try extending a vehicle class like say...onshovercraft, turn off any unnecessary vehicle functionality, and what you're left with is a class that replicates its karma parameters across the network extremely reliably.
i think this might actually solve the infamous karma replication problem! if anyone tries this give me some feedback, wanna c if i got the nail on the head with this one :D