SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 08/03/2013, 09:46 AM   #11
Mellnik
Gangsta
 
Mellnik's Avatar
 
Join Date: Dec 2011
Location: Paradise Falls, CAℕADA
Posts: 768
Reputation: 373
Default AW: Gamemode SDK for C/C++ (GDK)

Awesome!
Mellnik is offline   Reply With Quote
Old 08/03/2013, 09:48 AM   #12
steki.
High-roller
 
steki.'s Avatar
 
Join Date: Nov 2010
Location: São Paulo, Brasil
Posts: 2,557
Reputation: 315
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by klklt0 View Post
Lack of knowledge?
Cmon, you should be joking with me

Just a noob don't know that having a gamemode based on a plugin it is still going to be on the same speed.
C/++ is a Impressive language, YES IT IS!, c++ is used here to give more functionality to pawn, not to write full gamemodes on it!
And you still say a Lack of knowledge?

A plugin to be executed will use more ram than the server function and script himself-
You still say a lack of knowledge?

This plugin can be runned without the .pwn script being created, but it still get's called BY THE SERVER to be executed, so it will be always more slower than the pawn script!
And you still say a lack of knowledge?

I am on a programming course for more than 1 year now, but since 4 years ago i script in c/++ based languages[php, java, javascript, c#, squirrel] as well on non c++ based languages[lua, python, delphin, pascal]
And you still say a lack of knowledge?

Just look for you, most likely you can't even declare a function in c/++ with OOP and Namespace.
And you still say a lack of knowledge?
I'm getting cancer with all your posts in this thread.
Think about this:
Pawn code is processed into opcodes which an abstract machine will process and convert it (or simply call, accordingly to the opcode and processor). That makes arithmetic and binary operations, flow control and native function calling possible and very easy to the scripter to develop an usable piece of code.

From the other side, let's think about an example: float.inc.
Will you dare to tell me a "locally" processor opcode complied dynamic library would be any slower than a pawn script on a script with only float and arithmetic functions?
If you think your high level libraries knowledge will, in some way, help you in this conversation about an opcode abstract machine and C++ std functions, you're fairly wrong.

Computers are all about the math. So, do your math! Literally.
steki. is offline   Reply With Quote
Old 08/03/2013, 09:57 AM   #13
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Gamemode SDK for C/C++ (GDK)

I'm not going to enumerate all of the advantages of C++ over the utter limited interpreted language and its VM designed to run in embedded systems with very limited resources. I'd just add that the little overhead involved in calling SA-MP natives or getting called back by the server that you might be concerned of is nothing compared to the speed of highly optimized native code you get with C/C++ (given that your server is not running on a toster).
xeeZ is offline   Reply With Quote
Old 08/03/2013, 10:18 AM   #14
GWMPT
Gangsta
 
Join Date: Nov 2012
Location: Portugal.
Posts: 988
Reputation: 287
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by ****** View Post
klklt0: Have you actually read the source of this plugin at all? Or the source of the PAWN BVM (which is open-source)? If not, then I'd support the claim of "lack of knowledge" and add that you have an "abundance of speculation" - not the same thing at all.
I've readed a bit of the GDK code, not all.
And the disadvantage was more considerated for the plugins on overall, and not for this plugin himself.
The little difference of this plugin to others is that it doesn't uses a .pwn script, but it still keeps getting called by the sa-mp server, the delay can exists or not, of course it depends on the code the function have, the calcules the server have to do, and so on, like you said.

But for other plugins, it is a bit slower because the Server needs to request to the PAWN SCRIPT which will request to the SERVER to execute the function X, which after executed will return the data to the SERVER, which will return to the PAWN function.

Since i don't know the sa-mp server architecture i can't neither say too much about it, nor how it does work internally.
So, since then it will have a little delay on the execution[even't if we don't notice it, there is a little delay].
It's like

Calls the function | executes the function | return the data
Server -> Pawn -> Server -> Plugin -> Server -> Pawn.

Quote:
Originally Posted by ****** View Post
By the way, serveral of your points were dangerously close to attacking the poster not the post - that is flaming and expressly against forum rules, debates are not.
I won't repeat it again, just make sure that he don't do the same.


@Stewie`
Are you perfect?
Because i'm not.
Failing and doing errors is a natural, no one is perfect, everyone fails, everyone do errors, and the most important, everyone learn with their errors.
GWMPT is offline   Reply With Quote
Old 08/03/2013, 10:23 AM   #15
GWMPT
Gangsta
 
Join Date: Nov 2012
Location: Portugal.
Posts: 988
Reputation: 287
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by ****** View Post
But as you point out this plugin doesn't go through PAWN scripts, so why even bring the point up?
Nevermind it
GWMPT is offline   Reply With Quote
Old 08/03/2013, 11:07 AM   #16
steki.
High-roller
 
steki.'s Avatar
 
Join Date: Nov 2010
Location: São Paulo, Brasil
Posts: 2,557
Reputation: 315
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by klklt0 View Post
Are you perfect?
Because i'm not.
Failing and doing errors is a natural, no one is perfect, everyone fails, everyone do errors, and the most important, everyone learn with their errors.
So there's your dilemma. I'm not perfect, but I try not to bullshit on something I don't know and also not to cause an indignation shitstorm like you did. You have to fill your chest and say: Please tell me where I'm wrong while I carefully read over all comments and try to aggregate as knowledge as possible! Yay.

Please don't get me wrong.
steki. is offline   Reply With Quote
Old 08/03/2013, 12:11 PM   #17
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 311
Default Re: Gamemode SDK for C/C++ (GDK)

Come on guys, chill out, we are kind of going off topic here. I would also like to congratulate xeeZ on this development, I find it quite useful and might post in here later about them, after ******-ing.

OFF-TOPIC: Also, klklt0, I suggest you try 'discussing' this over IRC with ******, as it's almost impossible here to have a healthy discussion / debate with a moderator / beta tester without hundreds of 'loyal members' abusing you.
(No offense at any members)
RajatPawar is offline   Reply With Quote
Old 08/03/2013, 12:21 PM   #18
GWMPT
Gangsta
 
Join Date: Nov 2012
Location: Portugal.
Posts: 988
Reputation: 287
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by Stewie` View Post
So there's your dilemma. I'm not perfect, but I try not to bullshit on something I don't know and also not to cause an indignation shitstorm like you did. You have to fill your chest and say: Please tell me where I'm wrong while I carefully read over all comments and try to aggregate as knowledge as possible! Yay.

Please don't get me wrong.
I understand what you mean.


Quote:
Originally Posted by Rajat_Pawar View Post
Come on guys, chill out, we are kind of going off topic here. I would also like to congratulate xeeZ on this development, I find it quite useful and might post in here later about them, after ******-ing.

OFF-TOPIC: Also, klklt0, I suggest you try 'discussing' this over IRC with ******, as it's almost impossible here to have a healthy discussion / debate with a moderator / beta tester without hundreds of 'loyal members' abusing you.
(No offense at any members)
I'm not a huge fan of IRC though xd
GWMPT is offline   Reply With Quote
Old 08/03/2013, 10:32 PM   #19
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Romania
Posts: 928
Reputation: 69
Default Re: Gamemode SDK for C/C++ (GDK)

I think I will try to understand all the plugin and the script... btw.. Are u the creator of the ZCMD?
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 08/03/2013, 11:13 PM   #20
Hoda
Little Clucker
 
Join Date: Mar 2013
Posts: 24
Reputation: 4
Default Re: Gamemode SDK for C/C++ (GDK)

Zeex, Not important but I tough let you know a simple bug in the plugin.
You have misspelled weaponid with weaponslot in SetPlayerAmmo

Quote:
SAMPGDK_NATIVE_EXPORT bool SAMPGDK_NATIVE_CALL sampgdk_SetPlayerAmmo(int playerid, int weaponslot, int ammo);
Which should be :
Quote:
SAMPGDK_NATIVE_EXPORT bool SAMPGDK_NATIVE_CALL sampgdk_SetPlayerAmmo(int playerid, int weaponid, int ammo);

I wanted to do a commit to GitHub but since this won't make a difference I leave this to you and your wish

EDIT : Ahh after saw a_players.inc provided with latest version of server I found out this was not your fault but Kalkor
I have reported this as a bug so he can fix it in next versions
EDIT 2: Wiki : http://wiki.sa-mp.com/wiki/SetPlayerAmmo
Hoda is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gamemode is unknown. When i connect theres no gamemode. Shannon_Brown Server Support 11 09/09/2012 08:49 AM
[GameMode] Brasil Drift Show [BDS] - Primeiro GameMode vitorzero3um Português/Portuguese 3 29/02/2012 06:48 PM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe Gamemode Xtreme-Nicole Everything and Nothing 10 10/07/2011 11:20 AM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe GameMode Xtreme-Nicole Help Archive 2 09/07/2011 11:24 AM


All times are GMT. The time now is 08:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.