? Basics of Multiplayer #1 ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
💀

Basics of Multiplayer #1

Hello. I just wanted to help people with multiplayer on smilebasic if they only have one 3ds or need help!Like if this helped MPSTART Starts a local connection MPSTART (MAX PLAYERS),"(LOCAL NAME)"
  1. Example
MPSTART 4,"ANYSTR" (^What does that do?^) That example is allows 4-players connect to each other. They Can also only connect if all of their local names are anystr. MPEND Ends a local game. MPEND MPCOUNT Number of users in local game PRINT MPCOUNT (^What does this do^) It displays the amount of players. What the numbers mean: 1- 1 player 2- 2 player 3- 3 player 4- 4 player MPSEND Sends data to all users in local game MPSEND "(Character String to send)" Example:MPSEND " HI" (^What does this do?^) The example sends all players the message "hi" if they are all receiving. MPRECV OUT Receives data from MPSEND MPRECV OUT SID,RCV$ Example: MPRECV OUT SID,RCV$ PRINT SID;":";RCV$ (^WHAT DOES THIS EXAMPLE DO?^) Shows you the number of the device that Sent the data and what they sent. Example (Local Chat 4-player max): MPSTART 4,"CHAT" @loop CLS MPRECV OUT SID,RCV$ PRINT RCV$ PRINT"X:TYPE" IF BUTTON()==#X THEN WAIT 10:GOTO @SEND WAIT 1:GOTO @LOOP @SEND ME$=DIALOG("","") MPSEND ME$ GOTO @LOOP Want more? Like and I may make another!
Author
16bitcoder
Updated
Rating
9 votes
Categories
Keywords
17 Comment(s) Joshuaham123 Joshuaham123 I am trying to send x but it says type mismatch kenchic kenchic OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements X needs to be a string. Joshuaham123 Joshuaham123 It is 64 kenchic kenchic OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements Then convert it to a string with STR$() and convert it back with VAL(). kenchic kenchic OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Second Year My account is over 2 years old Website Good Page Hidden Achievements lol i need two 3ds's with smilebasic on them for my projects 16bitcoder 16bitcoder Thanks for the support! I'm glad to help for multilayer purposes! 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website My questions: -How do you figure out your terminal ID -What does MPNAME$ do? (how do you set the name) 16bitcoder 16bitcoder Well 1) here are the terminal ids Host = terminal id (0) first connecter= terminal id (1) 2nd connector= terminal id (2) 3rd connector= terminal id (3) And 2)MPNAME$ is your device name you set. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website How do you set MPNAME$ though? How do you figure out your terminal id? (you didn't really answer my questions...) 16bitcoder 16bitcoder Well I FOUND OUT the terminal ids from THE MANUAL and you SET MPNAME$ when you set the setting the FIRST time you start your 3DS! Or you can set MPNAME$ with NAME$=MPNAME$(0) HackTheWorlds HackTheWorlds Second Year My account is over 2 years old Website Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Reading I like to read books! Hobbies MPNAME$ is actually just the name of the 3DS console. You can change it in the system settings. snail_ snail_ Helper Received for being very helpful around SmileBASIC Source Achievements OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! Night Person I like the quiet night and sleep late. Express Yourself MPLOCAL is the ID of your system, and MPHOST is the ID of the host system. Thus, MPNAME$(MPHOST) is the host's name and MPNAME$(MPLOCAL) is yours. 16bitcoder 16bitcoder Need help with multiplayer? CLICK HERE^?☝ CodingEpic CodingEpic Very useful JustGreat JustGreat First Month Joined in the very first month of SmileBASIC Source Website Avatar Taboo I didn't change my avatar for 180 days Website Night Person I like the quiet night and sleep late. Express Yourself I started implementing wireless muliplayer in a game I'm making, so proper tutorials on these features would be really great. The more I know, the more I can future proof until I have an actual testing partner T_T. 16bitcoder 16bitcoder Well I hope this helped! 16bitcoder 16bitcoder Check out the basics of multiplayer!