Raised This Month: $ Target: $400
 0% 

AMX vs Metamod Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 07-29-2007 , 22:45   AMX vs Metamod Plugins
Reply With Quote #1

Before i knew about AMX, I would write plugins in/for metamod.
Well, i was thinking about porting a lot of them to AMX. But would this help anything at all? Does large plugins run better in metamod form, then AMX?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 07-30-2007 , 00:44   Re: AMX vs Metamod Plugins
Reply With Quote #2

There's added overhead in an amxx plugin vs a metamod plugin, of course.

However, most of the time the added overhead is very negligible.

If you have a very large project that you think would benefit from being in C++, and you want it to interface properly with other amxx plugins, the best solution might be to either add lots of server commands to control it, or create the core of it as an amxmodx module, and then have amxx plugins control its behavior.
__________________
fyren sucks
sawce is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-30-2007 , 09:46   Re: AMX vs Metamod Plugins
Reply With Quote #3

What about stuff like Multi-threading? (I might have this wrong) Isn't this possible when coding with dlls?
Can I take some part of the plugin, and make it have it's own thread? Which i'd assume giving me a performance advantage.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 07-30-2007 , 12:09   Re: AMX vs Metamod Plugins
Reply With Quote #4

The HL engine is not thread safe. You can spawn a thread to do a job that doesn't modify the game at all (like SQLx does), or if you're very very careful you could spawn a thread to read data (like creating bot waypoints or whatever). But you can't safely modify anything in the game from within another thread.

Stuff you do from within a thread will still use the same amount of CPU, but it won't block the game server from continuing until it is done.
__________________
fyren sucks
sawce is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-30-2007 , 12:17   Re: AMX vs Metamod Plugins
Reply With Quote #5

Ah alright, thanks sawce.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-30-2007 , 13:22   Re: AMX vs Metamod Plugins
Reply With Quote #6

The concept of threading existed before the initial release of HL, it is in a way threadsafe. I mean every operating system has multiple threads that run psuedo-simultaneously (except when with multi-cores, then they do run at the same time). The game is written to have synchronization between data. If a mod like metamod altered that data incorrectly it can lead to unstable running game, all-though all you would have to do to fix that would be quit the game and disable w/e metamod you were running. All this is assuming you can write threads for metamod. If you can, I would say experiment and keep plenty of backups of whatever you write.
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt is offline
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 07-30-2007 , 22:11   Re: AMX vs Metamod Plugins
Reply With Quote #7

Quote:
Originally Posted by MysticDeath View Post
The concept of threading existed before the initial release of HL, it is in a way threadsafe.
what
__________________
fyren sucks
sawce is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 07-31-2007 , 09:57   Re: AMX vs Metamod Plugins
Reply With Quote #8

Quote:
Originally Posted by MysticDeath View Post
The concept of threading existed before the initial release of HL, it is in a way threadsafe.
I ask the same question that Sawce asked except with more confusion.
X-Script is offline
kil0
Member
Join Date: Feb 2007
Location: 63.208.142.14:27015
Old 08-01-2007 , 01:34   Re: AMX vs Metamod Plugins
Reply With Quote #9

Wow this is some hard core talk. I wish I could understand more of it lol.
__________________
spL. kil0.
spL. Clan Server- 63.208.142.14
www.spLGamers.com


kil0 is offline
Send a message via AIM to kil0
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 20:50.


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