AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Galileo 1.1.290 (a feature rich map voting plugin) (https://forums.alliedmods.net/showthread.php?t=77391)

Brad 12-27-2010 14:57

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
@RTG:
Quote:

Originally Posted by RTG (Post 1379653)
...
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 (Post 1379653)
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 (Post 1380073)
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 12-27-2010 16:33

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
@RTG:
Can you give me the last 3 items from here?

-=hunter=- 12-28-2010 02:45

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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

Arkshine 12-28-2010 05:30

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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.

user1690 12-28-2010 10:46

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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.

Brad 12-28-2010 12:02

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
@-=hunter=-:
Quote:

Originally Posted by -=hunter=- (Post 1380697)
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 (Post 1380745)
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 (Post 1380916)
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.

-=hunter=- 12-28-2010 12:31

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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?

user1690 12-28-2010 12:38

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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...

Arkshine 12-28-2010 13:28

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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.

-=hunter=- 12-28-2010 14:37

Re: Galileo 1.1.290 (a feature rich map voting plugin)
 
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.


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

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