Biscotto's Recent Forum Activity

  • First thing, even if it surely won't solve anything, is to try to autilize another browser where you definitely don't have caches or similar things saved, and test if the same error occurs.

    Next, since you said you don't know if this occurred after the C3 update, I suggest you try to downgrade the Construct version, and check if the error occurs anyway.

    Finally, if you still can't fix it, try creating a new project, and copying the various project settings into your project (before doing this make a backup copy of your project so you can recover all your settings in case the problem doesn't resolve).

    Unfortunately, since we don't get a specific error from the export log, we have to proceed by trial and error...

  • Without more information I think it is very difficult to help you.

    What changes did you make from version 1.0.4 to 1.0.5?

    Did you change project settings, add/change plugins or application signing options?

  • If you have a request or suggestion for Construct 3, I suggest you post it in the platform created by the developers (I don't think this forum category is suitable for these requests): construct3-21h2.ideas.aha.io

  • Can you show, even with a simple screen, the part of the events you are referring to?

  • I think I was able to solve it.

    The problem was not in my functions, but in the way C3 synchronizes the objects. The Player object that was specified as the object to keep synchronized with the peer, was not always created in the same sequence. In practice, I noticed that although Player1 was always created first in the host, when the instances were synchronized in the peer, Player2 was often created first.

    Currently, however, I think I have solved everything by setting the sending phase of the various data by step. Each time all the objects have been created correctly in the peer, the peer sends a message to the host to indicate that everything has been created, and consequently the host proceeds to send the rest of the data.

    Thanks for your answers though! ^^

  • Is there a specific tutorial that covers instances in events that you can point me to?

    Within the editor there are many tutorials in the "Beginner" section that can help you understand how construct works.

    This is simple tutorial that might help you: editor.construct.net

  • When an instance is created, C3 identifies it with a UID and IID. For example, you can make a pick of an instance using the appropriate event by referring to its UID.

    Here is the link to the manual page where it is explained what an instance UID and IID is: construct.net/en/make-games/manuals/construct-3/project-primitives/objects/instances

  • You do not have permission to view this post

  • As for my first problem, I solved it by sending a single message at the end of the loop in JSON string format. This way I avoided sending messages to the peer for each loopindex. Sending each message with a tag based on the loopindex would have been very difficult since if I have a 10x10 grid I would have had to hand write 100 ifs to make the peer perform the correct action for each message tag received.

    My big problem that I can't solve/understand now is the one mentioned in my last post.

    It seems that during message exchanges the two apps lose their synchronization....

    When a message with a certain tag is received, can it be overwritten by another message with a different tag received shortly after?

    As you can see from the last screen, I created a "dialogue" of messages with "pg" tags between host and peer so that one sends data to the other only after receiving the right information from the other. In this way I thought to avoid loss or lack of data, but it doesn't seem so. By removing the 0.01 sec "waits", the problem seems to occur more frequently.

  • Don't use alert or anything else that waits when receiving network messages. It means that while it's waiting, other messages can arrive and overwrite the current message. It should always work fine if you avoid alerts/waits.

    I continued to experiment with the functionality of the Multiplayer object, and found another problem that was a bit stranger than the one in the previous posts.

    I'm attaching an image so you can better understand my situation:

    (the two functions set variables and create objects. They don't have any event of "Wait" or similar)

    The events you can see are executed only by the peer, and the various events of sending messages to the host are executed when your Player objects have been correctly created (the sub-event of the "On created" event is executed only when the second Player object (there are 2 Player objects in total) is created.

    The problem occurs randomly, as some times everything is executed correctly, while others I've noticed two types of errors occurring randomly and separately:

    - In the first sub-event, the two functions are not executed, but the "pg" message is still sent.

    - In the event of receiving the "pg" message from the host the Player pick is not executed because through an Alert of Player.Count the result is 1 (this should not be possible since the previous message of the above event is sent only if the second Player has been created)

    By inserting those two "Wait" events it seems that the errors occur less times, but still they occur very often.

    Since some times the code works correctly, I can't figure out where the error is and what it is caused by.

    I thought that the ids present in the Multiplayer object sometimes were not correctly accessible, and I tried to save them in a variable, but the result did not change, so the problem does not lie there. I have also checked several times that the Player.peerID variables are correctly assigned, and each time the variables are correct.

    Finally, I would like to point out that every time the problem occurs, both Players are on screen correctly, although a few times the Alert with Player.Count returned me the value 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Basically you want to use an image that you used on Construct within your site's CSS file?

    In this case the answer is yes. After you have exported the game to HTML5, you will have all the folders/files of your game available. You can then access the folder path where the image you want is located, and use it in any line of code on your site.

  • You can go either way.

    If you want to use the Advance Random object then you can use its "Probability tables".

Biscotto's avatar

Biscotto

Member since 11 Aug, 2021

Twitter
Biscotto has 1 followers

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

7/44
How to earn trophies