プレイ日記
Squidy matthew3737
how do you make local/online multiplayer games?
5そうだね
プレイ済み
返信[1]
親投稿
Dont even try...its way to complicated and hard...
1そうだね
プレイ済み
返信[2]
親投稿
Squidy matthew3737
has anyone done it before?
0そうだね
プレイ済み
返信[3]
親投稿
Yes...but those games are very professional.
0そうだね
プレイ済み
返信[4]
親投稿
Squidy matthew3737
cant i just copy/paste the multiplayer code?
0そうだね
プレイ済み
返信[5]
親投稿
No
0そうだね
プレイ済み
返信[6]
親投稿
PChicken NerdChicken
Use MPSTART to start a wireless multiplayer session. For the rest of the multiplayer commands, use the help button on an empty line and find them.
1そうだね
プレイ済み
返信[7]
親投稿
call MPSTART in the very beginning of the game This will give variable MPLOCAL a number (starting at 0 and counting up, each connected device has a unique number) This also sets MPHOST Examples in code: IF MPLOCAL!=-1 THEN 'if server is open IF MPLOCAL==MPHOST THEN 'if you are the creator of the server Now: you use MPGET and MPSET to set a multiplayer value, you can have 8 variables shared ...
3そうだね
プレイ済み
返信[8]
親投稿
... this is one way to communicate The other way is using MPSEND This will send a string to every device connected, it just pushes it onto a queue, then the player uses MPRECV to check whatever's on the queue and get the string MPSEND and MPRECV are like a mailbox MPSET does not send any data out, just sets it's own 8 3DS variables MPGET goes out and looks for someone else's 8 variables
2そうだね
プレイ済み
返信[9]
親投稿
MPNAME$ simply gets the name of whatever device you want In the SmileBASIC tutorials, these assigned MPLOCAL values are called Terminal IDs More code examples: PRINT "Server created by "+MPNAME$(MPHOST) PRINT "Your name is "+MPNAME$(MPLOCAL) MPSEND "HI EVERYBODY!" MPRECV OUT tid,message$ PRINT MPNAME$(tid)+" said "+message$ 'which will print out "Squidy said HI EVERYBODY!" to every device
2そうだね
プレイ済み
返信[10]
親投稿
Simple mulyiplayer chat: (Not tested but I'm 99% sure it works) ACLS MPSTART ?"PRESS A TO CHAT" @LOOP 'make an infinite loop VSYNC 'make loop run at 60fps MPRECV TID,MSG$ 'loop for a message IF TID>=0 THEN ?MPNAME$(TID)+": "+MSG$ IF BUTTON() AND #A THEN INPUT "TYPE A MESSAGE";MSG$ MPSEND MSG$ ENDIF GOTO @LOOP
2そうだね
プレイ済み
返信[11]
親投稿
Squidy matthew3737
is this correct so far?
0そうだね
プレイ済み
返信[12]
親投稿
Wait first tell me what you are trying to do, are you making a multiplayer chat? Or a multiplayer drawing application? Or a multiplayer platformer? A multiplayer firework simulator? Multiplayer pong game? Multiplayer tic tac toe? Chess? Do you have a game you want to add multiplayer to? What's your goal here? ...just wondering :)
0そうだね
プレイ済み
返信[13]
親投稿
Squidy matthew3737
a game similar to Miner Life
0そうだね
プレイ済み
返信[14]
親投稿
Squidy matthew3737
in style atleast
0そうだね
プレイ済み
返信[15]
親投稿
PChicken NerdChicken
you're doing it wrong. You're trying to run a variable all by itself on a line, so the value has nowhere to go
0そうだね
プレイ済み