ThePhotons's Forum Posts

  • Hi,

    What error exactly? Please provide browser log content.

  • Photon Scirra C2 SDK updated: https://www.photonengine.com/en-US/Real ... construct2

    Changes:

    New Photon Chat Plugin (photon-chat.c2addon) added

    Photon Realtime Plugin (photon.c2addon) features added:

    • joinRandomRoom matchmaking options (mode, lobby parameters, optional usage of max players and properties of local room)
    • joinRoom rejoin actorNr, createIfNotExists and lobby parameters (current room properties used for create operation)
    • createRoom lobby parameters
    • setPropsListedInLobby action
    • RoomProperty expression (for getting property of room in lobby)
    • LogLevel setting in Photon object
    • webRpc, findFriends, requestLobbyStats actions and conditions
    • onAppStats condition
    • isConnectedToMaster, isInLobby, isJoinedToRoom conditions
    • setRegion action
    • room and actor setProperty: WebForward and CheckAndSwap/ExpectedValue parameters
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • what will the update contain ThePhotons And can you please implement so its possible to send multiple data with an event and not just 1? That would make things much more easier

    What "multiple data" looks like?

    Photon can send arbitrary js data (basic types, objects and arrays) but Construct2 does not support anything aside strings and numbers as far as I know.

    You may send any data as string using json encoding.

  • Hey, there is a problem. It's not possible to create a room by clicking a button. It also won't work in your demo... the error: http://prntscr.com/bk7e93

    I get the same error, when trying to join a random room: http://prntscr.com/bk7tus

    But I found a workaround for my problem. What exactly is the InterestGroup? Photon.Property, Photon.ActorNrAt() etc..is there an explanation for all these?

    Hi,

    The plugin wraps Photon javascript library. So you may find js SDK documentation useful: http://doc-api.photonengine.com/en/javascript/current/

    Different Photon concepts available in all SDKs described in general documentation https://doc.photonengine.com/

    Also plugin has short descriptions of js lib methods and parameters it exposes.

    Interest groups allow send events to group of players only instead of all. Player should add this group first to receive such events.

  • We are going to release Photon plugin update and new Photon chat plugin next week.

  • How do I sync bullets to other players? Let's say I want a player to press SPACE to spawn a bullet.

    What do you want to sync exactly? if bullet visuals, send event to others about bullet starting point and velocity. If bullet hit then send position of hit for visualization and/or hit result (damage e.g.)

  • Hi guys i´m trying to use this plugin but having troubles with it. Could you guys help me? I am makina a multiplayer quiz with Photon. When a player logs in he goes to a main room where he could find other spare players in order to invite. When he invites another player and the other accepts, both are taken to a new room, just for them. This works fine in multiplayer plugin, but when trying to make it in photon (I first leave room and then, when i am in lobby again), the room is created but some seconds later i get an error 1003/ Server closed connection.

    Thank you for your help

    This is due to a bug in leaving room logic in Photon js SDK. Fixed. Please download updated Scirra SDK version 4.0.0.1.

    Thanks for report.

  • Found on Photon forum (http://forum.photonengine.com/discussio ... ment_24978):

    "The messages limit is not a hard one. If one game goes over it but some others are not, then we won't do anything about it. Also, the first thing we do is to get in contact with you, if the limit is a problem."

  • 1 - What's the difference between real-time mode and chat mode?

    Realtime and Chat are different servers providing different APIs. Realtime lets clients communicate inside a room after room created and joined from a lobby. Clients see all others in a room and can chat inside room via Realtime events. Clients can't see clients in other rooms.

    Chat API provides public channels subscription/unsubscription and private messages model. All clients connected with the same appid can exchange with messages. But they should know each others names or shared channel name. You can't list all clients joined to a channel or to a server as you do for room player list.[quote:34n8tgra]

    2 - Do you planning make a plugin for a chat?

    We do not have ETA at the moment. [quote:34n8tgra]

    3 - With current plugin, I can not connect to the server: "Authentication failed"

    I need a same plugin, but i want to link it with chat-server.

    Maybe the problem can be solved by changing a few lines of code?

    AppId type defines which server, Realtime or Chat, client will be routed to. Running plugin with Chat appid will result in connection failure since Chat server expects Chat client to be connected.

  • 1. You can find download links in initial topic post:

    2. Photon Chat is another Photon API which most likely requires another C2 plugin which does not exist currently.

  • Anyone have any idea about the process in creating an "mmo" style game using Photon that is equipped with account registration/login and a database to store/load user information?

    1. Would we need to run a Photon Server (Self-Hosted) - instead of going the Cloud route?

    2. If so, how do we get that up and running: I've followed the quick start guide but no luck connecting via my C2 app: http://doc.photonengine.com/en/realtime ... uick-start

    1. The main reason to switch to Photon Server for MMO is requirement to handle large number of players. Without client's "interest area" support by server, you end up with too many updates across network. Photon Server goes with MMO application sample. See https://doc.photonengine.com/en/onpremi ... mo-concept and oter MMO documentation for details.

    2. What errors do you get in console? Does Photon server successfully starts with LoadBalancing application running? You may test this from PhotonControl tray utility menu.

    In client's Photon object properties, HostType should be set to Self Hosted and selfHostedAddress to your server address and port like localhost:9090

  • Web forward is not even in Photon js SDK yet (only room properties can be forwarded). So in this case we need to update both products.

    Construct2 plugin is not priority for us currently. We released basic version as POC and now happy to see that it works good for many Scirra users. This encourages us to invest time in adding some of missing feature. As I wrote earlier, it's not easy sometimes to express even quite simple things in terms of Construct2 visual editor. But things like web forward or room matchmaking basics can be added easily.

  • 1. I wasn't looking for random matchmaking, but a way to only return rooms which meet certain criteria like game mode, a specific stage, etc. Does that make sense?

    You can iterate over room list and check criteria on each item. Photon does not provide filtering for room list request.

    It does so only when "join random room" operation invoked (not implemented in plugin yet as I said)

  • 1.Random matchmaking is in our todo list but I don't know when exactly it will implemented.

    2. Please find room list handling sample in demo-test. Looks like you iterate extra room. Use Photon.RoomCount - 1 as upper bound.

    3. You do not need to send strings or any other payload. Assign different event numbers to each key.

    Event behavior is not affected by payload type. This is hardly possible that same event works with coordinates but fails with string. Please search for errors in browser console log and let me know if something useful is there.

    4. Photon events are identified by numbers. In conventional languages constants or enums are used for such things as event codes. If you know C2's equivalent for constants, feel free to use it.

  • I have a question though: when does the "On join lobby" triggered?

    ...

    does it get triggered when the game first played or when the player leave a room? (or both?)

    "On join lobby" is triggered when client successfully connects master server. This happens after initial connect and after leaving a room.

    Check Photon's 'StateString' expression to get an idea where client currently is. "On join lobby" should be triggered when client gets in "JoinedLobby" state.