Multiplayer Physic (Ball, Box, CAR)

Posted By: Rackscha

Multiplayer Physic (Ball, Box, CAR) - 07/03/10 14:16

HI,

Currently, iam working on a Multiplayer Physic demo(using ODE from 3dgs and GSTNet for network)

Iam trying to get Physic as smooth as possible and as acurate as possible to work in Multiplayer.

THis is a very early release, but i need lots of feedback on how the Physic movement feels on the CLIENT, because PHysic movement is executet on the server only, client is using only interpolation. Please try it out with friend on LAN and/or internet and report.

MY demo exists in 2 versions:

mainhigh.rar and main.rar

in mainhigh.rar you'll find the demo with a slightly raised updaterate(causing more traffic) and in main.rar you'll find a demo with lower updaterate.(dont mix them in multiplayer wink but if you do, please note it when giving feedback )


P create a ball
O create a Box
L create a car which can be controlled by the creator with WASD

For internet connection you need port 21701

main.cd.rar

mainhigh.rar

Hope to get lots of feedback.

EDIT: oh and dont mind if a box created by the server jumps a bit strange to its spawn position on the client, sometimes it happens, have to fixx it)

EDIT2: Forgot to say that the wheels for the clientside car are not integrated yet

Greets
RAckscha

Posted By: alibaba

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 14:34

I found a Bug.
If i create a car, then you canīt see the wheels at the clients side.
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 15:55

Ah didnt mention it:
Its not a bug, just not integrated wink
Posted By: Quad

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 19:58

works pretty smooth over lan
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 20:51

Only thing i hate:
Spawn 20/30 objects and ODE will shut down XDXD

@quadraxas: thanks, working on other methods to sync it better(there are micro jerks, wanna get them fixxed :D)
Posted By: darkinferno

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 22:29

why does it crash after 20/30 entities? i dont have that problem with ODE
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 23:00

i always had it.
And the funny thing is:

The programm itself doesnt stop working, just ODE.

MAybe there are toooo many collision points?
Cause when you spawn them, the are placed near to each other. so when one collides, it releases a chain reaction. Resulting in 30 entities colliding on lots of different points.

As long as ODE entitys are placed on different places in the level(and not a bunch of 30 sticking together) its working.

My conclusion is the result of what i have seen.
When all object are sticking and not moving(means stuck bug already occured), i spawn a ball, it falls down, and as soon as it collides with something: STUCK/FREEZE of this entity.

I have seen this problem long time ago in another demo(i didnt wrote).

There i had been able to spawn lots of balls. After spawning to many balls, the ODE got stuck(maybe lowering max collision points?)

Oh and iam happy to say:

Think i got it improved again.
I went from 30 updates a sec(mainhigh), to 20(main) and now iam at 15 updates a second for the physic entities, with a much more fluid movement(changed the interpolation).

Less bandwidth, much more fluid in movement grin. I'll test it tommorow on the internet with friends.

I think iam getting close to what i need.

Oh and if someone wonders why those entites are green/red:

Green means: Currently sending data to the clients
RED means: nothing sending, because iam not moving fast enough(dont want to spam the bandwidth^^)

EDIT:
oh and can someone tell me: entity skills, VAR, FLOAT? which type?

GReets
Rackscha
Posted By: Superku

Re: Multiplayer Physic (Ball, Box, CAR) - 07/03/10 23:18

Quote:
oh and can someone tell me: entity skills, VAR, FLOAT? which type?

->
Quote:
var skill[100]; // entity skills (skills > 40 only available for A6.2 or above)

Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/04/10 01:39

ah okay, so its type of VAR,
good to know^^

Ok thayt means:

Currently executing 15 updates/sec.

Updating 7 skills

7*4*15 = 420bytes of pure data/sec (dunno the overhead for adress and things like that)

GReets
Rackscha
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/07/10 18:34

OK,
thats my last version.
I reached my goal, so this project is finished(for me).

Download(fixxed as descriped in my following post)

I put it back to 20 updates a sec, added a third person camera to the car(if you spawn it), and changed the car abit.
Wheels of the car are not synched. Thei are animated by sending key values and a gues.

Controls stay the same.

Learned a lot by doing this mall peace of software.
For example the multiplayer movement, its the first smooth one i have ever done, and its usable for any kind of multiplayermovement.

Greets
Rackscha
Posted By: 3run

Re: Multiplayer Physic (Ball, Box, CAR) - 07/07/10 18:36

Thank you Rackscha!!! This is very useful! laugh
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 07/07/10 23:40

DID A BIG MISTAKE:
uploaded version is a VERY old one.

Here is the real upload(sorry^^)

Download(fixxed)


GReets
Rackscha
Posted By: 3run

Re: Multiplayer Physic (Ball, Box, CAR) - 07/08/10 00:58

I tried to get car worked, but couldn't grin Thought I was doing something wrong lol
Posted By: darkinferno

Re: Multiplayer Physic (Ball, Box, CAR) - 11/15/11 11:37

trying to download, seems download links no longer work though
Posted By: Rackscha

Re: Multiplayer Physic (Ball, Box, CAR) - 11/15/11 21:31

Reupload on request:

MPDemo(Megaupload)
Remember: this is from A7, so it used ODE. ANd GSTNet for multiplayer.
Have some ideas, maybe i'll do a version for Physx and Anet

PS: yep the code is messy. If i redo it for A8 i'll rewrite it with (hopefully) cleaner code.

Greetings
Rackscha
© 2024 lite-C Forums