Vice City: Multiplayer

News & Announcements => Server & Plugin Updates => Topic started by: Stormeus on July 18th, 2016, 06:56 PM

Title: Server Update Released (July 18)
Post by: Stormeus on July 18th, 2016, 06:56 PM
An update for VC:MP 0.4 (04rel004) servers has been released.

Windows Server (x86)(https://v04.vc-mp.org/server/VCMP04_server_v21_win32.zip)
Windows Server (x64)(https://v04.vc-mp.org/server/VCMP04_server_v21_win64.zip)
Linux Server (x86)(https://v04.vc-mp.org/server/VCMP04_server_v21_linux32.zip)
Linux Server (x64)(https://v04.vc-mp.org/server/VCMP04_server_v21_linux64.zip)
Title: Re: Server Update Released (July 18)
Post by: EK.IceFlake on July 18th, 2016, 07:54 PM
Our problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003
Title: Re: Server Update Released (July 18)
Post by: . on July 18th, 2016, 07:59 PM
Quote from EK.CrystalBlue on July 18th, 2016, 07:54 PM
Our 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.
Title: Re: Server Update Released (July 18)
Post by: EK.IceFlake on July 18th, 2016, 08:00 PM
Quote from . on July 18th, 2016, 07:59 PM
Quote from EK.CrystalBlue on July 18th, 2016, 07:54 PM
Our problem isn't solved unfortunately as Lazy Angle [@VK.Angel.OfDeath] still wants to use 04rel003
Out of @Stormeus 's hands I'm afraid.
?
Title: Re: Server Update Released (July 18)
Post by: . on July 18th, 2016, 08:01 PM
Out of curiosity, what's in it for the guy that still wants to use 04rel003? Let me guess... text-draws and sprites?
Title: Re: Server Update Released (July 18)
Post by: Stormeus on July 18th, 2016, 08:07 PM
Quote from EK.CrystalBlue on July 18th, 2016, 07:54 PM
Our 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.
Title: Re: Server Update Released (July 18)
Post by: EK.IceFlake on July 18th, 2016, 08:12 PM
I know
Title: Re: Server Update Released (July 18)
Post by: VK.Angel.OfDeath on July 18th, 2016, 08:44 PM
Quote from . on July 18th, 2016, 08:01 PM
Out 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.
Title: Re: Server Update Released (July 18)
Post by: MEGAMIND on July 18th, 2016, 08:48 PM
So this means that can we get text draws and sprites in this latest version
Title: Re: Server Update Released (July 18)
Post by: . on July 18th, 2016, 09:10 PM
@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:
Code: [Select]
// 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:
Code: [Select]
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.
Title: Re: Server Update Released (July 18)
Post by: Stormeus on July 18th, 2016, 09: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
Title: Re: Server Update Released (July 18)
Post by: . on July 18th, 2016, 09:23 PM
Quote from Stormeus on July 18th, 2016, 09: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:
Code: [Select]
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:
Code: [Select]
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.
Title: Re: Server Update Released (July 18)
Post by: MEGAMIND on July 18th, 2016, 09:44 PM
It's all like ???????
Title: Re: Server Update Released (July 18)
Post by: Doom_Kill3R on July 19th, 2016, 10:33 AM
Link for linux x64 is broken
Title: Re: Server Update Released (July 18)
Post by: Anik on July 19th, 2016, 11:12 AM
:-\
Quote from Doom_Kill3R on July 19th, 2016, 10:33 AM
Link for linux x64 is broken
404 Not Found

nginx/1.6.2

EDIT : It is the actual link(http://v04.maxorator.com/server/VCMP04_server_v21_linux64.zip.zip) actually .zip is twice.