oosyrag's Forum Posts

  • Oh! Sorry for the confusion. I was going by the manual entry where it said "If an object is destroyed the same tick that you paste it, it will not be drawn, since drawing happens at the end of the tick."

    I couldn't get it to work the way I imagined in a quick experiment. I'll give it another shot, must have done something wrong.

  • I had an idea to swap multiple canvas objects for each view from an off screen playing area to the viewport every other tick. So you would be seeing what happened one frame in the past.

    Seemed super clunky though, haven't tried it yet.

    The other way that has always worked is to basically render a copy of every object for every player, offset and on their own layer with blending modes to split the screen.

  • Is running typewriter text

    Every X Seconds

    -> Play sound

    Adjust every X seconds as needed.

  • Quick answer would be no.

    Have you tried destroying the cards before the peer disconnects? Have the peer disconnect without destroying the cards? Does either result in a freeze?

    What exactly happens when you say freeze? You mentioned the debugger is still running. Maybe something in your events stop working when there is no peer connected?

    Multiplayer issues are notoriously hard to troubleshoot, and exponentially more so without an example project to work with. Can you replicate the issue with a minimal project?

  • A parabola can describe quite a few final shapes. You mentioned constant speed, so rather than a fixed duration you would have a proportional duration based on distance traveled. Do you care if it swings out to the left or right? How wide do you want your curve? Will the width vary depending the distance traveled as well, or fixed?

    After giving this a shot, the problem is harder than it seems... especially considering the distance traveled is also affected (non linearly) by the shape of the curve, making it difficult to get a fixed speed across all situations as far as lerp and qarp are concerned. Tween also has difficulties when non linear factors come into play. Maybe I can try again with custom movement.

  • Are you using the 'Load image from URL' action for your random sprites? There is a 'On image URL loaded' trigger you can keep track of to determine how many times it fires/how many times total you expect it to fire.

  • Besides organizationally, which is completely up to you and your own workflow, layouts are best used for memory management. If you're going to be using the same set of graphical assets and sprites in all your battles, then there is no performance advantage for using a different layout per battle.

    Actually I'm not completely sure if this applies anymore with the new C3 runtime. The first instance of sprite objects are no longer required to be placed on a layout manually, but I don't know if that has anything to do with the loading of sprites into memory per layout. Someone more familiar with the new runtime please correct me if I'm wrong.

    Global Variables and Global Objects will be useful for any information you need to transfer between layouts. Additionally, the Persist behavior will be useful for when you return to your map layout.

    Families are useful to let you pick many different sprite objects at once. You can use them to simplify your events a lot, but they aren't usually critical.

  • Regarding question 1,

    You're going to have to decide on one or the other. Here is the situation: in any multiplayer game where there is latency, given a moving object, where any person currently is, is not where any other person sees he is.

    So you have to pick. If PlayerA is shooting PlayerB, does PlayerA aim where he sees PlayerB on his own screen (commonly used), or where PlayerB actually is by leading the visible player and shooting at the empty space ahead of what they see depending on their ping. You can't have both at the same time!

    There is a third case that is highly not recommended, where you try to show PlayerA where PlayerB will be X ms in the future based on ping by guessing where PlayerB is going. But if PlayerB actually changed direction, PlayerA wouldn't know until later and PlayerB would teleport on PlayerA's screen. Also you'll still have the problem with PlayerA shooting and expecting to hit where PlayerB wasn't actually was, and then you'll have to decide again to register the hit or not.

    Resources for reading:

    X-Wing: gamasutra.com/view/feature/131781/the_internet_sucks_or_what_i_.php

    Half life: developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization

    Quake: reddit.com/r/QuakeChampions/comments/7iuhlc/tech_talk_rockets_and_lag_compensation_and_some

    Reflex: reddit.com/r/truegaming/comments/2ruqba/advances_in_fps_netcode

    General: gabrielgambetta.com/client-server-game-architecture.html

    This isn't an FPS, but an MMO bullet hell which made some interesting choices regarding lag that are not "standard"

    ROTMG: t-machine.org/index.php/2012/03/28/realm-of-the-mad-god-a-great-game-interesting-monetization

    A Video from GDC a while back

    Halo: gdcvault.com/play/1014345/I-Shot-You-First-Networking

    Last but not least

    construct.net/en/tutorials/multiplayer-tutorial-concepts-579

    Honestly, the Construct manual page is one of the best ones out there. You'll notice all the different developers talk about the same concepts over and over again, and the manual gives a very good summary. Regardless, there is no "simple" way to describe it all, so I recommend just reading over and over again until it makes sense and you can understand it and you won't be a n00b anymore. While the concepts are all the same, each person would present it differently so as you go through the links maybe you'll find one that clicks with you the most.

  • You can also see how max speed was done in this example from a while ago - construct.net/en/forum/construct-3/how-do-i-8/spaceship-movement-130957 (also by r0j0).

    It doesn't use any behaviors, but you can see how it works very clearly,. It would apply very similarly to custom movement's dx and dy.

  • Try both - Use an object to predict your future motion based on your current vector, and have a camera object with a lerp towards that one.

    dropbox.com/s/jkb52blsbte0ckh/Smoothcameraexample.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dropbox.com/s/cdrpv87sm64akpr/canvasexample.c3p

    Example using the drawing canvas plugin to draw the circle, and a timer to control the rate it grows.

  • Are you using the set animation action rather than set frame? Are your animations set up correctly? Speed not 0, correct frames?

  • The basis of a grapple in physics is the revolute joint. Here is an example.

    dropbox.com/s/uujkpeccyq20vvx/Physics-revolutejoint.c3p

    To get it to wrap around solids, the most straightfoward way is to make a chain of revolute joints. Basically you break up the line into many segments, down to 1 pixel each, and make them all connect to each other in order. You can do this with families and instance variables to keep track of each segment to pick the correct ones to make joints with.

  • It depends on how you are going to set it up. If you're syncing an "isMoving" instance boolean variable.

    For all the peers and host:

    + PlayerObject: [X] Is isMoving

    -> PlayerObject: Set animation to "Idle" (play from beginning)

    + PlayerObject: Is isMoving

    -> PlayerObject: Set animation to "Walk" (play from beginning)

    Then all you need is for the host to properly toggle the isMoving variable for each peer when they are moving or not.