Delphawi's Recent Forum Activity

  • Nice idea! Good luck!

  • I'm afraid it's impossible to tell what the problem is from a post like this. This is why we have an issue tracker with guidelines about what information to provide - we need that information to identify what is happening, and fix the problem.

    Thank you. I am aware of that.

    The project is just complex and it will be hard for you to reproduce it without lots of instructions. I thought if I can get some hints, I might be able to do more digging on my side first before submitting an issue.

    Thank you for your time.

  • Hello,

    I am doing a multiplayer game, and when a peer is kicked, he is sent to the first layout.

    Currently I get this uncaught exception on Chrome, right after the kick/leave. It causes the load of the first layout to halt, and the screen shows parts of the two layouts and remains in this state.

    Uncaught (in promise) TypeError: Cannot read property 'Update' of null
     at WorldInfo._RemoveFromRenderCells (worldInfo.js:53)
     at C3Runtime._FlushInstancesPendingDestroyForObjectClass (runtime.js:56)
     at C3Runtime._FlushInstancesPendingDestroy (runtime.js:55)
     at C3Runtime.FlushPendingInstances (runtime.js:54)
     at C3Runtime._DoChangeLayout (runtime.js:76)
     at async C3Runtime._MaybeChangeLayout (runtime.js:73)
     at async C3Runtime.Tick (runtime.js:66)

    I cannot share the project (sorry..), but I noticed in the debugger that the synced objects has 0 instances in this state.

    Maybe if I can trace the source of this error, I can find more details about the root of this problem.

    Thank you.

    Tagged:

  • A straightforward (but boring) way to do it is to make 9 textinputs (ti1, ti2,..) next to each other. Then put their value in one variable like: Set Variable code to ti1.Text & ti2.Text & ...

    Then you can check if code = the code you are looking for.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Update:

    I revised my whole code, and simplified it. Instead of all the "leave management" I was trying to make, I added a simple line to my initial multiplayer function (the one that starts the signaling process):

    - If the user is connected to the signaling server: disconnect, wait 2 secs, connect.

    Else: connect.

    A lot of issues disappeared at once after this line! but I am still facing some irregular issues now.

    For example; the first peer to join a room (after the host) will usually be kicked right after joining. The 2nd, 3rd.. players join just fine. I traced that to a syncing issue, where one of the synced objects is not created for that 1st player, and for some reason is created for the others. Sometimes, this doesn't happen at all.. I have spent hours tracing the causes of this issue, and disabled most of my multiplayer code in a try to find the root of this problem.

    I tried this with the Pong sample as well. I only added a button in the game screen that only does the following:

    - Leave room (I tested other situations where I disconnect from server instead).

    - Go to Login layout.

    Trying to make the peer leave and rejoin would cause some bugs (duplicate objects, sometimes it did not log in...)

    What is interesting is that this only happens in preview (I am testing 4 previews at once). After I uploaded my game to itch.io and tested with 2 windows, this did not happen -so far-.

    I will keep improving my code and will see how thing go!

  • Hello,

    I was trying to understand what is "forward parameters" when calling a mapped function. The Functions documentation only had a section about Function Maps, which directs to the Function Map sample. I found what I was looking for in one of the comments inside the sample, but it would have been nice if the documentation itself had this info.

    Thank you.

  • Thank you for your reply.

    For anyone that would face similar issue, I guess I found a solution, which involves:

    - Solving some bugs on my side. Like re-activating/deactivating initial groups after restarting. Also some steps were working fine, but causing problems under the hood (!!!). I revisited the pong tutorial to fix them.

    - This is the leave code (called On Start of Layout) that worked for me (so far!):

    Basically:

    - If host: Leave room, then when left room, leave server.

    Skipping the "then" step and disconnecting directly from the server (using either of the Disconnect options in the Multiplayer object) will cause the the preview (in Debug mode) to crash, along with the editor !!!

    - If peer: Disconnect from signaling server directly.

    Now I can restart smoothly.

    Before using the above code, I had to click connect, then wait for the connection to be refused by the server, then click connect again, and now I can restart properly. (connect=the signalling sequence of the pong tutorial).

    Also, the Leave action has this in the description: "Peer connections are not affected". What does it mean, exactly?

    - Does it mean "It only works for the host, and peers have to Disconnect instead".

    (Which aligns with my findings; because in earlier tries, I used Leave without the "If host" check, and it didn't work for peers (I had to re-connect twice).

    - Or, "Peers will not be kicked from the room even if the host leaves"?

    Ashley

    Thanks.

  • Hello,

    I have a game (following the multiplayer tutorials). When I try to reset the connection after the game (so the players can start over) I get all sorts of errors:

    - Sometimes leaving + disconnecting causes the Peer object to be destroyed, and the console shows red errors about RTC errors. Like these:

    On the host:

    Peer '0OF8' datachannel 'o' error: RTCErrorEvent dc.onerror peer.js:4 domSide.js:49 [Multiplayer] Peer 'playerHost' (0OF8) error: RTCErrorEvent _OnPeerError domSide.js:49 peer.js:4 Peer '0OF8' datachannel 'r' error: RTCErrorEvent dc.onerror peer.js:4 domSide.js:49 [Multiplayer] Peer 'playerHost' (0OF8) error: RTCErrorEvent _OnPeerError domSide.js:49 peer.js:4 Peer '0OF8' datachannel 'u' error: RTCErrorEvent dc.onerror peer.js:4 domSide.js:49 [Multiplayer] Peer 'playerHost' (0OF8) error: RTCErrorEvent _OnPeerError domSide.js:49

    On the peer:

    Peer 'AYKF' datachannel 'o' error: RTCErrorEvent dc.onerror editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:4 editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/domSide.js:49 [Multiplayer] Peer 'playerPeer' (AYKF) error: RTCErrorEvent _OnPeerError editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/domSide.js:49 editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:4 Peer 'AYKF' datachannel 'u' error: RTCErrorEvent dc.onerror editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:4 editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/domSide.js:49 [Multiplayer] Peer 'playerPeer' (AYKF) error: RTCErrorEvent _OnPeerError editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/domSide.js:49

    - If the host left the room, the other players get the following:

    "Cannot parse off host time from pong response _OnPong editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:20 _DoOnMessage editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:22 _OnMessage editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:21 dc.onmessage editor.construct.net/r234-4/plugins/web/multiplayer/c3runtime/peer.js:4"

    - I tried to print the connection parameters on start of the layout:

    --- The first time I run the game, the room name, signaling server name,... are all empty strings.

    --- After I connect, play, disconnect and leave, and then restart the layout, the names are still saved in the multiplayer object. Shouldn't leaving erase this data?

    - On peers, I destroy the Peer objects at the start of layout (since the host will create them).

    In short, what is the proper way to close the connection (including the destruction of Peer objects) so that when I restart the layout and the code runs from the start, it works just fine like the initial time?

    I have tried many combinations of leaves/disconnects/destroys..etc, with no avail. Any guidance is appreciated :)

    Thanks a lot.

    Tagged:

  • I have a sprite called BoardQuestion where the user draws on. It is on layer "Play".

    I used BBox to get the coordinates, and it worked.

    I tried to get part of the BoardQuestion, but I couldn't. i.e.: I have to snapshot the whole sprite.

    I tried using a DrawingCanvas and/or another Sprite that covers only the area I want from BoardQuestion, but every time I take a screenshot, it leaves a part missing or extends outside BoardQuestion.

    Here is my working code so far:

    Ashley CanvasSnapshot is such a nice feature! Please add a more generic approach in the CanvasSnapshot example (i.e. snapshot of a selected area instead of a Sprite or the whole canvas).

  • I have been trying Rope style pin, and changing the angle manually, but results are still bad. I tried to make links instead of linking carts directly to each other, but still not good ..

    Here what I did so far:

    goo.gl/knaNSr

    Any idea how to do it properly ?

    Thanks

  • Thank you, R0j0hound

  • Thank you very much for the help.

    I think the file method (using NW.js) will make it hard to know when a program edits a file. If the file is shared between the two processes, how does one know when the other is done editing ?

    The clipboard method seems clever! and the js seems promising might try them.

Delphawi's avatar

Delphawi

Member since 3 Dec, 2013

Twitter
Delphawi has 1 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

17/44
How to earn trophies