Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, 7th_zorro, TedMar), 1,243 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bps reduction #309057
02/06/10 21:34
02/06/10 21:34
Joined: Oct 2005
Posts: 196
ambe Offline OP
Member
ambe  Offline OP
Member

Joined: Oct 2005
Posts: 196
How can I reduce the bps caused by sending the camera.pan ?

The player's pan is controlled by the camera.pan.
and therefor it costs me 600 bps per turn, on each player,
to send the data, even more without entrate set high.
ideas? any help is much appreciated.
thanks...


- code monkey
Re: bps reduction [Re: ambe] #309081
02/07/10 00:55
02/07/10 00:55
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
just dont send the players pan every frame.
Use a timed function to send the player pan.
10 times per second ids more than enough.

Re: bps reduction [Re: Damocles_] #309084
02/07/10 02:02
02/07/10 02:02
Joined: Oct 2005
Posts: 196
ambe Offline OP
Member
ambe  Offline OP
Member

Joined: Oct 2005
Posts: 196
Thanks for you're reply.

There is no other / better way to do this?
the results are ok, but the less updates the more "coppyness"

you see I have to reduce it to 8 - 5 updates pr second to have any real effect


- code monkey
Re: bps reduction [Re: ambe] #309113
02/07/10 11:26
02/07/10 11:26
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
I dont know exactly you arcitecture.

But: the pan is something that is important
for the client (looking, shoting)

Other players dont need to have the player super exact pan
every frame. So 5 updates per second are also enough.

To smooth this out, do the following:
send the pan 5 times per second to the server.
The server passes this to the other clients.

Other clients can smooth this pan on every frame
(given the previous and most current pan).
You can make a liniar interpolation for that, or whatever
other function you are comfortable with.

the most simple function, that works is:

other.pan = other.pan * 0.7 + other.newpan * 0.3;

which is calcualted every frame.
other.newpan is the actual pan the server sends.
You can play around with the numbers (the sum must be 1)

Its a very simple smoothing procedure.
Better is to use an interpolation, wich calculated
the average frames between panupdates, and then interpolates
between them. (be careful to adapt for jumps from 359 to 1 degree, else the playre makes a whole rotation)

When the player shoots, you should send the pan and tilt
at the time of shooting, so the server knows the exact
viewdirection at the time of shooting.

Re: bps reduction [Re: Damocles_] #309120
02/07/10 12:27
02/07/10 12:27
Joined: Oct 2005
Posts: 196
ambe Offline OP
Member
ambe  Offline OP
Member

Joined: Oct 2005
Posts: 196
thanks, ill try it out ;P


- code monkey

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1