Page 4 of 4

Re: Construction

Posted: Wed Dec 12, 2012 3:52 am
by JackGriffin
If that is true then what about players joining the map after they have spawned? There will need to be some sort of continual replication to keep relevance to all players.

I know we have debated this before Como and I hope my questions aren't taken in a bad light. Trust me when I say "If you can work this out it will be a HUGE delight to me and would likely be where I spend the last of my dev days working on." I'd love like nothing else if this were possible in some fashion.

Re: Construction

Posted: Wed Dec 12, 2012 12:04 pm
by Feralidragon
About replication:
- Data is only replicated if it changed and if and when it's relevant to the client, it's that simple.

So let's see the following conditions:
- A player joins a server mid-game:if there are new actors in the server and which are relevant to the client, they are spawned in the client, and if they have any properties changed relative its defaults (and which are defined to replicate to the client) or pending events (PostBeginPlay, some animation going on), these are also replicated/executed.
However, again, only what's relevant, so if a player joins and the first place he sees and spawns in is an empty room, it doesn't matter if there are millions of objects left to replicate in the entire level, until the player actually sees them (one way to make them relevant), no data about them is replicated at all.
- If during the time the player is in the server there's any moment where nothing changes (no values, spawns, etc), then there's absolutely no replication going on at that point.
- If something is spawned or changed but it's not relevant to the client yet, the client won't receive that data until that object becomes relevant to the client.

So, if an object changes its position 1000 times over the course of a game, only the last change is replicated if a player joins later on.
In an object changes any values during a single Tick, only the last one is considered for replication, and if it ends up being the same value it has initially at the beginning of the Tick, there's no replication.
Therefore, I don't see how having many objects in the game would lag bandwidth-wise (they can lag visually in the client if visible, but if they keep a static position, they won't replicate anything for long periods of time, and even if they move position a lot, only the Location variable is replicated, and as we all know, replication of vectors in UEngine is truncated to the nearest integer in each one of its components: X, Y and Z, so basically only 3 32bit signed integers (at max, the size may vary I believe) are being replicated, which means, about 12 bytes per update).

Of course, there's also the server CPU usage to consider since these changes have to be checked at the end of each tick. So if an object is never or is rarely updated, it's worth to mention that is best to lower its NetUpdateFrequency too.

Re: Construction

Posted: Wed Dec 19, 2012 6:39 pm
by Rakiayn
I hope you will continue this project.
do you think it could be possible to spawn the movers without them being plaed in ued first?
it would be cool if you could select the texture and sizes of the mesh before spawning them

Re: Construction

Posted: Wed Dec 19, 2012 6:40 pm
by JackGriffin
That's all possible Rak, it's just the collision that ruins it all.

Re: Construction

Posted: Wed Dec 19, 2012 8:45 pm
by comoestas
Thank you Ferali for your fantastic explanation. Since it's not declared constant, I can assume NetUpdateFrequency can be changed at runtime freely, right?

@Rakiayn
The only reason I need to place the movers first in UEd is to have a collision hull. The movers don't even have to be placed in the same map. For example, in the video, I am on CTF-Face.unr, but the movers I was placing had their collision hulls loaded from movers inside a map called ConstructionModels.unr. This way, the mod can be used on any map. Plus, the "movers" you saw in the video were actually a mesh + an invisible mover for collision. This way it is easy to change the texture of the mesh which is in the shape of the mover, while preventing the engine from complaining with occlusion errors that happens with visible movers.

@JackGriffin
I hope to erase all your doubts soon, my friend.

Re: Construction

Posted: Thu Dec 20, 2012 12:01 am
by Feralidragon
comoestas wrote:I can assume NetUpdateFrequency can be changed at runtime freely, right?
Yes, actually I already do that myself in NW3 (they generally stay with a low frequency all the time, and in NW3 I rise that frequency only when the weapon is being actively used by the player, so the weapon gets more responsive).

