28.12.2009, 21:44
I have a major question/suggestion, I'm not sure if this is the right place to post it but I'll try.
Would it not be better to separate the AMX from the SA-MP server so it only requires a .dll or .so as a gamemode?
Now you might think: "What about all those gamemodes programmed in PAWN?", well supply the AMX as a .dll or .so to use that if you have a gamemode programmed in PAWN.
This would have several advantages:
* People who want to code their gamemodes in C or C++ dont have to use those wrappers anymore so that should be faster and easier.
* It should make it easier to make SA-MP use other virtual machines/embedded languages like LUA for example.
I cannot think of any disadvantages of using this approach apart from a bit of work for Kye to move stuff around.
The reason I came up with this is because I was thinking about how the current implementation works if you want to make a gamemode with a plugin.
Say if the server wants to call a function, it calls it in the AMX, you make a little script that makes it forward that call to your plugin, your plugin then does it's stuff and returns to the AMX, the AMX then returns to the server.
That is a lot of extra stuff that needs to be done and then I'm not even talking about what if your plugin wants to execute a native function from the server, that also goes through the AMX.
Do you think I'm completely wrong here or that its a bad suggestion or perhaps you agree with me?
Well what are you waiting for? Post it, I'm looking forward to hearing your opinion!
Would it not be better to separate the AMX from the SA-MP server so it only requires a .dll or .so as a gamemode?
Now you might think: "What about all those gamemodes programmed in PAWN?", well supply the AMX as a .dll or .so to use that if you have a gamemode programmed in PAWN.
This would have several advantages:
* People who want to code their gamemodes in C or C++ dont have to use those wrappers anymore so that should be faster and easier.
* It should make it easier to make SA-MP use other virtual machines/embedded languages like LUA for example.
I cannot think of any disadvantages of using this approach apart from a bit of work for Kye to move stuff around.
The reason I came up with this is because I was thinking about how the current implementation works if you want to make a gamemode with a plugin.
Say if the server wants to call a function, it calls it in the AMX, you make a little script that makes it forward that call to your plugin, your plugin then does it's stuff and returns to the AMX, the AMX then returns to the server.
That is a lot of extra stuff that needs to be done and then I'm not even talking about what if your plugin wants to execute a native function from the server, that also goes through the AMX.
Do you think I'm completely wrong here or that its a bad suggestion or perhaps you agree with me?
Well what are you waiting for? Post it, I'm looking forward to hearing your opinion!