Raised This Month: $ Target: $400
 0% 

Is worth using fakemeta instead engine?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-24-2013 , 13:13   Is worth using fakemeta instead engine?
Reply With Quote #1

As i researched before fakemeta is more optimised but slower, it its just myth or what?


for example replace following: client connect, client putinserver, client disconnect, client infochanged

with fakemeta events, as i researched, fakemeta only does not have client authorized



is it worth?
seriousspot is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-24-2013 , 15:05   Re: Is worth using fakemeta instead engine?
Reply With Quote #2

not at all, there is a thread about modules efficiency
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-24-2013 , 15:20   Re: Is worth using fakemeta instead engine?
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
not at all, there is a thread about modules efficiency
such a confusing thing to decide which is better since there many of them, why just amxx can't be single module, mostly fun, ham, cstrike, engine, fakemeta, i am not talking about sql, regex and etc.

._____.

I have read whole https://forums.alliedmods.net/showthread.php?t=88792 thread, so fakemeta uses less cpu than engine or other modules as i mentioned earlier, but its slower, also performance of modules depends on situation. For example player switch code, better to use fakemeta instead engine, because engine will crash on 18++ players. Confusing.....

Last edited by seriousspot; 08-24-2013 at 15:34.
seriousspot is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2013 , 15:44   Re: Is worth using fakemeta instead engine?
Reply With Quote #4

You're focusing on the wrong things. In your example whatever fakemeta/core for these forwards, make no difference. There is no really global rule, depending on what you do, you will have to use the appropriate nativewhatever the module. That would require to know what does really the native.

If there is something you can memorize is the less natives you use, the faster your plugin is. So, if for example you need 5 natives with module X to achieve something, while you can do with 1 native with module Y, you will prefer module Y.

You should start to learn to code before trying to optimize. You can always ask afterward in scripting section if plugin can be optimized or not. That's something you will need to learn little by little anyway.
__________________

Last edited by Arkshine; 08-24-2013 at 15:48.
Arkshine is offline
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-24-2013 , 16:31   Re: Is worth using fakemeta instead engine?
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
You're focusing on the wrong things. In your example whatever fakemeta/core for these forwards, make no difference. There is no really global rule, depending on what you do, you will have to use the appropriate nativewhatever the module. That would require to know what does really the native.

If there is something you can memorize is the less natives you use, the faster your plugin is. So, if for example you need 5 natives with module X to achieve something, while you can do with 1 native with module Y, you will prefer module Y.

You should start to learn to code before trying to optimize. You can always ask afterward in scripting section if plugin can be optimized or not. That's something you will need to learn little by little anyway.
Exactly, but there should be more tutorial threads in that case owned by amxx staff or really expierenced amxx users, and always up to date will result less questions and people do more things themselfes. The thing is why there a much modules with same function where it could be picked 1 module which do same function more optimised and faster than other modules and in future that module hook will be added in one global module, Thats my point, it would be easier and better to support one module instead more of them. Or if you say function use depends on situation there could be more than one modules, which usage fully user explained

Last edited by seriousspot; 08-24-2013 at 16:35.
seriousspot is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2013 , 17:35   Re: Is worth using fakemeta instead engine?
Reply With Quote #6

