AlvinHew's Forum Posts

  • 6 posts
  • I figured it out!

    Used a method similar to one which oosyrag suggested, plus a little "coding gymnastics" to get it to do what I needed.

    Thank you, oosyrag!

  • I like the approach, but then I run into the problem where the engine compares "Day 2: Routine A" to "Day 1: Routine A", sees that they're technically not the same, and pushes a new cell. How do I get around that?

  • Hello, Construct friends! I need help coming up with a method for abbreviating consecutive tokens in a string with redundant information in a specific way.

    Outlined below are a few examples of the results that I'm trying to achieve.

    Example 1:

    input = "Day 1: Routine A|Day 2: Routine A|Day 3: Routine A|Day 4: Routine A"

    output = "Day 1–4: Routine A"

    Example 2:

    input = "Day 1: Routine A|Day 2: Routine A|Day 3: Routine B|Day 4: Routine B"

    output = "Day 1–2: Routine A|Day 3–4: Routine B"|

    Example 3:

    input = "Day 1: Routine A|Day 2: Routine A|Day 3: Routine B|Day 4: Routine A"

    output = "Day 1–2: Routine A|Day 3: Routine B|Day 4: Routine A"

    Example 4:

    input = "Day 1: Routine A|Day 2: Routine B|Day 3: Routine B|Day 4: Routine A"

    output = "Day 1: Routine A|Day 2–3: Routine B|Day 4: Routine A"

    Any help would be greatly appreciated!

  • Brilliant, it worked! Thank you so much for your help eleanorjmorel and oosyrag!

    I'm going to write down the steps I took to fix this problem so anyone who has the same problem in the future can reference it:

    1. Acquire TURN server. (I signed up for a free account on xirsys.com.)

    2. Configure TURN server. (xirsys.com provided a tutorial to walk me through the steps.)

    3. Insert the "Add ICE server" action into the event sheet. (Make sure this action goes before the "Connect to signalling server" action.)

    4. Plug in the TURN server url into the action parameters. (The url should look something like this: "turn:[SITE NAME]:[MORE CHARACTERS]".)

    5. Plug in username/credentials into the action parameters if necessary.

  • Very informative, thank you.

    I signed up for a free account on xirsys.com to gain access to a TURN server.

    The problem still persists, however.

    Here's my project, so you can see if perhaps my implementation of the "add ICE server" action was incorrect (I hid the username and credential information).

    dropbox.com/s/f4dphqm5mwkwmt9/multiplayer-test.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the reply, oosyrag!

    I'm working alongside charhew on this project, so I'm going to jump into this conversation as well.

    To answer your first question, yes we're using the default Scirra signalling server. And to your second question, we've also tried with different hosts.

    I have a couple of follow-up questions:

    1. If the game is being played through the browser, is it actually being downloaded by each user?

    2. I would like to do a test with a TURN server to determine if that is the solution to this problem. I see that Construct has an "Add ICE server" action, but how do I acquire the TURN server itself?

  • 6 posts