• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

buffers and break;

Xer0botXer0

Senpai
Hi guys,

so im wondering what happens when the client requests data from the server, then the server sends it, so in the client networking event the client uses buffer_read to get the information right.

so what if I do an if statement or a case statement, where the one case says okay read the data, and the other case says ignore it. or I read some of the data and leave the rest, will this cause issues ? what happens to that unread data ?

Im receiving player property information, but I only want to save that data if it doesnt already exist.
 
O

odd17

Guest
You can read and store them in variables, then do your logic if you want to use them or not.

Code:
var v = buffer_read(buff, buffer_f32);
 

Xer0botXer0

Senpai
Sure I could, if it will indeed cause problems, thank you.

But will it cause problems ? Im hoping that if I dont read the data when received that it'll just get chucked or what ever.
 
T

ThunkGames

Guest
Unused buffer data is discarded. It won't trigger the networking event the next step or "clog up" the buffer the next time a packet is received. I think this is what you were asking, correct?
 
Top