 |
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Siaon Novice

Age:43 Joined: Dec 04 2002 Posts: 49 Offline
|
Posted: Mon Mar 15, 2004 5:31 pm Post subject: [Suggestion] Frequency options |
 |
|
|
|
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 |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon Mar 15, 2004 5:47 pm Post subject: |
 |
|
|
|
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  _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
Doggeti Server Help Squatter

Age:40 Gender: Joined: Jan 12 2003 Posts: 297 Location: Germany Offline
|
Posted: Tue Mar 16, 2004 4:59 am Post subject: |
 |
|
|
|
Isn't
Player1>:Player2:Join freq#!!
Player2>=#
easier? _________________ Expect the worst but hope for the best. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:42 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Tue Mar 16, 2004 4:23 pm Post subject: |
 |
|
|
|
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 |
|
 |
-Smong- Guest
Offline
|
Posted: Thu Mar 18, 2004 4:09 am Post subject: |
 |
|
|
|
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
|
Posted: Thu Mar 18, 2004 5:52 pm Post subject: |
 |
|
|
|
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 |
|
 |
catid Guest
Offline
|
Posted: Sun Mar 21, 2004 3:48 pm Post subject: chatclient freq woes |
 |
|
|
|
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
|
Posted: Sun Mar 21, 2004 7:18 pm Post subject: |
 |
|
|
|
here's something that might work for you:
#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
|
Posted: Sun Mar 21, 2004 7:49 pm Post subject: |
 |
|
|
|
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.
#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 |
|
 |
|
|
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
|
Software by php BB © php BB Group Server Load: 40 page(s) served in previous 5 minutes.
|