diff --git a/Docs/CodingStyle.txt b/Docs/Devdocs/CodingStyle.txt similarity index 100% rename from Docs/CodingStyle.txt rename to Docs/Devdocs/CodingStyle.txt diff --git a/Docs/CompileFlags.txt b/Docs/Devdocs/CompileFlags.txt similarity index 100% rename from Docs/CompileFlags.txt rename to Docs/Devdocs/CompileFlags.txt diff --git a/Docs/GoldenRules.txt b/Docs/Devdocs/GoldenRules.txt similarity index 100% rename from Docs/GoldenRules.txt rename to Docs/Devdocs/GoldenRules.txt diff --git a/Docs/Devdocs/SMLanProtocol.txt b/Docs/Devdocs/SMLanProtocol.txt new file mode 100644 index 0000000000..bea1378782 --- /dev/null +++ b/Docs/Devdocs/SMLanProtocol.txt @@ -0,0 +1,466 @@ + +PRELIMINARY - - - - - - - - 05/03/2004 +Protocol version 4 + But 0x04 will be its version for inter-protocol purposes. + +This protocol is only intended to replace current protocol. Because current protocol +not expanable + +SMLAN PROTCOL TCP/8765 + +Protcol is entirelly packaged in EzSockets Data Packets (use send and receive packet) + +This will prevent any out-of-sync errors with future or past versions. + +The protocol is impervious to fragmented, or bonded TCP packets. + +Basic Representation: + +Octet 0123 4 5 + +----+-+---//--+ + |ssss|C|Payload| + +----+-+---//--+ + +ssss - size of packet, handled by ezsockets (if you're using C++) +C - Command. +Payload - variable size based on command + +The payload may contain more data than expected, i.e. new protocol version. + + +In the following protocol, the term size means the size of the chunk of data. +If the "size" is "NT" then that means it's a null-terminating string. + "MSN" most significant 4 bits (byte/16) + "LSN" least significant 4 bits (byte%16) + + +Note: Primary player is 0x0, secondary player is 0x1 + +CLIENT to SERVER protocol: + +000: No Operation + Desc: This command will cause server to respond with a no op response. + Payload: None + Response: Server 001 + +001: No Operation Response + Desc: This command is used to respond to a no operation. + Payload: None + Response: None + +002: Hello + Desc: This is the first packet from a client to server, stating below + information (NOTE: Names are no longer sent in this packet) + Payload: + Size Description: + 1 Client protocol version + NT Name of build of StepMania + Response: Server 002 + + + +003: Game Start Request + Desc: This command is called once after most loading is done, and + again immediately before the sound starts. + Payload: + Size Description + MSN Primary player difficulty (feet) (0 for no player) + LSN Secondary player difficulty (feet) (0 for no player) + MSN Primary player difficulty (0=Beginner, 1=easy, etc.) + LSN Second player difficulty (0=Beginner, 1=easy, etc.) + MSN Start Position (0 is pre-sync, 1 is for sync) + LSN Reserved + NT Song Title + NT Song Subtitle + NT Song Artist + NT Course Title (If none exists; make it just a null) + NT Song Options (in string-format) + NT Primary Player's options (Null if non-existant) + NT Secondary Player's Options (Null if non-existant) + + Response: Server 003 + + +004: Game Over Notice + Desc: This command is sent when end of game is encounterd + Payload: None. + Response: None. + +005: Game Status update + Desc: Updates game info for each step + Payload: + Size Description + MSN Player # +Protocol <= 2 + LSN StepID + 1: Miss + 2: W5 + 3: W4 + 4: W3 + 5: W2 + 6: W1 + 7: LetGo + 8: Held +Protocol >= 3 + LSN StepID + 1: HitMine + 2: AvoidMine + 3: Miss + 4: W5 + 5: W4 + 6: W3 + 7: W2 + 8: W1 + 9: LetGo + 10: Held + + MSN Projected Grade (StepMania enum int) + LSN Reserved + 4 Net-order long containing score. + 2 Net-order int containing combo. + 2 Net-order int containing health. + 2 Net-order # containing offset + 32767 would be DEAD on the note + If the user is hitting late, the # will be higher + It if the user is exactly 0.25 seconds off, the + number will be different by 500, if 0.5, it will be + different by 1000. + Response: None. + +006: Style Update (PLEASE NOTE THIS HAS NOTHING TO DO WITH SERVER COMMAND 6) + Desc: This is sent when a style is chosen. + Size: + 1 # of enabled players (1 means 1, 2 means 2) + 1 Player # (0 means 1st, 1 means 2nd) + NT Player Name for # + (Additional player's and #'s) (enabled players ONLY) + + Response: None + +007: Chat message + Desc: The user typed a message for general chat. + Size: + NT Message + +008: Request Start Game and Tell server existance/non existance of song. + Desc: The user selected a song on a Net-enabled selection + Size: + 1 Usage of message + 0: (in response to server 8) User has specified song + 1: (in response to server 8) User does NOT have specified song + 2: User requested a start game on given song + NT Song Title (As gotten by GetTranslitMainTitle) + NT Song Artist (As Gotten by GetTranslitArtist) + NT Song Subtitle (As gotten by GetTranslitSubTitle) + +009: //Reserved + +010: User entered/exited Network Music Selection Screen + Size: + 1 + 0: exited ScreenNetSelectMusic + 1: entered ScreenNetSelectMusic + 2: **Not Sent** + 3: entered options screen + 4: exited the evaluation screen + 5: entered evaluation screen + 6: exited ScreenNetRoom + 7: entered ScreenNetRoom + +011: User has changed player options + Size: + NT Player 0's options + NT Player 1's options + + +012: SMOnline Packet. //SPECIAL CASE!!! + NOTE: The smonline packet is not defined here. + The SMLan packet 12 is a wrapper for the SMOnline packet. + This is so that we can have "protection" of sorts when + it comes to the coding of SMOnline, so we don't have to + use the lower level commands when dealing with SMOnline. + Size: + 1 SMOnline command //This used to say 2, but it looks like 1 in all cases + SMOnline data + + +013: Reserved + +014: Reserved + +015: XML Packet. This packet contains data in XML format. + Size: + NT XML + +SERVER to CLIENT protocol: (begins at 128) + +NOTE: Server responses always add 128, thus a server response for no operation + is 128, not 000 + +000(128):No Operation + Desc: This command will cause server to respond with a no op response. + Payload: None + Response: Server 001 + +001(129):No Operation Response + Desc: This command is used to respond to a no operation. + Payload: None + Response: None + +002(130):Server Hello Response + Desc: This introduces the server. + Payload: + Size Description + 1 Server protocol version //NOTE: if protocol version is 128+, then this + server is an SMOnline server + NT Server Name + 4 Random key ( at the moment only used for an alternate login method ) + +003(131):Allow Start + Desc: This will cause the client to start the game. + Payload: None + Response: None + +004(132):Game over stats + Desc: this packet is send in response to the game over packet + it contains information regarding how well each player did. + Payload: + 1 # of players sent in this packet (active players) + The way this works is to send every player's info for a given + field. Like every player's score will be sent first, then every + player's grade. + 1 First player's player ID + + 4 Score + + 1 Grade + + 1 Difficulty (0=beginner, 1=light, etc.) + + + #this next chunk of step types is actually reversed + 2 miss + + 2 boo + + 2 good (All players) + 2 great (All players) + 2 perfect (All players) + 2 marvelous (All players) + + 2 ok (All players) + 2 max_combo (All players) + NT Player's options + + + +005:(133)Scoreboard update + Desc: This will update the client's scoreboard. + Payload: + Size + 1 Which section + 0: Names + 1: Combos + 2: Projected Grades + 1 # of players to display + + If Names, then: + 1 Player in first place's index + 1 Player in second place's index + ... + 1 Last player's index + If Combos, then: + 2 First player's combo + 2 Second Player's combo + ... + 2 Last player's combo + If Project grades + 1 Player 1's grade (in the same format used when reporting projected grades) + 1 Player 2's grade + ... + 1 Last player's projected grade + + +006:(134)System Message (PLEASE NOTE THIS HAS NOTHING TO DO WITH CLIENT COMMAND 6) + Desc: Send system message to user + Payload: + Size Description + NT Message + +007:(135)Chat Message + Desc: Add a chat message to the chat window on some StepMania screens. + Payload: + Size Description + NT Message + +008:(136)Tell client to start song/ask if client has song + Desc: The user selected a song on a Net-enabled selection + Size: + 1 Usage of message + 0: See if client has song + 1: See if client has song, if so, scroll to song + 2: See if client has song, if so, scroll to song, and play that song + 3: Blindly start song + NT Song Title (As gotten by GetTranslitMainTitle) + NT Song Artist (As Gotten by GetTranslitArtist) + NT Song Subtitle (As gotten by GetTranslitSubTitle) + +009:(137)Update user list + Desc: This sends all the users currently connected + Size: + 1 Max # of players + 1 # of players in this packet + 1 Player 0's status + NT Player 0's name (if there is no player here... make it a null ("")) + 1 Player 1's status + NT Player 1's name + ... + 1 Last player's status + NT Last player's name + Status: + 0 Inative (no info on this user yet) + 1 Active (you know who it is) + 2 In Selection Screen + 3 In Options + 4 In Evaluation + +010:(138)Force change to Networking select music screen. + Size: + NT Set Specified gametype + NT Set Specified style + +011:(139)Reserved + + +012:(140)SMOnline Packet. //SPECIAL CASE!!! + NOTE: The smonline packet is not defined here. + The SMLan packet 12 is a wrapper for the SMOnline packet. + This is so that we can have "protection" of sorts when + it comes to the coding of SMOnline, so we don't have to + use the lower level commands when dealing with SMOnline. + Size: + 1 SMOnline command + SMOnline data + + +013:(141)Formatted information packet + Desc: Send formatted information regarding the server back to the player. + NOTE: The purpose of this function is alternatively to be a broadcast + packet. (You can expect it via UDP broadcast) + Size: + NT Server Name + 2 Port the server is listening on + 2 Number of players connected + +014:(142)Attack Client + Size: + 1 Player Number + 4 Time to Last (in MS) + NT Text describing modifiers. + +015:(143) XML reply. Contains XML + Size: + NT XML + + +---------------------------------------------------------------- +Client SMOnline packets: +000: Send Login Information + Size: + 1 Player Number + 1 Encryption text + 0: MD5 hash + 1: MD5 ( MD5 hash + salt ) (salt is plain text, base 10 string ) + NT Username + NT Password + + Note: The client is not permitted to use method (1) for authentication + if the salt it received from the server is 0 + +001: User asks to enter room + Size: + 1 Enter/Exit? + 0: User wishes to exit room + 1: User wishes to enter room + NT Room Name (Used when entering rooms) + NT Password (Empty if password not used) + +002: Create a new Room + Size: + 1 Room Type + 0: Normal room (has sub rooms) + 1: Game room (no sub rooms) + NT Room Title + NT Room Description + NT Room Password (blank if no password) + +003: Requests Room Info + Size: + NT Room Name + + +Server SMOnline packets: +000: Login Response + 1 Approval Status + 0: Approved + 1: Approval Failed + NT Login response (plain text) + +001: Room Update (Changing rooms) + Size: + 1 Type of update + 0: Change Room Title + 1: Update List of other rooms (or games) + + If Room Title Update: + NT Room Title + NT Room Description + 1 Type of room: + 0: Chat room + 1: Game room + 1 Allows creation of sub room. + 0: Does not allow creation of subrooms + 1: Allows creation of subrooms + + If Room List Update: + 1 Number of rooms + NT Room1 Title + NT Room1 Description + NT Room2 Title + NT Room2 Description + ... + NT RoomN Title + NT RoomN Description + + Room Status appended for reverse compatibility + 1 Room1 Status + 0: Normal Room + 1: Unused + 2: Room in game + 3: First stage of song selection has been done + 4: Second stage of song selection has been done + 1 Room2 Status + ... + 1 RoomN Status + + Room Flags appended for reverse compatibility + 1 Room1 Flags + bit 0: Passworded if true + 1 Room2 Status + ... + 1 RoomN Status + +002: Request general information from server. + 1 Format for stats + 0: Normal unformatted stats + +003: Room Info + Size: + NT Last Song Title + NT Last Song Subtitle + NT Last Song Artist + 1 Num Players + 1 Max Players + NT Player1 Name + ... + NT PlayerN Name diff --git a/Docs/Devdocs/SMO_protocol-aj.txt b/Docs/Devdocs/SMO_protocol-aj.txt new file mode 100644 index 0000000000..4874f6db68 --- /dev/null +++ b/Docs/Devdocs/SMO_protocol-aj.txt @@ -0,0 +1,554 @@ +A re-writing of the SMLan Protocol, because I wish to understand it in +my own words. -aj + +Protocol version: 0x04 (v4) +This has nothing to do with the server versions (see below) + +==Client Versions== +(NETPROTOCOLVERSION in NetworkSyncManager.h) +1: StepMania 3.9 (SMLan?) +2: StepMania 3.95 +3: StepMania 4 alphas/sm-ssc v1.0 RC1-Final + +==Server Versions== + 1: SMLan (old) +128: SMOnline +129: SMOnline with "better song identification using chart hashes" + +==Notes== +I use the term "client" and "player" interchangeably. +The original document used "client" and "user" interchangeably. + +These two notes are from the SMOCaml project: +https://sourceforge.net/projects/smocaml/ + +Command S2C 004 (132): The data from miss to marvelous are reversed + +Commands C2S 012-001 and 012-001: when there is no password the 'password' field + isn't sended at all, not even a NULL character + +==Information== +The default port is 8765/tcp, though this is actually assigned to Ultraseek HTTP +by the IANA (see http://www.iana.org/assignments/port-numbers). + +A sm-ssc version of a online server for StepMania will use the currently +unassigned port 48040/tcp (and/or udp if the need arises). + +The protocol is packaged in "EzSockets Data Packets". + +A basic representation + + 0123 4 5...... [Octets] ++----+-+---//--+ +|ssss|C|Payload| [data] ++----+-+---//--+ +where: +ssss = Size of packet (handled by EzSockets if using C++) +C = Command +Payload = (variable size based on command) + +The payload may contain more data than expected, for instance, if it's a new +protocol version. + +"Size" refers to the size of the data chunk. +Some commonly referred to size types: + NT = Null-terminated string +MSN = Most significant 4 bits (byte/16) +LSN = Least significant 4 bits (byte%16) + +The primary player is 0x0, secondary is 0x1. This does not take into account +Multiplayer notefields. + +==[ Client -> Server Communication Protocol ]=================================== +0x00 (000) No Operation +This command will case the server to respond with a nop. + +Payload: None +Expected response: Server 0x01 (001) +________________________________________________________________________________ +0x01 (001) No Operation Response +This command is used to respond to a no operation. + +Payload: None +Expected response: None +________________________________________________________________________________ +0x02 (002) Hello +This is the first packet a client sends to the server. + +Payload: +[Size] [Description] + 0x01 Client Protocol Version (see Client Versions above) + NT StepMania build name (PRODUCT_ID) + +Expected response: Server 0x02 (002) +________________________________________________________________________________ +0x03 (003) Game Start Request + +Payload: +[Size] [Description] + MSN Primary Player Meter [0 if no player] + LSN Secondary Player Meter [0 if no player] + MSN Primary Player Difficulty + 0 = Beginner + 1 = Easy + 2 = Medium + 3 = Hard + 4 = Expert + LSN Secondary Player Difficulty (values same as primary) + MSN Start Position: + 0 = pre-sync + 1 = sync + LSN Reserved + NT Song Title + NT Song Subtitle + NT Song Artist + NT Course Title (null if doesn't exist) + NT Song options string + NT Primary player's options (null if doesn't exist) + NT Secondary player's options (null if doesn't exist) + +Expected response: Server 0x03 (003) +________________________________________________________________________________ +0x04 (004) Game Over Notice +Sent when end of game is encountered. I think technically this is round over. + +Payload: None +Expected response: None (though later in the document you'd assume Server 0x04) +________________________________________________________________________________ +0x05 (005) Game Status Update + +The payload changes between protocols, and it will likely have to change again +to acconut for some more StepIDs. + +Payload: +[Size] [Description] + MSN Player Number + LSN StepID + (if Protocol >= 3) + 1 = HitMine + 2 = AvoidMine + 3 = Miss + 4 = W5 + 5 = W4 + 6 = W3 + 7 = W2 + 8 = W1 + 9 = LetGo + 10 = Held + + (if Protocol <= 2; Don't support these in any new server software) + 1 = Miss + 2 = W5 + 3 = W4 + 4 = W3 + 5 = W2 + 6 = W1 + 7 = LetGo + 8 = Held + + MSN Projected Grade (StepMania enum int, which can cause problems with themes.) + LSN Reserved (so discuss it with people if changing) + 0x04 Score (net-order long) + 0x02 Combo (net-order int; songs with large combos may cause issues?) + 0x02 Health (net-order int) + 0x02 Offset (net-order number. huh) + 32767 would be DEAD on the note + If the user is hitting late, the # will be higher. + It if the user is exactly 0.25 seconds off, the number will be + different by 500. With this pattern 0.5 gives a difference of 1000. + +Expected response: None +________________________________________________________________________________ +0x06 (006) Style Update +!IMPORTANT! This command is unrelated to Server Command 0x06 (006). !IMPORTANT! +This is sent when a style is chosen. + +Payload: +[Size] [Description] + 0x01 Number of enabled players (1 or 2) + 0x01 Player Number (0 = P1, 1 = P2) + NT Player name for specified player number + +Expected response: None +________________________________________________________________________________ +0x07 (007) Chat Message +Send a general chat message. + +Payload: +[Size] [Description] + NT Message + +Expected response: none? +________________________________________________________________________________ +0x08 (008) Request Start Game, Tell server if Song exists or not. +The player selected a song on a net-enabled screen. + +Payload: +[Size] [Description] + 0x01 Message Use: + 0 = User has specified song (response to Server 0x08) + 1 = User does not have specified song (response to Server 0x08) + 2 = User has requested start game for the song + NT Song Title (GetTranslitMainTitle) + NT Song Artist (GetTranslitArtist) + NT Song Subtitle (GetTranslitSubTitle) + +Expected response: none? +________________________________________________________________________________ +0x09 (009) [Reserved] +________________________________________________________________________________ +0x0A (010) User entered/exited a network screen + +Payload: +[Size] [Description] + 0x01 Status: + 0 = exited ScreenNetSelectMusic + 1 = entered ScreenNetSelectMusic + 2 = not sent + 3 = entered Options + 4 = exited ScreenNetEvaluation + 5 = entered ScreenNetEvaluation + 6 = exited ScreenNetRoom + 7 = entered ScreenNetRoom + +Expected response: none? +________________________________________________________________________________ +0x0B (011) Player options changed + +Payload: +[Size] [Description] + NT Player 0's options (PLAYER_1) + NT Player 1's options (PLAYER_2) + +Expected response: none? +________________________________________________________________________________ +0x0C (012) SMOnline Packet (Special Case) +The SMOnline Packet is not defined here. +SMLan packet 12 is a wrapper for the SMOnline packet. It is used for +"protection" of sorts for the SMO coders. + +Payload: +[Size] [Description] + 0x01 SMOnline command + <...> SMOnline data (<...> = "" in original docs) + +Expected response: none? +________________________________________________________________________________ +0x0D (013) [Reserved] +________________________________________________________________________________ +0x0E (014) [Reserved] +________________________________________________________________________________ +0x0F (015) XML Packet +This packet contains data in XML format. + +Payload: +[Size] [Description] + NT XML + +Expected response: none? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +==[ Server -> Client Communication Protocol ]=================================== +The Server->Client Communication Protocol begins at 0x80 (128). References to +protocol numbers based on 000 will appear here as well. +________________________________________________________________________________ +0x80 (128) [0x00 (000)] No Operation +This command makes the server respond with a nop. + +Expected Response: Server 0x01 (001; so really 0x81/129?) +________________________________________________________________________________ +0x81 (129) [0x01 (001)] No Operation Response +The response the server gives to a client nop. +________________________________________________________________________________ +0x82 (130) [0x02 (002)] Server Hello Response +Introduces the server to the client. + +Payload: +[Size] [Description] + 0x01 Server Protocol version (if >= 128; server is SMOnline.) + NT Server Name + 0x04 Random Key (or Salt, iirc. Used for alternate login method.) +________________________________________________________________________________ +0x83 (131) [0x03 (003)] Allow Start +Causes the client to start the game. +________________________________________________________________________________ +0x84 (132) [0x04 (004)] Game over stats +Sent in response to the game over packet. +(Technically, this is the evaluation stats.) + +Payload: +[Size] [Description] + 0x01 Number of players in this packet (active) + Send every player's information for a given field. + 0x01 First player's PlayerID + + 0x04 Score + + 0x01 Grade + + 0x01 Difficulty (0 = Beginner, &c.) + + + (the steps type section is reversed. We may need to do some packet analysis.) + 0x02 Judgement_Miss + + 0x02 Judgement_W5 (Boo) + + 0x02 Judgement_W4 (Good) + + 0x02 Judgement_W3 (Great) + + 0x02 Judgement_W2 (Perfect) + + 0x02 Judgement_W1 (Marvelous) + + 0x02 Judgement_Held (OK) + + (LetGo doesn't seem to be handled.) + 0x02 Max Combo + + NT Player options + +________________________________________________________________________________ +0x85 (133) [0x05 (005)] Scoreboard update +Update the client's scoreboard. + +Payload: +[Size] [Description] + 0x01 Section + 0 = names + 1 = combos + 2 = grades (Projected) + 0x01 Number of players to display + +The rest of the payload depends on section. +switch(section) +{ + case Names: + 0x01 Index of Player in 1st place + 0x01 Index of Player in 2nd place + ... + 0x01 Last player's index + break; + + case Combos: + 0x01 Player 1's combo + 0x01 Player 2's combo + ... + 0x01 Last player's combo + break; + + case Grades: // uses same format as other Grade reports + 0x01 Player 1's grade + 0x01 Player 2's grade + ... + 0x01 Last player's grade + break; +} +________________________________________________________________________________ +0x86 (134) [0x06 (006)] System Message +!IMPORTANT! This command is unrelated to Server Command 0x06 (006). !IMPORTANT! +Send a system message to the user. + +Payload: +[Size] [Description] + NT Message +________________________________________________________________________________ +0x87 (135) [0x07 (007)] Chat Message +Add a message to the chat window. ("on some StepMania screens.") + +Payload: +[Size] [Description] + NT Message +________________________________________________________________________________ +0x88 (136) [0x08 (008)] Ask if client has song/Tell client to start song +The player selected a song on a net-enabled screen. + +Payload: +[Size] [Description] + 0x01 Message Type + 0 = See if client has song. + 1 = See if client has song. If so, scroll to it. + 2 = See if client has song. If so, scroll to it and play it. + 3 = Blindly start song. (Probably assumes everyone has the song.) + NT Song Title (GetTranslitMainTitle) + NT Song Artist (GetTranslitArtist) + NT Song Subtitle (GetTranslitSubTitle) + +________________________________________________________________________________ +0x89 (137) [0x09 (009)] Update user list +Sends all the players currently connected. + +Payload: +[Size] [Description] + 0x01 Max number of players + 0x01 Number of players in this packet + 0x01 Player 0's status + NT Player 0's name (if no player, it should be an empty string ("").) + ... + 0x01 Last player's status + NT Last player's name + +The status flag: +0x00 = Inactive (user unknown) +0x01 = Active (user known) +0x02 = On a selection screen +0x02 = In options +0x02 = On Eval. +________________________________________________________________________________ +0x8A (138) [0x0A (010)] Force change to NetSelectMusic + +Payload: +[Size] [Description] + NT Gametype to set + NT Style to set +________________________________________________________________________________ +0x8B (139) [0x0B (011)] Reserved +________________________________________________________________________________ +0x8C (140) [0x0C (012)] SMOnline Packet (Special Case) +The SMOnline Packet is not defined here. +SMLan packet 12 is a wrapper for the SMOnline packet. It is used for +"protection" of sorts for the SMO coders. + +Payload: +[Size] [Description] + 1 SMOnline command + <...> SMOnline data (<...> = "" in original docs) +________________________________________________________________________________ +0x8D (141) [0x0D (013)] Formatted information packet +Send formatted information about the server back to the player. +This function is alternatively a broadcast packet (via UDP). + +Payload: +[Size] [Description] + NT Server name + 0x02 Server port + 0x02 Number of players connected +________________________________________________________________________________ +0x8E (142) [0x0E (014)] Attack client + +Payload: +[Size] [Description] + 0x01 Player number + 0x04 Attack length (milliseconds) + NT Modifier string +________________________________________________________________________________ +0x8F (143) [0x0F (015)] XML reply + +Payload: +[Size] [Description] + NT XML data + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +==[ Client SMOnline Packets ]=================================================== +0x00 (000) Send Login Information + +Payload: +[Size] [Description] + 0x01 Player Number + 0x01 Encryption Text: + 0 = MD5 hash + 1 = MD5(MD5 hash + salt), where salt is a plaintext base 10 string. + NT Username + NT Password + +If the server's salt is 0, Encryption Text can't be 1. Block login. +________________________________________________________________________________ +0x01 (001) Ask to enter room + +Payload: +[Size] [Description] + 0x01 Enter or Exit?: + 0 = Exit + 1 = Enter + NT Room Name (only when entering) + NT Password (empty if unused) + +________________________________________________________________________________ +0x02 (002) Create a new room + +Payload: +[Size] [Description] + 0x01 Room Type: + 0 = Normal (with subrooms) + 1 = Game (no subrooms) + NT Room Title + NT Room Description + NR Room Password (blank if no password) + +________________________________________________________________________________ +0x03 (003) Request room info + +Payload: +[Size] [Description] + NT Room name + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +==[ Server SMOnline Packets ]=================================================== +0x00 (000) Login Response +Payload: +[Size] [Description] + 0x01 Approval status: + 0 = Login OK + 1 = Login Failed + NT Login Response (plaintext) +________________________________________________________________________________ +0x01 (001) + +Payload: +The payload changes depending on the type of update. +[Size] [Description] + 0x01 Update Type: + 0 = Change Room Title + 1 = Update List of rooms/games + +if Update Type == 0 (Change Room Title) +[Size] [Description] + NT Room Title + NT Room Description + 0x01 Room Type: + 0 = Chat + 1 = Game + 0x01 Allow Subroom creation? + 0 = No + 1 = Yes + +if Update Type == 1 (Update room/game list) +[Size] [Description] + 0x01 Number of rooms +for 1 to Number of Rooms where room number = # do + NT Room# Title + NT Room# Description + +Reverse compatiblity Room Status +[Size] [Description] + 0x01 Room# Status + 0 = Normal + 1 = unused + 2 = Playing Game + 3 = Song Selection Stage1 + 4 = Song Selection Stage2 + +Reverse compatiblity Room Flags +[Size] [Description] + 0x01 Room# Flags + if bit 0, Passworded +________________________________________________________________________________ +0x02 (002) Request general information from server. + +Payload: +[Size] [Description] + 0x01 Stats format + 0 = Normal unformatted stats +________________________________________________________________________________ +0x03 (003) Request room information + +Payload: +[Size] [Description] + NT Last Song Title + NT Last Song Subtitle + NT Last Song Artist + 0x01 Number of players + 0x01 Max players + NT Player1 name + ... + NT Last player (PlayerN) name \ No newline at end of file diff --git a/Docs/Devdocs/SMXML.txt b/Docs/Devdocs/SMXML.txt new file mode 100644 index 0000000000..b58b6f459d --- /dev/null +++ b/Docs/Devdocs/SMXML.txt @@ -0,0 +1,34 @@ +SMXML Control Format | Informal and Unofficial Specification +____________________________________________________________ +There is no formal DTD for SMXML as of this writing, so we can only go on the +example file and comments written about the format from developers. + +Chris Danford writes[1]: +"I've been finishing a new in-game download system. The goal is to: +- Have as few user clicks as possible to install a package (or many packages) +- Have one cross-platform method of installing packages + +The new file association - .smxml - contains control data that StepMania will use +on launch. The file format currently supports one or more packages to install." + +The canonical sample SMXML file[2] looks like this: + + + chrisdanford + #&DJASDJ#$&$JSD + + + http://stepmaniam3.com/sm/data/files/Songs_DJMcFox_PlagueMixOne.smzip + + + http://stepmaniam3.com/sm/data/files/Songs_DJMcFox_PlagueMixTwo.smzip + + + +The Credentials section seems to be optional, but is useful to know about: +"In the future, it might also be used to pass login credentials or other tokens +from the web site to StepMania for things like in-game uploads (instead of going +to stepmaniashare.com)"[1] +__________________________________________________________ +[1] http://www.stepmania.com/forums/showthread.php?t=24203 +[2] http://www.stepmania.com/test.smxml \ No newline at end of file diff --git a/Docs/Devdocs/TextEntry.txt b/Docs/Devdocs/TextEntry.txt new file mode 100644 index 0000000000..c5e975d583 --- /dev/null +++ b/Docs/Devdocs/TextEntry.txt @@ -0,0 +1,14 @@ +Code that uses ScreenTextEntry::TextEntry() +------------------------------------------- +RoomWheel.cpp +ScreenEdit.cpp +ScreenEditMenu.cpp +ScreenNetRoom.cpp +ScreenNetworkOptions.cpp +ScreenOptionsCourseOverview.cpp +ScreenOptionsManageCourses.cpp +ScreenOptionsManageEditSteps.cpp +ScreenOptionsManageProfiles.cpp +ScreenOptionsReviewWorkout.cpp +ScreenPackages.cpp +ScreenTestFonts.cpp \ No newline at end of file diff --git a/Docs/Devdocs/WarpNotes.txt b/Docs/Devdocs/WarpNotes.txt new file mode 100644 index 0000000000..db51bd1ba5 --- /dev/null +++ b/Docs/Devdocs/WarpNotes.txt @@ -0,0 +1,17 @@ +warps are purple in the editor btw + +beat 445.500 = 107.02325 seconds +---------------------------------- +beat 453.72919 = 107.04103 seconds + + +00:03.145: ==NotesLoSM negbpm== +00:03.145: fnextposbeat = 449.500000, fnextposbpm = 47.419998, +00:03.145: fdelta = 4.040333, fwarpto = 453.540344 + +00:47.228: ==TimingData Delta as NoteRows== +00:47.228: fDeltaBeat = 4.000000 (beat) +00:47.228: fDeltaBeat = (NextBPMSeg 0.790333 - abs(fBPS 0.750000)) + (nextStartRow 21576 - thisRow 21384) +00:47.228: ==TimingData Delta as Beats== +00:47.228: fDeltaBeat = 4.000000 (beat) +00:47.228: fDeltaBeat = (NextBPMSeg 0.790333 - abs(fBPS 0.750000)) + (nextStartRow 21576 - thisRow 21384) \ No newline at end of file diff --git a/Docs/ezsockets.txt b/Docs/Devdocs/ezsockets.txt similarity index 100% rename from Docs/ezsockets.txt rename to Docs/Devdocs/ezsockets.txt diff --git a/Docs/interesting_sm4_commit_logs.txt b/Docs/Devdocs/interesting_sm4_commit_logs.txt similarity index 77% rename from Docs/interesting_sm4_commit_logs.txt rename to Docs/Devdocs/interesting_sm4_commit_logs.txt index d2e0639f20..99e2083e29 100644 --- a/Docs/interesting_sm4_commit_logs.txt +++ b/Docs/Devdocs/interesting_sm4_commit_logs.txt @@ -14,6 +14,12 @@ http://sourceforge.net/mailarchive/message.php?msg_id=E1FWjpV-0007eC-2G%40mail.s Some of the multiplayer stuff was later re-assembled but I think some of the pieces are missing. + +http://sourceforge.net/mailarchive/message.php?msg_id=E1HbPRZ-0003kC-8h%40mail.sourceforge.net +"We have two ways of only showing songs in roulette: unlocks and "#SELECTABLE". + +I'm not sure if this feature is worth keeping, but there definitely doesn't +need to be two ways to do it. Remove #SELECTABLE:ROULETTE." ________________________________________________________________________________ Viewing old source code: http://stepmania.cvs.sourceforge.net/stepmania/stepmania/src/ diff --git a/Docs/possible memory leaks.txt b/Docs/Devdocs/possible memory leaks.txt similarity index 100% rename from Docs/possible memory leaks.txt rename to Docs/Devdocs/possible memory leaks.txt diff --git a/Docs/rivaldata.txt b/Docs/Devdocs/rivaldata.txt similarity index 100% rename from Docs/rivaldata.txt rename to Docs/Devdocs/rivaldata.txt diff --git a/Docs/Devdocs/versioning.txt b/Docs/Devdocs/versioning.txt new file mode 100644 index 0000000000..ac5f679065 --- /dev/null +++ b/Docs/Devdocs/versioning.txt @@ -0,0 +1,12 @@ +[as taken from src/ProductInfo.h] + +Version info displayed to the user. + +These are the 'official' version designations: + * "experimental: pre-release versions + * "private beta v0.0": hmm, think about it for a second there. + ==Public versions below this line== + * "v0.0 alpha #": Alpha versions (bug squashing, polishing until we reach beta) + * "v0.0 beta #": Beta versions (bug squashing, _focus_ is on high priority bugs) + * "v0.0 rc#": Release Candidates (if there are no problems, move on to final) + * "v0.0": Final Releases \ No newline at end of file diff --git a/Docs/default theme flowchart.txt b/Docs/default theme flowchart.txt deleted file mode 100644 index 422ecb35f8..0000000000 --- a/Docs/default theme flowchart.txt +++ /dev/null @@ -1,40 +0,0 @@ -sm-ssc default theme text-based flowchart - -start - | - V -first run? - -first run = yes: Setup Sequence - -first run = no: go to Title Menu -================================================================================ -[Setup Sequence] {sequence} -1) Appearance -2) Gameplay (timing, etc.) -3) Extra (theme appearance edit, etc.) -4) Confirmation/Cancel - -"These settings are fine": go to Title Menu -"I don't like it, do it again": return to Setup Sequence #1 -================================================================================ -[Title Menu] {choices} ("Game" on original flowchart) -1) Start Game -2) Options -3) Edit/Share -4) Exit -================================================================================ -[Start Game] {sequence} -1) Load Profiles -2) [optional] ScreenCaution -3) ScreenSelectStyle -4) ScreenSelectPlayMode -5) SelMusic/Course -6) [optional] Player, Song Options -7) ScreenStage -8) Gameplay -9) Eval -10) Save profile - -if not game over (e.g. not on last stage, event mode enabled, etc.) -go to 5, otherwise... \ No newline at end of file