Can I have 2nd layout 'always loaded' on top of main layout?

0 favourites
  • 4 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • In order to build a multiplayer persistent world using Construct, the optimal construction seems to be that every area of the world is its own layout, which is then hosted 'peer-to-peer' whenever two players enter the same layout (rather than having a 'host' computer run the whole world on a single layout, which other players then connect to). So, for example, for a multiplayer Zelda-y world, every screen is its own layout, and if two players are on the same 'screen' of the world, they connect to each other; otherwise, they're not online.

    This is all fine and dandy, but it creates a serious complication for player chat. My understanding is that the current way of accomplishing multiplayer chat requires players to be on the same layout together; so your world would have local chat at that point, but no global chat.

    I'm sure there are alternate solutions, like piping in IRC or some sort of external chatroom externally. But within C2, would it be possible to simply layer a second 'layout' over the main game layout that just handles the chatroom? This way, all players would be on the same 'chat' layout and sync the chat through a multiplayer object on that layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would say is to use post requests to a php file to update a jsonValue then every 2 secounds is to use a get request to get the chat

  • I would say is to use post requests to a php file to update a jsonValue then every 2 secounds is to use a get request to get the chat

    Yeah, that's probably the best way to do it. Just figured I'd ask!

    Would there be a way to have C2 create a new PHP file on the server during the course of the game? For example, let's say a player 'groups up' with several others, would it be easy using C2 to create a PHP file with the filename of the group leader's name on the server, and then they have their own private chat room separate from the global chat room? (assuming it would be trivial to make the chat window 'tabbed' when building the game's interface)

  • have it store usernames that can only see the chat if the names are nil then show the whole server.

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