Author Topic: Picking Up Physics Bricks  (Read 1684 times)

I would love the little bloko guys picking bricks up and throwing them and such, and only you would see it.  Like, tossing a brick at the guy you hate, for the fun of it, start a one man snowball fight.

Ha sounds cool. You could have like a different tab for the Snow Bricks.


The problem is that the physics bricks are client sided.
I don't believe the clients could pick up a brick and throw it client sided.

Then how do the rest of the physics work?  The same way.  Only you would see it to prevent lag for an unused feature.

The server tells the client that the object was fakekilled.

That's it on the server.  Clients may see people push bricks, most likely the same way the client does.

our blocko guys should be able to randomly pick up a loose brick and toss it or something lol

Great idea, Make a snow map and throw snot balls :D :D

Fly:Exactly how I got the idea.

So anyways why would it be utterly impossible to send a message from server->all clients that a player is holding a brick and then have the client move the brick accordingly until it receives the next message from the server saying that the player has stopped?

If 2 small messages between client to server were going to cause that much lag, then games as we know them today would not have existed.

That's it on the server.  Clients may see people push bricks, most likely the same way the client does.
Yes, but those physics bricks only exist on the client side, so thus there are no server interuptions. If there were some kind of client code to make the player pick up the brick, the server could override, stick a sword in your hand, and bam. You have a brick, and a sword in 1 hand. The server doesn't know you have a brick in your hand, and your client has no control over image mounting.

So anyways why would it be utterly impossible to send a message from server->all clients that a player is holding a brick and then have the client move the brick accordingly until it receives the next message from the server saying that the player has stopped?

If 2 small messages between client to server were going to cause that much lag, then games as we know them today would not have existed.
The problem is that the server has no way of seeing if you actually could pick up the said brick.

A good example would be if the server couldn't tell when you picked up an item, and it was done client side.  A player could easily write a script that would allow them to pick up any item spawned.

The current Physics system places the bricks in around the same area, so although its client-sided everyone sees around the same thing. If we added picking up bricks it could go from Person 1 having the brick on the bed to Person 2 having their brick on the room, because they moved it.

Player clicks the mouse with no tools
This sends a message to the server, which repeats it to all players that they may be trying to pick up a brick
EACH CLIENT COPY checks all physics bricks in front of the client to see if they can be picked up
If it is, brick hovers in front of that player until they release it, otherwise ignore (e.g. lag)
Result: "picking up bricks", appears fine clientsided, with no errors and few messages

If there is lag or disconnection between clients and a brick appears out of place, they won't pick it up for anyone out of sync. Simple.

This method also fixes the problem of the server not being able to see if you can pick up the brick: it doesn't have to.
« Last Edit: February 05, 2009, 03:47:41 AM by Space Guy »