All modules have not been done in a row. New modules have been added over the time. It has started with some module, each ones doing specific things. Fun module doesn't do the same as Engine. Both are handled in different ways and it doesn't make sense to make one global module, eating memory/cpu for something you don't use. Cstrike is mod-specific, it doesn't make sense to include it for all mods. Fakemeta has been added after Engine, and thought in a different way, including new tools. But it's true some can be done either with Engine or Fakemeta, like entity_get*() / pev(), here the fakemeta is global, it makes the code more readable but since it contains more code to handle all constants it's slightly slower ; though it's trivial. The point is new things are added, some are improved, but to keep backward compatibility, nothing is replaced, you see instead new natives/forwards, and sometimes new powerful modules ; so for sure you will accumulate different kind of libraries. and you will have to now what does each functions in case one in module X is handled better in module Y. Having all in one module is really not a good idea as each module does specific things and mixing all will result in a nightmare to maintain the whole code but the strong negative point is it will use unnecessary resources (you may not what I'm talking about unless you check the source code), so it would make sense to include only libraries you really need for your code.
Last, you pointed out something, unfortunately true, the lack of a solid documentations. Of course you have a lof of tutorials and such, but It would be welcomed to have a detailed and well explained documentation for each modules.
__________________
Arkshine is offline
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-24-2013 , 17:58   Re: Is worth using fakemeta instead engine?
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
All modules have not been done in a row. New modules have been added over the time. It has started with some module, each ones doing specific things. Fun module doesn't do the same as Engine. Both are handled in different ways and it doesn't make sense to make one global module, eating memory/cpu for something you don't use. Cstrike is mod-specific, it doesn't make sense to include it for all mods. Fakemeta has been added after Engine, and thought in a different way, including new tools. But it's true some can be done either with Engine or Fakemeta, like entity_get*() / pev(), here the fakemeta is global, it makes the code more readable but since it contains more code to handle all constants it's slightly slower ; though it's trivial. The point is new things are added, some are improved, but to keep backward compatibility, nothing is replaced, you see instead new natives/forwards, and sometimes new powerful modules ; so for sure you will accumulate different kind of libraries. and you will have to now what does each functions in case one in module X is handled better in module Y. Having all in one module is really not a good idea as each module does specific things and mixing all will result in a nightmare to maintain the whole code but the strong negative point is it will use unnecessary resources (you may not what I'm talking about unless you check the source code), so it would make sense to include only libraries you really need for your code.
Last, you pointed out something, unfortunately true, the lack of a solid documentations. Of course you have a lof of tutorials and such, but It would be welcomed to have a detailed and well explained documentation for each modules.
True, its useless to make one module for functions that we don't use, but if would be possible to register exact function, native etc hooks that we use in our code, rest that we don't use will not be registered - amxx could completely change.

Yes we need more detailed tutorials, i will keep learning then.
seriousspot is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-24-2013 , 19:15   Re: Is worth using fakemeta instead engine?
Reply With Quote #8

I don't think. Whatever one or several modules, doesn't change the fact you still need to know what does the function and what to use. Also, technically that's not about registering a native/forward, it's about what does the modules, hooking/doing a lot of stuff from game/metamod, that's not something you can enable/disable like that. Several modules = flexibility, maintainability, usability. Anyway Pawn is easy to learn and it's not like API is big. That's something you will learn fastly by practicing/reading tutorial/reading existing plugins/asking scripting section.
__________________
Arkshine is offline
seriousspot
BANNED
Join Date: Mar 2013
Location: Lithuania / Norway
Old 08-24-2013 , 20:20   Re: Is worth using fakemeta instead engine?
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
I don't think. Whatever one or several modules, doesn't change the fact you still need to know what does the function and what to use. Also, technically that's not about registering a native/forward, it's about what does the modules, hooking/doing a lot of stuff from game/metamod, that's not something you can enable/disable like that. Several modules = flexibility, maintainability, usability. Anyway Pawn is easy to learn and it's not like API is big. That's something you will learn fastly by practicing/reading tutorial/reading existing plugins/asking scripting section.
I know what most function does, since theres explanation in includes or documentation for most of them except pev(there exist pev research made by xpaw) or SVC's(hlsdk?), the thread point is - i need to know which is faster if there are multiple modules that does have same function and function does allmost same thing and where i should use it - depending on situation, tbh i am not a begginer here. And keeping conversation on the road about future ideas, why just don't have modules that splited in to types of functions, for example events, echos, forwards, hl1 events hook's and etc. That make it more organised also if multiple modules does have same function - keep faster and more reliable one and remove others that redundant. well thats it. Thank you for educating me.

Last edited by seriousspot; 08-24-2013 at 20:22.
seriousspot is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-24-2013 , 20:47   Re: Is worth using fakemeta instead engine?
Reply With Quote #10

He's not referring to what the function "does" in reference to your plugin, but what it calls upon through the game dll to achieve it's result. The source code is available if you wish to carry out some research.

Was already stated why the modules are not specifically organised the way you ask - because they were not all made at the same time. Not to mention you would then need to include every module regardless if they were to be divided into forwards, functions, etc.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
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

Forum Jump


All times are GMT -4. The time now is 19:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode