Server Update Released (July 18)

Started by Stormeus, Jul 18, 2016, 05:56 PM

Previous topic - Next topic

Stormeus

An update for VC:MP 0.4 (04rel004) servers has been released.
  • Fixed a bandwidth leak when streaming pickups.

Windows Server (x86)
Windows Server (x64)
Linux Server (x86)
Linux Server (x64)

EK.IceFlake

Our problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003

.

#2
Quote from: EK.CrystalBlue on Jul 18, 2016, 06:54 PMOur problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003

Out of @Stormeus 's hands I'm afraid. And frankly, not even his problem. If I may step out of my boundaries for a bit.
.

EK.IceFlake

Quote from: . on Jul 18, 2016, 06:59 PM
Quote from: EK.CrystalBlue on Jul 18, 2016, 06:54 PMOur problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003

Out of @Stormeus 's hands I'm afraid.
?

.

Out of curiosity, what's in it for the guy that still wants to use 04rel003? Let me guess... text-draws and sprites?
.

Stormeus

Quote from: EK.CrystalBlue on Jul 18, 2016, 06:54 PMOur problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003

The issue has been solved as of the latest release of the VC:MP server. The fact that you guys decided to stick with an outdated netgame version isn't an issue for us and we have no plans to backport fixes.

EK.IceFlake


VK.Angel.OfDeath

Quote from: . on Jul 18, 2016, 07:01 PMOut of curiosity, what's in it for the guy that still wants to use 04rel003? Let me guess... text-draws and sprites?

What CrystalBlue is saying is not true. I haven't updated to rel004 because it came out in the middle of a patch update I was doing for the server and I felt like at that time it wasn't 100 % necessary to convert to rel004 yet.  Now that the patch for our server is finished, I'll definitely convert to rel004.

When rel004 came out I did create a textdraw and a sprite class (on day 1) that replaced the old sprite and textdraw class and everything seemed to work just fine. But as always I am concerned about performance and I always want to make sure I am doing everything in the best way possible. KAKAN and CrystalBlue has told me in the past that in order to get the best possible performance you should put as much information in one stream as possible instead of dividing up the information into several streams. I don't really understand how that would matter when the size of the stream isn't that big, but I am definitely not the expert in client side scripting.

MEGAMIND

So this means that can we get text draws and sprites in this latest version

.

#9
@VK.Angel.OfDeath To be honest, unless you're streaming the player position/rotation several times every frame from the client to the server through your scripts, I highly doubt that you'll slow down your server anyway (depending on how many clients you and what server you're hosting). If you need advice regarding streams in vcmp to know when there could be a performance issue, don't hesitate to ask.

On the server-side things are a bit more tricky. Since there's only one buffer/stream that you can use for all players. You are most likely forced into sending small packets very frequently to not make other players wait while you build up information into a dedicated buffer/stream that you send periodically to a single player.

I remember I had to think of a more flexible way of dealing with this when I worked on my plugin.

What I did was to allow each player to have a dedicated buffer/stream where I can store information without making the other players wait and also the option to have as many other buffers/streams where I can write data and send to however many players I want. So I could eliminate that need to flush buffers/streams as early as possible to make room for other players.

Dedicated player buffers/streams:
// Build up data for each player in "parallel" (kinda)
player_1.StreamFloat(2.43);
player_1.StreamFloat(1.43);
player_1.StreamFloat(4.43);

player_2.StreamString("ABC");
player_2.StreamInt(21753);

player_1.StreamInt(1234);
player_1.StreamInt(34782);

player_2.StreamByte(123);
player_2.StreamByte(42);
player_2.StreamByte(27);
player_2.StreamByte(98);

// Send the built up data and start again (or false to continue where I left)
player_1.FlushStream(true);
player_2.FlushStream(true);

And shared player buffers and streams:
local buffer_1 = SqBuffer(128);
local buffer_2 = SqBuffer(128);

buffer_1.WriteVector3(Vector3(1.11, 2.22, 3.33));
buffer_1.WriteVector3Ex(4.44, 5.55, 6.66);
buffer_1.WriteVector3(Vector3(7.77, 8.88, 9.99));

buffer_2.WriteString("abc");
buffer_2.WriteString("xyz");
buffer_2.WriteString("ijk");

player_1.SendBuffer(buffer_1);
player_2.SendBuffer(buffer_2);
player_3.SendBuffer(buffer_1);
player_4.SendBuffer(buffer_2);

Allowing for more flexible code when sending streams from server.
.

Stormeus

@. Doesn't that functionality already exist in the Squirrel standard library with the blob class though?

http://squirrel-lang.org/squirreldoc/stdlib/stdbloblib.html

.

#11
Quote from: Stormeus on Jul 18, 2016, 08:13 PM@. Doesn't that functionality already exist in the Squirrel standard library with the blob class though?

http://squirrel-lang.org/squirreldoc/stdlib/stdbloblib.html

Yes but IIRC your streams don't allow sending blobs. Also, working with blobs to do streaming is a bit more complicated for VC:MP. First thing that comes to mind are strings. Because you have to create a 16bit (big endian) integer and then write up the string character by character (allows the scripter to easily introduce bugs). And also writing other kind of data is a bit weird since you need to add their specifier for how to be interpreted. Kinda like the format() function.


How it looks when trying to send a string with blobs:
local b = blob(128);

local str = "abc", len = str.len();

// Make the size 16bit big endian
// (squirrel is weird on bitwise. not even sure this works)
b.writen(((len >> 8) & 0xFF) | ((len & 0xFF) << 8), 'w');

// Write the string character by character
foreach (c in str)
{
    b.writen(c, 'b');
}

// Wait... how do I sent it to the player now?

How it looks when trying to send a position:
local b = blob(128);
b.writen(2.43, 'f');
b.writen(1.13, 'f');
b.writen(4.53, 'f');

You can certainly see that you're making it easy for the average vc:mp scripter to introduce bugs and ask a lot more questions then usual.
.

MEGAMIND


DizzasTeR


Anik

#14
:-\
Quote from: Doom_Kill3R on Jul 19, 2016, 09:33 AMLink for linux x64 is broken
404 Not Found

nginx/1.6.2

EDIT : It is the actual link actually .zip is twice.