? 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
20 Comment(s) Xenoslyce Xenoslyce Video Games I like to play video games! Hobbies Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength wait why did this dude get banned TheV360 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself I don't know, but I just realized that I was around when the ban message said "Chat and Site banned for 10 years". Time is passing and that's terrifying Xenoslyce Xenoslyce Video Games I like to play video games! Hobbies Night Person I like the quiet night and sleep late. Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength The thing I'm interested in is how to do multiplayer games lol Joshuaham123 Joshuaham123 I am trying to send x but it says type mismatch kenchic kenchic Avatar Taboo I didn't change my avatar for 180 days Website Third Year My account is over 3 years old Website osu! Is Awesome! I love osu! Express Yourself X needs to be a string. Joshuaham123 Joshuaham123 It is 64 kenchic kenchic Avatar Taboo I didn't change my avatar for 180 days Website Third Year My account is over 3 years old Website osu! Is Awesome! I love osu! Express Yourself Then convert it to a string with STR$() and convert it back with VAL(). kenchic kenchic Avatar Taboo I didn't change my avatar for 180 days Website Third Year My account is over 3 years old Website osu! Is Awesome! I love osu! Express Yourself 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 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself 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 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself 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!