Madguy's Recent Forum Activity

  • I was curious about this as well. There was a post awhile back that indicated the issue was being dealt with in some way.

    Ashley is this something that's still in the works?

  • I like Music For Programming a lot.

    "A series of mixes intended for listening while programming to aid concentration and increase productivity"

  • [quote:26g0wbd7]As far as I can see from the ghostshooter example the lag compensation works for instant hit bullets/lasers - but does this work for bullets which fly a while before hitting anything? I dont know if it works or how to set it up. :/

    Here's a simple way to do it: If a bullet is on the screen, do a collision check between the bullet and the lag-compensated version of the object on every tick. Alternatively, you could perform the check only if the bullet is already within a certain distance of the object.

    As for why certain objects aren't appearing, it's hard for me to say at the moment-- I haven't been attempting to sync objects that are quick to appear and disappear (lasers, explosions, bullets, etc.). Did you set up an "On Created" event for them? Seems like you might be able to fix the issue with some actions in an event like that, or at least print out some text to ensure that the object is actually getting created in the first place.

  • Bl4ckSh33p I'm also using non-hitscan bullets, but I've not fully decided how I want it to work yet. I'm considering having them be completely separate, non-synced entities on each player's screen, and only dealing with collisions on the host's screen (so that there's no delay when the player hits the Fire button, I think that would kind of suck). I think in both my case and the case that you described, having lag compensation would be ideal, since there will always be a delay getting the information to the host after the peer presses the Fire button.

    There are probably some halfway-decent workarounds. Maybe if each moving object pushed their current position into an array every tick, and then we used a peer's latency (PeerLatency expression) to determine how far back in the array we should look to find where the collision check should occur. I haven't tried that and it might work really crappy, just throwing it out there.

  • Oh fantastic! I was not aware that this plugin existed-- that's exactly what I was looking for! Thanks so much!

  • As of right now, I haven't found a workaround for this particular issue. It's pretty annoying. You've basically got two options here to produce this sort of minimap-- place a bunch of tiny sprites on the screen, or use a tilemap. And both methods are memory hogs. I'm currently using a Metroid-style minimap, which is a lot more efficient, but also lacks the level of detail I was hoping to have.

    It would be great if Construct 2 had some sort of way to just draw pixels to the screen, or create a custom sprite on the fly, or make modifications to an existing sprite.

  • Seconding this. Watching high-speed bullets fly through walls on older systems is something I wish could be avoided :p

  • Indeed I have-- I'm actually about 1.5 weeks into grafting multiplayer into my game <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> Lag compensation is covered here:

    https://www.scirra.com/tutorials/915/mu ... ame/page-7

    Unfortunately I think I've hit a snag. To the best of my understanding, LagCompensate is only able to deal with objects associated with peers. Which is fine if you're doing a game where the player characters are the only moving objects with collision detection, but not so great if you want to have, for example, fast-moving AI-controlled enemies.

  • Ashley Regarding the previous bug I posted (https://www.scirra.com/forum/associate-object-with-peer-does-not-work-with-families_t111829)-- Apologies, I may have written the .capx incorrectly. However, the bug still stands when it's written differently.

    Problem Description

    The 'Associate Object with Peer' action only works with individual objects, and not with instances of a Family.

    Attach a Capx

    https://www.scirra.com/forum/download/file.php?mode=view&id=4445

    Description of Capx

    The CAPX is exactly the same as the Multiplayer Real-Time Game tutorial, with a few modifications in Game Events. I've removed all of the "Associate Object with Peer" statements, and created a function that does the following (search for the comment "MODIFICATION":

    Every 5 Seconds

    For Each PeerFamily

    Peer - Pick instance with UID PeerFamily.UID

    -> Associate PeerFamily with Peer.peerid

    This will cause the bug to occur. However, the bug does NOT occur if I swap out the Action for the following:

    -> Associate Peer with Peer.peerid

    Using this method works completely fine. All I'm doing differently is Associating the Peer instead of PeerFamily.

    Steps to Reproduce Bug

    • Step 1 - Run the game from the Login screen as you would normally to create a Host.
    • Step 2 - Open a second game window to create a Peer.
    • Step 3 - Wait for the logs to appear in both windows "Associated <Peer.uid> with ...".
    • Step 4 - Close the Peer window.

    Observed Result

    In the Host window, the Peer object is not destroyed, indicating that the association did not take place.

    Expected Result

    Object associated with Peer should be destroyed.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES) Operating System and Service Pack ____ Windows 8 64-Bit ____ Construct 2 Version ID r176
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    The 'Associate Object with Peer' action only works with individual objects, and not with instances of a Family.

    Attach a Capx

    https://www.scirra.com/forum/download/file.php?id=4413

    Description of Capx

    The CAPX is exactly the same as the Multiplayer Real-Time Game tutorial, with a few modifications in Game Events (do a search for "MODIFICATION" to see them all). 'Associate Object with Peer' now associates with an instance of 'PeerFamily' instead of 'Peer'. 'PeerFamily' is a simple family that I created that has only one object: 'Peer'.

    Steps to Reproduce Bug

    • Step 1 - Run the game from the Login screen as you would normally to create a Host.
    • Step 2 - Open a second game window to create a Peer.
    • Step 3 - Close the Peer window.

    Observed Result

    In the Host window, the Peer object is not destroyed, indicating that the association did not take place.

    Expected Result

    Object associated with Peer should be destroyed.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES) Operating System and Service Pack ____ Windows 8 64-Bit ____ Construct 2 Version ID r175
  • I’m currently attempting to add multiplayer to my game, which has a lot of NPC bots/AI agents/whatever you want to call them. The agents use the same object type as the players-- anything a player can do, an AI Agent can do, which includes moving in all directions.

    From what I can gather, LagCompensateX and Y return the position coordinates for objects that were used in the “Associate object with peer” command. Does this mean that lag compensation would not be possible with non-player objects such as my AI Agents? Is there something I’m missing here? (I'm still fairly new to using the multiplayer plugin)

  • Nope, just once. Having the whole 160x160 tilemap appearing in my GUI layer is enough to cause the performance issue.

Madguy's avatar

Madguy

Member since 6 Jan, 2013

None one is following Madguy yet!

Connect with Madguy

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies