Raised This Month: $350 Target: $400
 87%   Almost there!

Galileo 1.1.290 (a feature rich map voting plugin)


Post New Thread Reply   
 
Thread Tools Display Modes
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 12-27-2010 , 13:57   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1001

@RTG:
Quote:
Originally Posted by RTG View Post
...
4. choose extend
5. try to nominate map or RTV, no functionality
6. I got upset and changed map manually
I assume you mean "4. choose 'stay here'" as "extend" isn't an option during an early vote. Am I correct? What is the IP to your server?

Quote:
Originally Posted by RTG View Post
if the new version comes out, will you post a reply here and into the head topic? (sry if it is said somewhere)
I did say that I'd release new versions both on the project site and here.

What I didn't say before is that my plan is to release new versions on the project site first, and then usually a day later, release them here, assuming no major issues have cropped up in the meantime.

I will post a message here when I release the new version at the project site with a note that it'll be released here shortly thereafter.


@ConnorMcLeod:
Quote:
Originally Posted by ConnorMcLeod View Post
What about using another system than amxx tasks ?

Most of time, when the voice announce that a vote is comming, the server lags and it's really annoying for players (same occurs with default amxx plugins when remaining time is announced), dunno if it's due to task execution or spk thing.

Actually trying gal_sounds_mute 0, but would like to keep announcements.
When I ran a server, I don't recall there being much lag, and since I've been working on the plugin, I haven't experienced the lag either. Therefore, I'm going to ask you to do a couple things to see where the problem lies. Yay for you. Do what you said, set gal_sounds_mute to 15 (get rid of all sounds) for the sake of testing. Wait for the vote, was there lag?

I doubt the cause is from the tasks. I more inclined to believe it's because of the VOX. Let's find out!
__________________
Brad is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 12-27-2010 , 15:33   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1002

@RTG:
Can you give me the last 3 items from here?
__________________
Brad is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 12-28-2010 , 01:45   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1003

