oosyrag's Forum Posts

  • A series on how to develop plugins and behaviors with JavaScript may be more relevant. There are many excellent resources already out there that allow a person to learn JavaScript in general, easily found for those who are interested. Logic skills learned from Construct are pretty much innately transferable in most cases without a need to specifically reference them.

  • It should be possible to create your own authentication/database server with the multiplayer plugin, but decidedly not recommended as it wasn't intended for that sort of use.

  • I didn't find anything out of the ordinary.

    Minamal project - received messages are logged to an array you can see in debug.

    dropbox.com/s/x4ka9goj2gqwh3m/mp-localpreview-debug.c3p

    How many peers? When does it occur? If it is right at the beginning, it is possible your peer hasn't joined the room yet due to not running in the background.

  • I don't think you need parallax if you're using z-elevation.

    But I think the problem is that what you are describing (blurring the upper layers more than the lower objects) just isn't going to look good, or at least what I'm imagining.

    My suggestion would be to not worry about blur at all (You've got an xy problem here). If you want to focus on the lower levels you can simply desaturate (or darken/lighten) the edge highlights as you go up in z-elevation. You can try opacity too, although I think that won't work very well either with stacked objects.

  • What you describe should work, with certain caveats. It would require peers to disconnect from the room and connect to another room per layout, which is manageable. One major disadvantage would be that your hosts would not be able to communicate with each other. You would have to rely on trusting your peers with the data they carry as they switch layouts/signallingrooms/hosts. The "latest" information state for each peer would only be known by the last host they were with and the peer itself, so you might run into persistence issues.

    Magistross's suggested method is how I would attempt it, but you won't be able to take advantage of the built in sync object feature, and messages are not as bandwidth friendly.

    Much of it depends on your specific project's requirements and scope especially in terms of number of peers, persistence, and host authority.

    Note that if your hosts have a method of communicating with a central database, there potentially be huge advantages to using the method you are asking about.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can Force Own Texture in layer properties. This makes it so that effects on that layer are isolated from others.

  • The example project looks fine to me. How did you get this to happen?

  • construct.net/en/make-games/releases

    Check out the New Features and New Additions sections to see if anything interests you.

    You can pretty much do everything you need to make a great game in C2, it just takes more work.

  • You do not have permission to view this post

  • Note that host and peers that are not on the same layout are already desynced. Changing layouts destroys all objects and makes new ones for the new layout, presumably different than the ones from the previous one, so the host and peer will have different objects at different positions.

    Sending messages to update global variables should work fine as Hasan999 describes though.

  • Some experiments I have done recently - dropbox.com/s/m6x32uzqcjlf8sk/VisualLOS.c3p

    Some references -

    redblobgames.com/articles/visibility

    ncase.me/sight-and-light

  • "You can't try and destroy the cards before the peer disconnects, if you want to do that when they disconnect. As you can't preemptively decide they will disconnect and destroy them ahead of time."

    I meant to try these two things to see if they cause a freeze or not.

    Freezes in construct are generally due to endless loops.

    If you try to minimize the project it will help you to identify the cause of the freeze.

  • Looks like I had the wrong approach.

    Attempt 1:

    Anchor canvas to viewport

    Clear canvas

    System scroll to Player 2

    Paste everything to canvas

    System scroll to Player 1 (or scrollto behavior)

    Didn't work.

    Attempt 2:

    Clear canvas

    Move canvas object to player 2

    Paste objects to canvas

    Move canvas to viewport

    Scrollto Player 1 behavior

    Didn't work

    Attempt 3:

    Clear Canvas

    Scrollto Player 1

    Anchor canvas to viewport

    Offset every object by the difference between player 1 and player 2

    Paste to canvas

    Return objects to original position

    Works!

    I can see issues with the timing for my first try as I don't know how the behaviors order in terms of the event sheet stack. I would have hoped the second method would work... If i manually paste on trigger, I can move the canvas object around with the "stamped" image, so I would assume it works similarly within a tick.

    Also opacity changes don't seem to be recorded either.

    + (no conditions)

    -> DrawingCanvas: Clear canvas rgba(0, 0, 0, 0)

    -> Sprite: Set opacity to 100

    -> Sprite: Set position to (-200, 0)

    -> DrawingCanvas: Paste object Sprite without effects

    -> Sprite: Set opacity to 20

    -> Sprite: Set position to (0, 0)

    The canvas "copy" is saved at 20 opacity.

    Should I put it in a bug report? Or working as intended? Ref: dropbox.com/s/gg5kdjvbe4ovsck/splitscreenc3pminimal.c3p

    Edit: Formatting. Line breaks not working?

  • + LocalStorage: On item "easy" exists

    -> LocalStorage: Set item "easy" to best_Easy

  • You won't be able to get expressions from a string such as you have saved in JSON.Get("MyKey"). However, if you have a text already set as "This" & newline & "That", then write the entire string from text.text to your key, it will load properly. You can also save newlines as carriage returns in word processors like word pad, and can be properly get parsed by construct as well (notepad might not work). Basically it depends on how you create or write JSON.Get("MyKey").