Ok so a ton of people, including me, have said that this is not possible… and we were wrong. The main issue with this is that you need to actually share and play the multiplayer game to test it, as it doesn’t work in the multiplayer sim view, only when actually hosted and played.
Basically, I looked at the multiplayer code for like 5 minutes, saw a special little function that I thought might do what I want, and then it did! I will be making more stuff with/about this in the future, but I really wanted to get this out there so that my fellow javaScript devs could mess around and find more stuff with this (I’m lazy and finals are happening so other people will have more time than I have to test this out)
The only limitation is that only the host screen can be different. All other screens look the same, so something like 4 player Uno would unfortunately not be possible… unless some other method is found, who knows, but I really doubt it.
Here are some ideas I had for games that are possible to build now:
Two player board games where there is hidden information such as Battle Ship and Guess Who
Chess, checkers, tic tac toe, etc where each view is the correct one for the person playing
Uno, Scrabble, Dominos, and a TON of card games (all these would only be 2 player only unfortunately)
Classic .io games but just 2 player
Co-op puzzle/survival games like MineCraft, Portal multiplayer, Ibb and Obb
If you guys have more ideas, please share them below! I haven’t decided what I’m going to make first yet… lets be real I’ll probably make an extension first, but still I really want to make games too!
holy namespace userconfig { export const ARCADE_SCREEN_WIDTH = ; export const ARCADE_SCREEN_HEIGHT = ;} this is awesome, so many new things can be made with this
@richard I’m guessing that the reason this doesn’t work in the simulator is that the sim assumes all the screens will be the same and just copies the host screen. I’m wondering how performance draining it would be to have them work like the shared versions, where the 3 other screens work with a fake “server” behind the scenes.
No, as only the host screen can be different. The way multiplayer works is that, after the host’s screen renders, it runs the code postImage(screen), which sends the whole rendered screen to all the other connected players. Obviously this is a simplification, but it does mean that all the other players all see the same screen and cannot be addressed individually.
Well that makes my job easier. If you can, try to locate and destroy the frame handler that is created in the initServer function, as that could lead to the host’s screen being momentarily flashed on the screens of the other players if a lag spike occurs or the frame order gets messed up somehow. I haven’t seen this happen, but I haven’t tested creating particularly laggy functions that would occur between the default postImage() call and the one we are sending to replace that screen afterwards.
It would also stop the host from sending literally double the needed information over a potentially laggy internet connection, as well as taking double the necessary resources on whatever server is stuck in between the host and the other players.