o0Corps0o Posted January 11, 2019 Share Posted January 11, 2019 Hiya, We've made a turn based instant game where people can choose to play against their friends.. This works fine. But we're looking at possibly adding the ability to play against a Random Opponent. Has anyone had any experience in making something like this? At the moment if i put a button on to 'Play Random Player' it will search for another player (matchasync).. and if someone else is looking it will create the link. However, i'm struggling to get my head around it, because i dont really want this and want to know if there is another way? Because what i need it really that you click 'Play Random' and then it starts up the game, player makes their move, and then it sends the game data to a random player? Quote Link to comment Share on other sites More sharing options...
SahJ Posted January 15, 2019 Share Posted January 15, 2019 look socket.io, that will help you with what you want to do, I've used it for the multiplayer of my game Quote Link to comment Share on other sites More sharing options...
o0Corps0o Posted January 29, 2019 Author Share Posted January 29, 2019 Does matchAsync() return anything when there is a match? ie. does it return who is player1/player2 or something like that? What i'd like to do is random two players, and one of them will play their move, and the other one will get a 'wait for other player to make their move', type of thing... Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.