Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
[Suggestion] Frequency options

 
Post new topic   Reply to topic Printable version
 View previous topic  More ASSS Windows binaries available Post :: Post ASSS Javelin and Repel bug  View next topic  
Author Message
Siaon
Novice


Age:43
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Mon Mar 15, 2004 5:31 pm    Post subject: [Suggestion] Frequency options Reply to topic Reply with quote

In addition to freqkick and giveowner some kind of invite command would be great, example:

:Player1:?invite
>> You've been invited to join freq x, type ?accept to join them(You need (Conditions like be in a safezone, have full energy, don't have the powerball or flags)
Player1-> ?accept

Player1 gets moved to freq x
_________________

Yesterday was history, Tomorrow's a mystery. Today is a gift, that's why it's called the present.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Mon Mar 15, 2004 5:47 pm    Post subject: Reply to topic Reply with quote

Forum you wanted was "Server Suggestions". You may not be able to read this before it gets moved and deleted, but its the thought that counts icon_wink.gif
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Tue Mar 16, 2004 4:59 am    Post subject: Reply to topic Reply with quote

Isn't

Player1>:Player2:Join freq#!! biggrin.gif

Player2>=#

easier?
_________________
Expect the worst but hope for the best.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Tue Mar 16, 2004 4:23 pm    Post subject: Reply to topic Reply with quote

I believe his idea is that no one can join the freq unless they are invited first. So if your freq number is leaked, no one could join unless the owner invited them first.

Maybe practical, because it is still unknown how to handle the chat-clients from leaking freq numbers.
Back to top
View users profile Send private message Add User to Ignore List Send email
-Smong-
Guest


Offline

PostPosted: Thu Mar 18, 2004 4:09 am    Post subject: Reply to topic Reply with quote

The chat clients are supposed to be sent a hash of the private freq.
Back to top
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Thu Mar 18, 2004 5:52 pm    Post subject: Reply to topic Reply with quote

Well, that's not currently true. A while ago I tried thinking of ways the hash thing could work, and then gave up because they got too complicated. For now I think the freqowners module is enough to get around this problem, although the best solution is probably password-protected freqs. Which isn't even very hard, I just need some time to work on it.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
catid
Guest


Offline

PostPosted: Sun Mar 21, 2004 3:48 pm    Post subject: chatclient freq woes Reply to topic Reply with quote

as far as clients are concerned, the freqs have these properties:

1) visible number,
2) associates players from the same team in playerlist.

freqs 0-99 are "public", which implies that (1) and (2) hold.
freqs 100-9999 are "private", which implies that only (2) holds.

for players who aren't on frequency X:
for public freqs, (1) and (2) can be implemented by just sending the freq number.
for private freqs, (2) can be implemented by sending a unique "grouping number", in place of the actual freq number

grouping numbers are:
unique,
16 bits,
greater than 99,
there must be 10000-100 (9900) of them to map from 100...9999.

normal freq numbers are only 14 bits (two MSB are 0).

these grouping numbers may be sent and received in place of freq numbers for players who are not on the team in question. this does not apply only to chat clients, but to Continuum and SubSpace as well. the distinction is that any messages from the game clients need to be "unmapped" from group numbers to the actual frequencies before they may be interpreted by the server.

implementation-wise, this rules out a 19,800-byte lookup-table generated when the server starts or when an arena is made. two such tables may be used, to map both ways. my recommendation, therefore, is to find a mapping function that can do this conversion in real-time.
Back to top
catid
Guest


Offline

PostPosted: Sun Mar 21, 2004 7:18 pm    Post subject: Reply to topic Reply with quote

here's something that might work for you:

Code: Show/Hide

#define MAPPING_ROUNDS 32

u16 map_freq_to_group(u16 n, u32 k)
{
   for (u16 i = 0; i < MAPPING_ROUNDS; ++i)
   {
      /* mixed congruential method (Knuth, AoCP, 3.2.1) */
      k = (65537 * 11 * k + 2099863) % 0xffffffff;

      n += k;
      n = (n << (k&15)) | (n >> (16 - (k&15)));
   }

   return n;
}

u16 _map_group_to_freq(u16 n, u32 k, u16 i)
{
   k = (65537 * 11 * k + 2099863) % 0xffffffff;

   if (i) n = _map_group_to_freq(n, k, i-1);
   n = (n >> (k&15)) | (n << (16 - (k&15)));
   n -= k;

   return n;
}

u16 map_group_to_freq(u16 n, u32 k)
{
   return _map_group_to_freq(n, k, MAPPING_ROUNDS-1);
}


k = key, n = freq/group number. key would be stored in the per-arena data, or you could pre-generate the key for each round and store it in per-arena data.
Back to top
catid
Newbie


Joined: Mar 21 2004
Posts: 4
Offline

PostPosted: Sun Mar 21, 2004 7:49 pm    Post subject: Reply to topic Reply with quote

oops. that code could generate numbers between 0-99. to fix this problem, i changed the calculations so that they'd be done in 15 bits, and set MSB to 1 for group numbers and 0 for freqs.

Code: Show/Hide

#define MAPPING_ROUNDS 32

u16 map_freq_to_group(u16 n, u32 k)
{
   for (u16 i = 0; i < MAPPING_ROUNDS; ++i)
   {
      /* mixed congruential method (Knuth, AoCP, 3.2.1) */
      k = (65537 * 11 * k + 2099863) % 0xffffffff;

      n += k;
      n = (n << (k%15)) | ((n&0x7fff) >> (15 - (k%15)));
   }

   return n | 0x8000; /* make it outside of range */
}

u16 _map_group_to_freq(u16 n, u32 k, u16 i)
{
   k = (65537 * 11 * k + 2099863) % 0xffffffff;

   if (i) n = _map_group_to_freq(n, k, i-1);
   n = ((n&0x7fff) >> (k%15)) | (n << (15 - (k%15)));
   n -= k;

   return n;
}

u16 map_group_to_freq(u16 n, u32 k)
{
   return _map_group_to_freq(n, k, MAPPING_ROUNDS-1) & 0x7fff;
}
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 80 page(s) served in previous 5 minutes.

phpBB Created this page in 0.742635 seconds : 31 queries executed (97.0%): GZIP compression disabled