Blocktrix
Welcome, Guest. Please Login or Register.
12/04/26 at 7:14pm

Home Home Help Help Search Search Login Login Register Register


Pages: 1
Enhanced TNet Protocol (For Developers) (Read 1170 times)
strikelight
Administrator
*****


Make Me King

Posts: 288
Enhanced TNet Protocol (For Developers)
04/18/05 at 10:56pm
 
This topic outlines the enhanced TNet protocol options that BTrix provides for TNet server developers to take advantage of.
 
First, to identify a client as being a Blocktrix client,
the server must initiate the handshake so to speak by sending the following to a logged in user:
 
lvl 0 0\xFF
 
(Where \xFF is the standard TNet protocol line delimiter)
 
This in turn forces the BTrix client to respond with:
 
clientinfo Blocktrix <version info>\xFF
 
There are some things you may send to BTrix0.13+ clients (after identifying them as such with the lvl protocol). These are as follows: (the queries and the replies all end with the standard TNet delimiter)
 
ping <argument>
- This will have the client return "pong <argument>" back to the server. Useful for determining latency, or if the client is even alive. (eg. ping 1108944693 will have the client return pong 1108944693)  
 
options <option list>
- This will tell the client what options you wish for the client to obey.  
- Options include:  
- nomacros : User will NOT be able to drop pieces in far left/right columns with  
a single keystroke (atleast, not without the use of an external program)  
- rotatepreview : User will be able to rotate the next preview piece  
- dualpreview : User will see two piece preview display  
- delay=<value> : The specified value (in ms) will be used as the time delay between pieces  
- botppm=<value> : The specified value will be used as the max. ppm the bot mode for the client will be able to go (0 = disable bot mode <default>)  
- samepieces=<seed> : The specified seed will be used for generating random pieces/specials/etc..  
- piecedrop : Will force client to send "pd <UserNum>" to server whenever a piece has been dropped (0.14+)
- shadow : User will be able to use the shadow feature, to see the shadow of the current falling block
- piecehold : User will be able to use the hold piece feature, to hold the current falling piece
eg. options nomacros dualpreview delay=0 samepieces=5  
 
Note: Changes with options are NOT accumulative, so you will need to send the entire settings you wish for the client to have each time you send out "options". Sending options with no arguments will reset the client to default settings.  
 
Also, server developers may take advantage of the new specials that btrix offers, when sending their newgame string, the same way the occurancy for the other specials are specified, except using letters for the extended specials (as all single digit numbers are taken already by the existing specials): 'a' for zebra attack, 'b' for left gravity, and 'c' for piece change. (They will be sent as 'z','l','p' for field changes, so, developers will also need to adjust their field checks accordingly).
Back to top
 
« Last Edit: 03/21/08 at 11:44pm by strikelight »  

-=) StrikeLight
-=) Blocktrix developer
-=) www.blocktrix.org
Email View Profile WWW   IP Logged
Pages: 1