Everade's Forum Posts

  • Rewinding Time:

    https://www.scirra.com/tutorials/892/mu ... ge-8#h2a18

    Local Input Prediction:

    https://www.scirra.com/tutorials/892/mu ... ge-7#h2a15

    I can only recommend reading through the entire tutorial.

    But using the Rewinding Time will ensure that the HOST is able to recalculate what the player actually saw, and handle accordingly.

    Just think about it in a Shooter Game like Battlefield for instance.

    What would you think if you shot someone in the head, but the server didn't recognize it?

    That would kill the entire fun.

    With rewinding the time, the server can recalculate the actual position of where the enemy was standing from your standpoint when you triggered the shot.

    Otherwise the Host will think, the enemy was already behind the wall and you shot into the void.

    With local input prediction you can ensure that the players input will be immediatly shown on their screen.

    Even though the server did not even get your input as of yet.

    As soon as the server recieved your input, it will sync the information back to the player, and in case the prediction was wrong, it will do some small corrections to get you back in place.

    Otherwise, if you only let the players move as soon as the server responded, it will feel very very laggy for the players.

    For a real-time multiplayer game.

    It is KEY, to send really ONLY required information.

    AND the information sent must be set as SMALL AS POSSIBLE.

    More details at the bottom.

    What do we want to sync?

    And which ones need to be fast?

    - NO client side prediction for deaths

    Because if we blow up a player and then realize it was mis-prediction, we would have to bring it back together.

    This would look kinda weird!

    Basic Information

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

    High (double, 8 bytes):

    a double-precision floating-point number that can store numbers without affecting their precision.

    It has about 15-17 significant digits of precision. However it takes 8 bytes to store a single number,

    which can end up increasing bandwidth requirements significantly.

    In practice this is unlikely to be a necessary choice.

    Normal (float, 4 bytes):

    a single-precision floating-point number that can store fractional numbers with about 6-9

    significant digits of precision. This means some numbers will be rounded to fewer significant digits.

    However it is usually far more practical than a double, since it only takes half as many

    bytes and digits beyond the first 6 are usually unimportant

    (e.g. 0.333333 is close enough to 0.333333333333333 for practical purposes).

    Low (int16, 2 bytes):

    a signed 16-bit integer that can only store whole numbers in the range -32768 to 32767.

    Very low (uint8, 1 byte):

    an unsigned 8-bit integer that can only store whole numbers in the range 0 to 255.

    To minimise bandwidth, it is important to choose the lowest precision possible that will

    not seriously affect gameplay. For example X and Y positions can often use low (int16) precision.

    As long as the layout is smaller than 32767x32767 (which is very large), and sub-pixel positions

    are not important to gameplay (since this will round off any fractional value), it is perfectly

    sufficient and uses four times less bandwidth than a double.

    For example:

    If your total of all synced data is 32bytes:

    2 players = 32 x 2 x 2 = 128 bytes per update x tickrate 60 = 0,06 Mb/s (Required Upload Rate of Host)

    4 players = 32 x 4 x 4 = 512 bytes per update x tickrate 60 = 0.25 Mb/s (Required Upload Rate of Host)

    Even though the player count increases linearly, the bandwidth requirement increases proportional

    to the square.

  • It depends on what you're willing to achieve.

    For a turn-based online game, having a high latency wouldn't be an issue at all.

    For fast paced action it's important to keep synced information as slim as possible.

    In the end, peer to peer can be a good choice, depending on design of your game.

    I've done several local-tests, and never had any real lag issues.

    It's important that you don't make any mistakes with trying to sync information which you've not properly set.

    Doing so can cause major lag problems. It will look as if the "internet connection" is terrible.

    For a 1vs1 fighter game it would be important to create a proper Host-Side check which calculates "back in time" where exactly the player was staying at the time he punched. That way you can prevent issues that the player sees what actually happens. Otherwise the player might punch the opponent, the host however thinks that the opponent was too far away, with that does not count the hit.

    Ashley made some good examples in your examples folder of construct 2. You should also checkout his official tutorials.

    If you tech yourself the multiplayer features, i think you should be able to get it done right.

    But i can only recommend to read the tutorials entirely through.

    Alternatives are not easy and require more knowlegde.

    Construct 2 does not offer a Dedicated Host feature. So peer to peer is the only official solution available.

    Unless you use a workaround by running the game as HOST on a dedicated server and leave it nonstop running/online.

  • Sony and Microsoft are heading more and more towards Indie Devs.

    Since Construct2 is a great tool for designers (without programming skills), i think it's a great opportunity for Microsoft to get their hands on some very unique Indie Games.

    And of course for us, to reach out to a much broader and great audience!

    I would love to have access to:

    Online Multiplayer

    Achievements

    Cloud Saving

  • I'm also working on a bigger project using it. I hope it's still in C3 as it will take some years to finish it.

    And no problem, i'm happy that i was able to help.

  • Installed a SSL certificate but for some reason i can't connect.

    I will just leave the current running signalling server online.

    It seems a few people are using it already, so i guess it's enough for now

  • Someone just connected.

    And omg sorry i posted the wrong IP xD i forgot 2 digits

    corrected it now!

    But i'm setting up a SSL certificate right now, i will keep you posted.

  • tonypond

    It works for me, just tested it.

    Did you enter the correct IP?

    The problem might be that i'm not using SSL

    It states:

    // SSL configuration. Use of SSL is strongly recommended. Due to some firewalls, routers or

    // NAT devices in use on the Internet, insecure WebSocket connections may not be able to connect

    // where a secure WebSocket connection can. Encryption prevents buggy packet-inspecting

    // middleboxes from meddling with the traffic on the assumption port 80 is HTTP web traffic.

    and

    Choosing a

    // non-standard port may cause some firewalls, routers or NAT devices to block the connection.

    The problem is that i can't offer you any of it.

    Because i'm running other services on this server which would interfere and i don't have a SSL certificate

    Letme check, maybe i can get a SSL certificate.

    I'm on it.

  • dannykln

    jasmattkrz

    tonypond

    I've setup a Signal Server for you guys.

    Feel free to use it for now.

    It's running on a dedicated server in Europe/Germany with a 60Gbit/s backbone.

    Set Connect to signalling server inside your project event to:

    "ws://92.51.171.10:12475"

    Please note that it's not running as SSL nor on standard-port 80

    Some player might have connection issues. But i still hope i was able to help you guys.

    Have fun

  • Damnit, just wanted to test some major changes xD

    I think i should setup my own signalling server since i bought one already.

    • Post link icon

    That they split C3 up into two major versions: Game & Enterprise. C3:Game would be focused on canvas-based JavaScript abstraction (their previous idea of C3), while C3:Enterprise would be focused on non-canvas JavaScript abstraction. The Enterprise version would contain things like site formatting, tables, authentication, database access, caching, among other things. They would also be able to do C3:Ultimate, which would contain both Game & Enterprise versions.

    Someone's summoning bloody fingertips right there xD

    Nevertheless, i hope it's going to blow us away. Or the big secret might push an overhype as usual.

    Which creates major disappointment throughout the community.

    Whatever...

    I'm looking forward to it.

    The most important thing is, that it supports C2 project backwards compatibility.

    So we can work on longer projects while knowing that we can continue our work using the new mighty C3.

    • Post link icon

    Would still be great to hear any news about it (no details about features or something like that).

    But teasers?!

    Or aprox. release date (6 months, 1 year, 2 years, 5 years...)

    Or aprox. release date for alpha / beta so we can help to mold the outcome with actual feedback.

    Something to look forward to.

    I have subscribed by mail to the news on day 1.

    Yet haven't recieved even one mail yet.

  • The way you should design your multiplayer game shall always be to send the tiniest amount of data possible.

    Syncing the position of all Players is also normal.

    System ¦ On start of layout -
    -- Multiplayer ¦ Sync PlayerObject (with Position only, precision Low (int16, 2bytes) at Normal bandwith (unpredictable)[/code:1pv07suh]
    
    Please note that you still require a basic Multiplayer Setup.
    To connect everyone with each other and associate each Player Object with a Multiplayer.PeerID
    
    Here are the basics about Multiplayer and the Plugin:
    [url=https://www.scirra.com/tutorials/892/multiplayer-tutorial-1-concepts/]https://www.scirra.com/tutorials/892/mu ... -concepts/[/url]
    
    Here's a Tutorial for real-time multiplayer games
    [url=https://www.scirra.com/tutorials/915/multiplayer-tutorial-3-real-time-game/page-1]https://www.scirra.com/tutorials/915/mu ... ame/page-1[/url]
    
    [i]Checkout the Multiplayer example .capx files inside your Construct 2 installation folder.
    There are multiple ones and should help you to understand how everything works.[/i]
    [b]Construct 2/examples[/b]
    
    In a normal Multiplayer Setup you usualy have a 
    HOST - Moves players, Shoots for them, Tells everyone what they're actually doing like Player Position and so on.
    PEERS - Recieves Data from HOST and displays what's going on. Sends INPUT only to host (Mouse Clicks, Keyboard Strokes)
  • aquadijoib

    I'm using the AddLog for Chat only, as used in the multiplayer example from Ashley.

    It works just fine.

    But i've never tested it to send anything else.

  • troublesum

    The problem with your code is, that it's not really well synced.

    It's always pretty off and then resyncs the position, so you see other players warping/bugging around like crazy.

    You notice that already when normally moving, but it becomes much worse if the players is hitting multiple directions at the same time, like jumping to the right and mid air to start pressing left while still pressing right.

    So other players will see you still moving to the right until it's synced which then warps you a long way to the left.

    Or by pressing left and right at the same time, the peer starts twitching.

    That's far from perfect, the official behaviour with InputPrediction works way better for me.

    The only positive thing i've noticed as slight improvements on the latency.

    Still great to see another aproach though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes it's absolutely possible.

    Isometric however isn't easy to work with.

    But rex_zSorter Plugin helps you to do the layer ordering automaticaly.

    So you will be able to freely move around behind, and in front of the table and it will look correct.

    Here:

    http://c2rexplugins.weebly.com/rex_zsorter.html

    Pathfinding within an isometric environment works as well out of the box.

    Everything you ask for is possible.

    But it's not going to be easy.