Knubbellttv's Forum Posts

  • No one?

  • I want to set my Project to 3840x2160 Viewport Size and 16:Ratio, because actually I have something like 43:18 with black bars at all around.

    If I do that and change a layout to a 16:9 like 1920x1080, some sprite are outside the window. How can I change that without setting all sprites in every single layout again? Is there a way to scale it?

  • Yes, I've seen that problem. I've tried to use enable local input at the peer side. But then the position of the blocks do not sync correctly. In the version I upload now the sync is okay, but it seems laggy for the peer.

    If you download the c3p File, u only need the "multilogin" Layout for start a test. All events are placed in Multiplayer-->Event sheet "1vs1multi".

    I've also added a test for photon plugin. Works fine, but too expensive if there are too many players :(

    transferxl.com/08jG9VD5w7ph1B (430MB)

    Here's an roadmap of the way the data comes in:

    1.) The time the block is create it also creates the text object (Under Group "Spawns2")

    2.) then it gets its value from the array (arr_1vs1right or ...left) randomly, depending on a random number (randomwithrigt/left)

    3.) the array gets its values at Start of layout from the files "serienchars.csv"

    4.) If text is created it sets its instance variables. I need esp "syncarray"

    5.) Under "Peer"Group the text objects gets their value from this variable

    6.) Now, if Left button is down at the peer, it sets "inputs" to 1

    7.) On client update it sets the coordinates of the mouse while dragging.

    8.) On "Host"Group there might be the problem with the "every tick" events. It updates the coordinates every tick and - if "inputs" =1 comes from the peer - sets the new position

    The focus on these events is to sync the coordinates of the blocks and pinned text, so that both player see where they are. This is nede because they want to find matching pairs in the game. So they need to see what the other player is doing.

  • Oh, that works fine. and so easy! I've done this before in an other scenario. Why I didn't get this by myself :D

    So the last thing I need is to improve the performance. The host now has almost around 10 Frames, the peer around 50.

    At the peak there will be around 75 blocks + their 75 text objects. How can I get a good performance in the multiplayer mode?

    So if you don't wanna work for me :D - Can I get you a coffee or donation somewhere?

  • Hi,

    I've got it worked for 1 instance if I broadcast with messages. I read that strings can't be synced, so I used the messages. But I think I doing it wrong.

    1.) I spawn a block and a text. Pin the text to the block. Set the text to a value from an array. and set the text instance variable (txtanswerinhalt) to the value of the text. That works fine. Each instance of the text has it's own Text like it should.

    2.) then I try to sync the text instance variable to the peer. So I send it via broadcast with tag. To get sure I get all txtanswerinhalt from all text instance I use system->pick all instances

    3.) On message I set the text instance variable (txtanswerinhalt) at the peer side to the value of the message and then the text object value to the new value of txtanswerinhalt.

    The problem is now that it does it only for one text. It doesnt pick all text objects at the peer side to update with the new values. So it show the same text at all text objects.

    Can you fix this?

    And maybe I should send you a job offer. What will it cost to hire you to make this multiplayer run?

  • Can I ask another question?

    I've now a block with a text. this text is in a container with the block. and the text comes from an array.

    while the blocks and text spawn correctly at the host side, the text is not displayed at the peer side.

    when I try to sync the text addiotnal to the block, the blocks spawning two times. this seems to be because of the conatiner.

    So how do I get the textobject synced?

    The host triggers the function:

    The host side has all informations

    the peer side gets no informations

  • Oh ossyrag, you're a genius! so many thanks :)

    I think it's a problem of my bad english to understand more complicated things.

    With this code both player can move the sprite and it is updating at both screens it's position.

  • Damn! I don'T get it worked for both sides. The peer sees the movement. but the host does not update the peers movement.

    C3p: transferxl.com/08jJhJ6BpxBJMJ

  • Thanks again. I'm trying hard to understand :D

    I've made a very very smaller c3p file just for understanding how to sync back from peer to host. maybee you can help on that small file better.

    transferxl.com/08jJhJ6BpxBJMJ

  • Thanks for your answer!

    I think my biggest problem is to understand the method of multiplayer.myid .peerid and the sync and associate stuff in english. Since some weeks i look every video and I don't know how often I read the tutorials for multiplayer. and the sync doesn't work :(

    I thought it was much simpler to sync.

    Because the only thing to do is to connect 2 players.

    then spawn the sprites and the random text.

    both player only have their mouse for drag&drop the sprites and click a button if they found a pair.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys,

    I've connected peer to host and the sprites got sync. But the container with the text does not sync.

    First I put the text from csv into an array.

    The time the game starts (host & peer connected) the function "spawnF1vs2" spawns blocks with text. The text ist set from an array.

    Then I try to sync the blocks (spranswer) and their text (txtanswer). The text is in a container with the block.

    On the host side it works normal.

    But on the peer side the blocks are not at the correct size, the text container isn't there and it spawns additional blocks.

    I'm a little bit confused. So what do I exactly need to sync if both players should play with the blocks at the same time?

    this is the c3p file: transferxl.com/08jjBF20vBMfww

    You only need the layout "multilogin" to start. Insert a name and it switches to the "1vs1multi" Layout. The Event Sheets for these two are "Event Login Events" and "Event 1vs1multi".

  • No one with this problem?

  • Hi,

    I've a little Problem with scaling the TextInput.

    As you see the inputfields are created. But the words the player types in are to small. how can I scale them for better reading in the event sheet?

    Tagged:

  • ah, okay :)

    On firefox still doesn't work. On chrome it works!

    But how can that be??

  • Hi,

    still doesn't work for me.