Brad Maybe to change this
PHP Code:
map_getIdx(text[])
{
    new 
map[MAX_MAPNAME_LEN 1];
    new 
mapIdx;
    new 
nominationMap[32];
    
    for (new 
prefixIdx 0prefixIdx g_mapPrefixCnt; ++prefixIdx)
    {
        
formatex(mapsizeof(map)-1"%s%s"g_mapPrefix[prefixIdx], text);

        for (
mapIdx 0mapIdx g_nominationMapCnt; ++mapIdx)
        {
            
ArrayGetString(g_nominationMapmapIdxnominationMapsizeof(nominationMap)-1);
            
            if (
equal(mapnominationMap))
            {
                return 
mapIdx;
            }
        }
    }
    return -
1;

to
PHP Code:
map_getIdx(text[])
{
    new 
map[MAX_MAPNAME_LEN 1];
    new 
mapIdx;
    new 
nominationMap[32];
    
    
strtolower(text)
    
    for (new 
prefixIdx 0prefixIdx g_mapPrefixCnt; ++prefixIdx)
    {
        
formatex(mapsizeof(map)-1"%s%s"g_mapPrefix[prefixIdx], text);

        
TrieGetCell(g_Trie_nominationMapmapmapIdx);
        if (
mapIdx) return mapIdx    
    
}
    return -
1;

?

This way is much better than with array
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-28-2010 , 04:30   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1004

It would be more :

Code:
if( TrieGetCell(g_Trie_nominationMap, map, mapIdx) )
{
     return mapIdx;
}
But yes, it would save some checks, though it's a very small optimization. Also, it would need to use TravTrie here, not Trie.
__________________
Arkshine is offline
user1690
Junior Member
Join Date: Dec 2010
Old 12-28-2010 , 09:46   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1005

Hi guys! I just wanted to ask if this was normal,


The RTV Part of this, everytime im on a series set of maps (zoology for example) the RTV seems to always stick at "Please wait 10mins......" and never changes, however when on a single map (Crisis2 for example) the rtv works fine.

Just wanted to see if it was normal or not, because some players seem to have complained that they cant get off the series set of maps because RTV wont let them.
user1690 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 12-28-2010 , 11:02   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1006

@-=hunter=-:
Quote:
Originally Posted by -=hunter=- View Post
Brad Maybe to change this
...
This way is much better than with array
My first question will always be, "why do you think it's better?" Even when I agree. Have you run tests? What are the results?

Quote:
Originally Posted by Arkshine View Post
But yes, it would save some checks, though it's a very small optimization.
Because of this, it's not something that is a priority. It's likely to get looked when there's an overall code overview.

But yes, I'm very interested in seeing actual data as to why one way of doing something is "better" than another. Incidentally, "better" isn't really a good word. It's too vague. Do you mean faster? Less resource-intensive? Easier to understand? Shorter?


@user1690:
Quote:
Originally Posted by user1690 View Post
Hi guys! I just wanted to ask if this was normal,


The RTV Part of this, everytime im on a series set of maps (zoology for example) the RTV seems to always stick at "Please wait 10mins......" and never changes, however when on a single map (Crisis2 for example) the rtv works fine.

Just wanted to see if it was normal or not, because some players seem to have complained that they cant get off the series set of maps because RTV wont let them.
No. It's not how it's intended to work. I don't even know what a "series set of maps" is or how they work. It's possible that they play with the time remaining which throws Gal off. If you're willing to work with me, I can try to see what's going on.

By working with me, I mean I would send you an update SMA, have you try it and then have you report back information to me. Again, and again. And again. No guarantee that anything good will come of it, but definitely nothing will if we don't try.
__________________
Brad is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 12-28-2010 , 11:31   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1007

Quote:
Originally Posted by Arkshine
But yes, it would save some checks, though it's a very small optimization
No, this is a very big optimization when number of maps is about 2000.

Quote:
Originally Posted by Arkshine
Also, it would need to use TravTrie here, not Trie.
Where I can to download and read about TravTrie? And why not Trie?

Brad This way is faster in about 30 times when number of maps is 850.
here is test plugin
Do not believe me?

Last edited by -=hunter=-; 12-28-2010 at 11:42.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
user1690
Junior Member
Join Date: Dec 2010
Old 12-28-2010 , 11:38   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1008

I'd be willing to work with you, and hopefully fix this as its not part of gal.

And by a series set of maps, i mean maps that are designed to change to another map in the series at the end. So for example:

The zoology series,

at the end of each zoology map (Except the last one), it is designed to change to the next in the series when the map is done.

So, at the completion of Zoology1, it changes to Zoology2, and so forth...

Last edited by user1690; 12-28-2010 at 11:40.
user1690 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-28-2010 , 12:28   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1009

Quote:
Because of this, it's not something that is a priority. It's likely to get looked when there's an overall code overview.
Yes, we should start first to fix any bugs and make a solid plugin before trying to optimize.

Quote:
But yes, I'm very interested in seeing actual data as to why one way of doing something is "better" than another. Incidentally, "better" isn't really a good word. It's too vague. Do you mean faster? Less resource-intensive? Easier to understand? Shorter?
Like I've said, that's not a major optimization because mainly it won't be used really often. Using a trie, more a TravTrie precisely (because you need to traverse the trie like an Array), it will be faster so less cpu consumption since you won't need to call x equal() (the less native you call the better it is) each time when you can do it in one call, so less code, more efficient and more readable. That's something we could measure with the profiler. But again, that's something which should be considered later.

Quote:
No, this is a very big optimization when number of maps is about 2000.
No, small, because that's something it won't used often so you won't see any significant change, even if the optimization is welcomed. That's not a major one and right now, we should think about fixing bugs, not optimization.
__________________

Last edited by Arkshine; 12-28-2010 at 12:33.
Arkshine is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 12-28-2010 , 13:37   Re: Galileo 1.1.290 (a feature rich map voting plugin)
Reply With Quote #1010

Arkshine When player print to chat any word then plugin checks word on valid map.
If number of maps is about 2000 (on example, on KZ server) then possible lag.
I already wrote that this method is much faster than the method with an array.
Also this way is very simple to code than with array.

Quote:
No, small
Nonsense. You tried to use Trie with Profiler?

Necessary to consider all variants.

Last edited by -=hunter=-; 12-28-2010 at 13:50.
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
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 13:29.


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