( search forums )
Expanded REFRESH Packet
Soldat Forums - Soldat Talk - Developers Corner
Deleted User
April 10, 2006, 8:40 am
I recall seeing in a thread somewhere somone asking for a 'REFRESHX' command, similar to normal refresh but with more variables in it.

My Question is:
What 'extra' information do you want stored in this packet?

Confirmed:
Next map
Max Players
Player locations
Red/Blue flag locations
Max Spectators
2 byte pings (Integer)
byte 1/0 if server is passworded

ramirez
April 10, 2006, 9:45 am
Max players.
Ping as 2 byte unsigned short (integer).
Possibly max spectators, but not a necessity since it can't be changed dynamically with a command.

bja888
April 10, 2006, 10:42 am
For the current server funcationalit then its fine.

Deleted User
April 10, 2006, 11:10 am
 Quote:Originally posted by bja888For the current server funcationalit then its fine.

English please?

KeFear
April 10, 2006, 11:25 am
Next map (or even better: maplist)

bja888
April 10, 2006, 12:34 pm
 Quote:Originally posted by EnEsCe Quote:Originally posted by bja888For the current server funcationalit then its fine.

English please?


Wow! wft bja888? What are you on??

In english....
"Its all good"

Deleted User
April 10, 2006, 12:42 pm
BJA, Do not post in this thread. Your posts are useless.

FliesLikeABrick
April 10, 2006, 4:18 pm
easy boys, easy.

chrisgbk
April 10, 2006, 5:57 pm
going to do that player location thing you were discussing with me? I can see that being a fun lil feature where you can do something like this: have a minimap of the current map on a website, with the player/flag locations on it, that updates every few seconds to allow you to "watch" the game action.

mar77a
April 10, 2006, 9:52 pm
server password?

DeMo
April 11, 2006, 10:27 am
Most useful:
Next map
Max Players
2 byte pings (for real pings!!)

What would you use these for?
-Player locations
-Red/Blue flag locations
Only thing I can think of is using the map image as a background and then showing some images representing the players/flags o top of it. Still it wouldnt be of much use.

Edit: didn't see chris' post.

rainrider
April 11, 2006, 11:42 am
I think REFRESHX is not needed, better commands like /maxspectators, /printnextmap, /ispassworded.
I like idea of integer ping, but sizeof(integer)=4 so 2 byte type would be WORD ;p

Players/flags locations .. hm, how do u imagine that? They're floats, how shall be they returned? As strings?

Deleted User
April 11, 2006, 12:06 pm
 Quote:Originally posted by rainriderThey're floats, how shall be they returned? As strings?

They are returned as Floats/Single's...

chrisgbk
April 11, 2006, 2:14 pm
 Quote:Originally posted by rainriderI think REFRESHX is not needed, better commands like /maxspectators, /printnextmap, /ispassworded.
I like idea of integer ping, but sizeof(integer)=4 so 2 byte type would be WORD ;p

Players/flags locations .. hm, how do u imagine that? They're floats, how shall be they returned? As strings?


The size of the Integer datatype is implementation specific, and can change from one version of a compiler to another. An Integer used to be universally 16 bits, but now 32 is becoming standard; eg: old versions of visual basic and delphi used 16 bits for Integer, newer versions use 32.

In terms of Delphi:

Cardinal(unsigned) and Integer(signed) have an undefined size that changes between one version to the next(currently both use 32 bits, with 64 bit computing starting to catch on it is likely newer versions will use 64 bits for these numbers), whereas data types with qualified names have guaranteed sizes:

Int64 is always 64 bit signed integer
LongInt is always 32 bit signed integer
LongWord is always 32 bit unsigned integer
SmallInt is always 16 bit signed integer
Word is always 16 bit unsigned integer
ShortInt is always 8 bit signed integer
Byte is always 8 bit unsigned integer


As for the floating point numbers, like EnEsCe said, they will be returned as a float/single, ie: they will be stored in the IEEE 754 floating point standard, so they will be cross-platform compatible as long as that platform supports that standard.(Anything worth writing about supports that standard.)

ramirez
April 12, 2006, 5:24 am
 Quote:Originally posted by rainriderI like idea of integer ping, but sizeof(integer)=4 so 2 byte type would be WORD ;p
Personally I said unsigned short, which is the term for an unsigned 16-bit integer in C/C++.
Saying "2 byte pings (integer)" is perfectly fine, because integer as a word itself has a meaning; A whole number (not as a definition of type in a set language).

Anyways, this topic is getting bit off topic, don't you think? While most implementations of languages uses the IEEE standard, it doesn't mean they have to. Even if they don't, it's completely possible to convert from a standard to another, assuming you know how the floating point value is constructed (since then you can also extract it).

 Quote:An Integer used to be universally 16 bits, but now 32 is becoming standard
The standard size of an integer has been 32 bits (if you can call it 'standard') for quite a while, that is for as long as processors have been 32-bit CPUs. 64-bit CPUs use 64-bit integers as native integer host type.
I don't know if this is the case in Delphi though, but I assume it is.

Anyways, back on topic.
Personally I don't think the player positions are really necessary to implement, although it would be nice to see able to do mini maps as suggested, but since you shouldn't query for REFRESH packet more often than once in a few seconds at most (at least not continually), the map wouldn't be in real time, and thus is not really the first priority in my opinion. The size of the packet wouldn't increase that much by providing them though (128/256 bytes, depending on whether you use single or double precision IEEE floats).

mar77a
April 12, 2006, 9:31 pm
btw, does the /info command work for remote admins?

chrisgbk
April 12, 2006, 10:59 pm
 Quote:Originally posted by mar77abtw, does the /info command work for remote admins?


No, it doesn't, due to the way it works: it uses /say to output everything, and /say commands are not sent to remote admins. Even if you use Tank's script, because the /says are generated by soldat, not by the admin.

DeMo
April 14, 2006, 7:25 am
The players positions can be used to create some kind of AFK protection.
You can make an admin program that stores the positions and checks them on each refresh.. or you set a timer that refreshes and checks the positions every X seconds. Then.. if the position for a given player hasn't changed within X seconds he gets kicked for being AFK.

I know this is not 100%... somebody may toss a grenade at the AFK guy and he will move and then when you check his position the numbers won't match and he won't be kicked. And in DM games he will die and respawn in different places and screw your checking again. Anyway.. its another form of using the positions.

Other use would be preventing players from going to certain sections of some maps. Bunker is a good example.. there's always somebody that goes to the top of the map and stays there shooting from above. Let's say the top of the map is Y=100. If you see a player with Y>100 you know he is up there and you can kill/kick/ban/whatever him.

DeMo
April 15, 2006, 10:45 am
Lol 5 mins is too much.. that's why I've never seen anybody get kicked by this AFK filter.

chrisgbk
April 15, 2006, 4:40 pm
It doesn't tell anyone in the server that you were kicked, to everyone in the server it just looks like you disconnected normally.

mar77a
April 15, 2006, 4:59 pm
Yes, quite usueful when connections from players remain open (happends very frequently, specially if you press ALT+F4 to exit)

Da cHeeSeMaN
May 20, 2006, 5:16 pm
dude not for afk protection...you could pin-point teleport/speed hackers!!!!!

chrisgbk
May 22, 2006, 5:11 am
Unfortunately, not so. You can't tell the difference between someone who hits a polybug and flies up, and someone who is teleport hacking.

Deleted User
May 22, 2006, 7:18 am
or when they respawn, or when they change team.

mar77a
May 22, 2006, 11:11 pm
yes, that yes, because you have a line in the console that notices that.