AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   AMX vs Metamod Plugins (https://forums.alliedmods.net/showthread.php?t=58609)

Drak 07-29-2007 22:45

AMX vs Metamod Plugins
 
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?

sawce 07-30-2007 00:44

Re: AMX vs Metamod Plugins
 
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.

Drak 07-30-2007 09:46

Re: AMX vs Metamod Plugins
 
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.

sawce 07-30-2007 12:09

Re: AMX vs Metamod Plugins
 
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.

Drak 07-30-2007 12:17

Re: AMX vs Metamod Plugins
 
Ah alright, thanks sawce.

TheNewt 07-30-2007 13:22

Re: AMX vs Metamod Plugins
 
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.

sawce 07-30-2007 22:11

Re: AMX vs Metamod Plugins
 
Quote:

Originally Posted by MysticDeath (Post 510178)
The concept of threading existed before the initial release of HL, it is in a way threadsafe.

what

X-Script 07-31-2007 09:57

Re: AMX vs Metamod Plugins
 
Quote:

Originally Posted by MysticDeath (Post 510178)
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.

kil0 08-01-2007 01:34

Re: AMX vs Metamod Plugins
 
Wow this is some hard core talk. I wish I could understand more of it lol.


All times are GMT -4. The time now is 20:49.

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