DeltaStarStudios's Recent Forum Activity

  • I want to

    1. host creates a picture on drawing Canvas, then sends drawingCanvas.asJSON data to peer via multiplayer message

    3. peer recieves message and sets drawingCanvas picture/image from asJSON and is able to "see" the picture created by the host.

    Is that possible?

    I've tried it, but the peer's drawing canvas doesn't load any data

  • it seems to me that the snapshot is being loaded to large

  • I appreciate the response.

    So, what I'm hearing is...

    Since a pc users window is larger, the fix is to... how do I avoid that unintentional stretch?

  • If you ran the build with minimum script or advanced minimization, that will mess up your xcode as well.

    If you did, try rebuilding without compressing pics or minifying script.

  • edit 2: workaround was limited.

    If host is mobile, and the peer is on PC, the draw canvas enlarges x4.

    such a weird bug...

    ----

    edit 1: found a workaround

    on start of layout, detect device, when on mobile adjust variable sizes.

    In this case, set drawcanvas size to 2x viewport size.

    I'll need to add more "case by case" code now to adjust.

    For example, if host is PC or mobile then...

    if peer is pc or mobile then....

    the host needs to send a message indicating whether they are host or not, and PC peers then adjust their draw canvas accordingly.

    -----------------

    original problem

    I'm trying to think of the best way to word this, as I can't post example files.

    Basically, when two PC's play my game together, the drawcanvas behavior works fine.

    However, when a mobile user and a PC play together the drawCanvas plugin starts acting up.

    When the mobile hosts, the PC peer's canvas grows like x4 the size, effectively magnifying the drawing instead of displaying is correctly.

    Thoughts??

    Edit

    Important to note: the drawCanvas's are not synced at all. So I'm really confused when the same code, on the same device (PC) will display data so differently depending on whether the host is a PC user or a Mobile user.

    Tagged:

  • Hello,

    Working on a multiplayer project.

    Peers can connect.

    Host can send messages.

    But...

    When I attempt to send array data (large array.... sized 360 X 640 X 3)

    The message refuses to send.

    Are there limits to the size of an array that can be sent?

    Attaching the array to the message makes the event refuse to trigger.

    Thoughts?

    Edit

    I was able to get the array to send by reducing it down to (250 X 250, 1)

    However, the peer isn't loading the data

    Host > send message Array.AsJson

    Peer > on message received Load multiplayer.message

    Doesn't work....

    Edit

    Reducing the array size to 100x100x1 allows the peer to load the data

  • You do not have permission to view this post

  • Hi,

    I am wondering if it's possible to do this.

    Host uploads a custom image via FileChooser

    This sprite is then synced to the peers in the game so they can see the custom file as well.

    I tried coding it, but it only shows up on the hosts side.

    Any ideas on how to implement this idea?

    An example of what this would look like in game:

    Host is playing my pong game.

    They want to replace the pong paddle with an image of their face.

    They upload an image via FileChooser

    This new image would then be shared to the peer

    So, in this example, anyone joining my pong room instance would see my stupid face as the pong paddles, instead of the default pong sprite.

  • WOW! THANK YOU!

    You just blew my mind with the two nested loops.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for you help! Figured it out :)

  • Would you mind trying?

    When I snapshot the canvas with an object preploaded into the engine, it works fine.

    When I use file Chooser to upload a file first, then wait, as you said, the snapshot comes up blank.

    Project link:

    gofile.io/d/4P3jRJ

    code

  • I tested it with an object already in game, and it works. it seems paste does not work with images uploaded from the user via file chooser....

    What to do?

DeltaStarStudios's avatar

DeltaStarStudios

Member since 18 Jul, 2016

None one is following DeltaStarStudios yet!

Connect with DeltaStarStudios

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies