Help with Photon :(

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi!

    As the tittle say, I need some help with Photon!

    Besides using construct for years, I'm a TERRIBLE programmer, so this is proving to be super challenging to me! (But we have to leave our comfort zones to improve right?)

    Ok so here's some questions I would like help with:

    1. I'm having problems to make each player having his own sprite.

    The player chooses between 3 colors, each one being 1 frame on the Player Sprite.

    So if anybody would know how to solve this or a proper tutorial, that would be great!

    2. The Photon Platformer Template works ok, but sometimes there's Lag (Chrome/Opera) and Idk how to fix this or if this could be solved on the server part of the project.

    3. Still on Tutorials, if I want to make an inventory or anything like it to each Player, do I need to set an Array to save stuff on a server? This part is super complex and I understand if anyone know how to answer it.

  • 1. just send the frame/variable in the message to the other player when your player is created. then every player has the variable that defines the color/image

    2. Make sure you use a server in the same region as you are. and also that all players join the correct region. You will always have some lag for multiplayer games though.

    3. if you want the players to keep their inventory when they disconnect and reconnect another day, then yes you will need to save the inventory somewhere. ether locally or on a server. But if the inventory only exist in the current game you can just use variables and send updates to the other when values change.

    Always try to send as few messages as possible. Only send messages when something actually is changing, do not send stuff "every tick"..

    Good luck! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • :D Thanks for answering so fast!

    For 2 and 3 I would definitely need to study more about servers x_x, but I guess that would happen eventually haha.

    About 1, what is happening is that each player has his own sprite color on his screen but all other players are with the default sprite.

    Since I was planning on adding more visual stuff for each player I really need to be able to fix this

    In case anyone reading this know how to deal with Proton

    drive.google.com/file/d/1QP3vUKwJG6FzbJ0d8XE8sOwHOrryVvjp/view

  • Well, you are not even sending any data for which sprite that has been chosen. When you raise event1 (when you join) you must send this data, otherwise no one will get it. How would they?

    Do not send individual messages for X and Y coordinates. send everying in the same messages. otherwise it will be to much!

    You actuallu get a template where to users can choose sprite in the embedded templates from Photon. The one with the fishes, look into that one. and learn and understand every event

  • :) hey!

    I'm currently studying the Fish template, just like u suggest!

    I'm still struggling a little bit but at least now each player has his own hat :D (yay!)

    The lag still weird and there's a lot I still need to understand before this project take some shape!

    o: I would like to ask how to send X and Y in one message!

    Anyhow ty so much for ur help :D

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