These are chat archives for ikkentim/SampSharp

6th
May 2016
Vladyslav
@Seprum
May 06 2016 10:30
https://github.com/ikkentim/SampSharp/blob/master/src/SampSharp.GameMode/API/Native.cs#L413
Someone who has push rights to repo, please add string interpolation sign before string param ('$').
Tim, could you give me these rigths? I promise not to break your repo :)
Tim Potze
@ikkentim
May 06 2016 11:55
Haven't checked this chat in a bit :o I'll answer the q's in a bit
Tim Potze
@ikkentim
May 06 2016 12:46
"How about performance?" I've done a quick test, a long while ago. It's faster than pawn gamemodes and slower than sampgdk gamemodes (that last one is obivious due to the added VM layer)
"What is purpose for loading an empty.amx filterscript? Is it necessary?" Not necessary, but it fixes the OnRconCommandReceived bug.
"unless he invokes them directly in SAMP rather than passing it through the Pawn VM", I'm invoking methods trough sampgdk. It means it isn't going trough the pawn vm, but it does have to pack and unpack arguments. It's not a big deal, happens very fast. But it does have to handle argument conversion, the "slowest" being string conversions. Also, we're still dealing with a VM, the mono VM, which is pretty fast.
Vladyslav
@Seprum
May 06 2016 12:51
And what is the purpose of using Pawn VM? Why they just don't make a server release for C/++?
Tim Potze
@ikkentim
May 06 2016 12:52
@Seprum I'll add people to the repo after the release of 0.7.0 (as it's currently in a "I was working on something"-state). Until then, you can just send me pull requests. I promise to merge them fast :)
I mean @Seprum
oh thats your username,haha
Vladyslav
@Seprum
May 06 2016 12:52
:)
Tim Potze
@ikkentim
May 06 2016 12:53
I see why they use Pawn, it's an easy, relatively fast scripting language.
I've read somewhere he has considered making the mod open source, but he's not sure how to go about it
due to it branching off, noone having the same version, and then dying in the confusion
Vladyslav
@Seprum
May 06 2016 12:54
You haven't seen russian SA-MP projects probably. Thousands of people on several servers. Their gamemode has 10-20 thousands lines of code if not more. It's just awful.
Tim Potze
@ikkentim
May 06 2016 12:54
The calls from my plugin to the server are nearly as fast as if there was a pure C++ API
I used to have a server (LSRES) which gamemode had 30k lines
Vladyslav
@Seprum
May 06 2016 12:55
Was it easy to deep into it ? :D
Tim Potze
@ikkentim
May 06 2016 12:56
But I started working on that when I was 14, the code sucked and I kinda refused to work on it anymore, so that's when I wanted a proper OO language for writing game modes, and I had years of experience with C#
Vladyslav
@Seprum
May 06 2016 12:57
Haha I started to code my own pawn gamemode at same age :) And abandoned it because it's growing complexity and messing around too :)
But I didn't even imagined then that is will be possible to use OOP.
Tim Potze
@ikkentim
May 06 2016 12:59
It took some experimenting, and learning c++ :p
Vladyslav
@Seprum
May 06 2016 13:02

Yep but the results are impressive :) I am using your yet unreleased 0.7.0 version at the moment. I have downloaded MapAndreas 1.0 beta but server still gives me 3 warnings about natives:
[15:58:44] [SampSharp:Warning] Could not load native 'MapAndreas_Unload'
[15:58:44] [SampSharp:Warning] Could not load native 'MapAndreas_FindAverageZ'
[15:58:44] [SampSharp:Warning] Could not load native 'MapAndreas_SaveCurrentHMap'

Where are these functions? Have you used different version of MapAndreas?

Vladyslav
@Seprum
May 06 2016 13:54
NVM found it already. Theese versions all have seperate threads on SA-MP forum :/
Have you some plans about your gamemode and C# maybe?