multiplayer chat example

0 favourites
  • 3 posts
From the Asset Store
Chat with smart animals using the OpenAi Chat GPT 3 API
  • Hello,

    i am making an stratego game, i have finished the one player mode vs the computer-AI and now i want to add an online mode. I've tried the pong example with my two pc's and works but when trying the chat example it connects for a momment but then both pc's get kicked off (and also when the host writes a messages it only shows it in its own pc and viceversa for the peer).

    The stratego is different from the pong example because it doen's use a common screen (layout) but 2 differents screens (layouts) with the same event sheet. The peer layout mirrors the host board...BUT for the moment I cannot even pass a global value from the host to the peer throught the (broadcast/ on message "" received) like a timer for player 1 (host) that I want to pass to the timer for player 2 (peer) so the peer has the same value as the host (i did it already for a timer for each one and the peer pc (oldest) lasts like 2 more minutes in a 10 mins countdown with respect to the host). SO the thing is: is the problem with the server? or something with pc/scirra config? (chat example doesn't work) or i am not following right the tutorial examples?...also another question: it is neccesary to put the sync/ client input values before the connection to the server...or you can do it along the game...

    Thanks,

    Alfonso Martinez

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You should read the multiplayer tutorials so you don't run in to problems they cover.

    [quote:294wvouc]It's also possible someone will already be hosting the tutorial but you won't be able to connect to them. If that happens, change either the game, instance or room name and you'll start a new game which you host yourself.

  • Thanks Ashley for your quick answer,

    I've read first 3 tutorials (I forgot about changing any global variable in the chat example to avoid that problem)

    I also solved the problem with passing a global from host to peer. I would recommend to specify explicitly in the tutorial that broadcasted messages must be with variables of string type (if the global is a number you can do str(var)...)

    Is it neccesary to put Sync and add client input value before connecting to signalling server (as in the pong example)?

    Thanks a lot in advance,

    Alfonso Martinez

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)