Re: Construction

Posted: Thu Dec 20, 2012 3:44 pm
by Rakiayn
so what kind of gameplay are you planning?
a sand box game were people can bould all they want, or maybe a sort of bunnytrack game were people have to use construction element to pass the map?

Re: Construction

Posted: Fri Dec 21, 2012 3:14 pm
by Shadow
Dr.Flay wrote:I collected together as many UEd addons as I can.
I do not know if their are any "Builders" I have missed, but check this link for what I have found.
http://my.opera.com/Unreal-Tournament/b ... -resources

Medor's re-packaged version of UT is designed for editing and comes with some installed.
Download link is in his signature.
@Medor
You could add the SDK into it, so it is pre-installed properly :tu:

I have talked with Shadow before about adding the ability to make all decorations destroyable into the SDK. It is something he is wanting to add, so I think you 2 should chat. It may save replicating similar work.

If you fancy poking around a UEd 2 curiosity, then get the mod "Spatial Fear". it is comes with some extra brush-builders, and even has extra path-node types (no use for normal UT mapping, but fun to play with).

I wonder if we could get permission to use the extra pathnode mechanics in the SDK?
comoestas wrote:@Rakiayn

That is a very kind offer, but I can't accept. I enjoy the challenge of learning these things for myself, so I would prefer to start from scratch.
But, I can say that I was very tempted to accept your offer on the chance that I might get to try out your mod. From what I've seen, I can tell its a fantastic mod, and that you've put a lot of time and thought into it.
Don't give up on it. :gj:

@Dr.Flay

There are a couple of things that I want to get done first, but I've bookmarked your page. It looks pretty comprehensive, thanks!
I'm a big fan of adding as much functionality as we can to UT, so I think that would fit well into the SDK.
Yes, yes. Why not. I'm pretty curious about this mod. Adding explosion emitters is no problem and of course we may discuss adding your technology to the SDK (you'll be mentioned in the Read Me and what not too of course)or vice versa.

Re: Construction

Posted: Fri Dec 21, 2012 8:27 pm
by Dr.Flay
Groovy.
The more heads we have thinking about new or radical ideas, the quicker it is to work out;
if and how it can work,
and if the results are worth the trouble.

Ideas for game-type usage, or implementation may help with the direction of this, I would hate to see it under-used if it is successful.

Re: Construction

Posted: Fri Dec 21, 2012 8:54 pm
by Gunner
Here is a use case:



It is not a new concept. There are several other games like it. I can see this working out in a similar way.

Re: Construction

Posted: Sat Dec 22, 2012 5:19 am
by papercoffee
Well to make a destructible map is impossible I think... but I can imagine something similar to "siege" the mainframe of the map is indestructible but everything else can be harvested and reused to build a defense wall or what ever construction.
And the Impact hammer is the tool to gather the materials and parts

Re: Construction

Posted: Wed Nov 27, 2013 8:20 am
by Dr.Flay
Progress report please.

And BTW we now have Jacks destructible brushes mod ;)

Re: Construction

Posted: Wed Nov 27, 2013 8:28 pm
by papercoffee
Dr.Flay wrote:Progress report please.

And BTW we now have Jacks destructible brushes mod ;)
To be honest, is this mod not that flexible ...you have to trick the engine with very complicated mover brushes ...and if you overuse them will the map not work the way you planned it.

Maybe some meshes instead of mover will do it. 'don't know.

Edit-----------------------------------------
Ok I forgot the round hit-box of the meshes. :x

Re: Construction

Posted: Wed Nov 27, 2013 8:56 pm
by Feralidragon
Well, probably I shouldn't say this yet, so consider the following as "vaporware" for now, but one of the parts of my next project is implementing something like this at native level, and I am probably going to go a bit overboard with it if I manage to implement what I want to implement and if I am right about the architecture I have in mind (aiming for low memory usage and high performance).