lennaert's Forum Posts

  • The weaknesses of having a user be the host and not a dedicated server

    It is in the approach of the multiplayer plugin.

    It is based on a scenario where the host is one of the players.

    Eliminating the need of a server.

    This has has the obvious upside.

    The downside is that it is not the approach most gamers would expect, and those generally start out applying methods based on an incorrect idea of the expected game mechanic.

    One really needs to envision the steps of: (simplistic)

    Host wants to move

    The host simply moves his object and its movement is synched in a broadcasting like method, telling all the peers where the host object needs to go.

    Peers wants to move

    In most synched scenarios, the peer needs to tell the host where it wants to move, the host then move the object on the host game, and it broadcasts it to all the peers, including the peer wanting to move.

    Peer forced moving:

    When the peer wants to optimize the positioning of its object; while sending the movement to the host, the peer can also move its synched object in the direction it has told the host it wanted to move. This forces it in a direction, closer to the next synched position the peer will receive for its own movement, potentially increasing more smoothness on the moving.

  • > Can you not download the license from your account here on scirra and try that ?

    >

    > I am not to sure steam account holders have that, but I can download and import my license from: Scirra store >> bottom left, your downloads, then in this list is my scirra license, which I can download.

    >

    Steam licenses are NOT compatible with standard licenses, which means the steam license cannot be downloaded from scirra, and vice versa.

    Thanks for clearing that up ^_^

    I was under the impression the only thing that was different with a steam account was the way construct was/is installed.

  • capx

    here is one way

  • Can you not download the license from your account here on scirra and try that ?

    I am not to sure steam account holders have that, but I can download and import my license from: Scirra store >> bottom left, your downloads, then in this list is my scirra license, which I can download.

  • You could try "Push out solid".

    Rex has it in one of his plugins, and there is also a version in the custom movement behavior.

  • The text object you're trying to show the string in is probably not big enough. The string variable is probably being set correctly.

    Did you take your time to read this ?

    I'm testing AJAX for a new project.

    When I import a simple string from a project file and use a Text Box and set TextBox.text to AJAX.LastData, it works fine.

    If I use a string variable, and say StringVariable = AJAX.LastData, the string ends up blank.

    Sorry Ashley, could not resist

    edit: it was solved already though

  • It sounds like you want to determine position on the peer side on an object synchronized from the Host. that will not work.

    The host needs to adjust the locations/spawn synched objects on locations, and they will appear so on the peer side on the location determined by the host. The peer can send commands to the host where he needs to move/create them though.

  • ...the only limit to complexity is in you...

    That is pretty catchy, and very very true.

  • Yes it could definitely support that; performance wise, most of it will depend on the amount of sprites and their sizes. (and yes obviously hardware too)

  • That is basically the same solution as with loading screen, but you use a black layer instead of loading screen sprite in it. However I haven't tried lerping the opacity. I need to check it out . Thanks for sharing!

    Demo

    capx

    With a bit of optimization in mind relating to the lerping.

    I set a delay at the start of layout, can be removed or adjusted to fit purpose.

  • Don't get me wrong, the loading screen you mention will likely work, but it is far from optimal.

    Most of the frame drops happen after the load, also due to objects initializing their states, where behaviors obviously require more performance.

    Not to mention it taking longer to save/load the more objects your layouts has, which also requires a sophisticated loader mechanism to make it viable for the game matriax mentions.

    The key is layouts with not to many objects on them, and careful with addressing them all. (the objects)

    And switching between layouts smoothly can be done as easily as have a global black none transparent layer on top, lerping its opacity to 100% before switching to the next layout, which lerps the black layer back to 0% on layout start.

  • u can make a loading screen that shows up when going from layout to another, i think this is the only way, or maybe u can save all the object in the layout to the local storage or webstorage, example: So when the layout go to (layout2) then returns to layout 1 the object will be saved and ready for loading quickly

    This is not going to work as you think when dealing with lots of objects, especially more so if lots of objects have behaviors.

    There isn't a way to preload it like you're asking, but I have a fade in/out to black to hide and smooth out the transition.

    This is by far one of the best approaches.

    I call it camouflage

  • I had an idea of expanding my RPG into an MMO. Before I even consider the Multiplayer feature, what are it's limitations? Could I restrict users to 1,000 player rooms? Could I treat each map as it's own "room" that the user would need to connect to? Is there support for using a professional server host or will I be limited to users being the hosts and relying on the Scirra ping server? Is the Multiplayer feature expandable through Javascript or Plugins?

    Thank You,

    There is a max of 256 WebRTC connections in your browser.

    You could indeed make a map a room, and have players connect to that.

    I have been working on a MMO game, where buildings and locations are rooms, that works perfectly fine once you get around the issue of "when the host leaves".

    Scirra offers it's own signalling server for a fairly low price in the scirra store, which you do require to host on your own VPS/server.

    Scirra's signalling server has a slightly higher chance of incorrect connections, but its perfectly fine for development stages.

    Just keep in mind when debugging, that if sometimes out of the blue things are totally not working as they should .... RELOAD the game and try again, before you adjust lots of things (massive time saver right there)

    Do not use multiplayer for big games.

    use socket.io plugin and nodejs server and then you can do anything you want

    Why not ?

    Socket.io is far more susceptible to lag and packet sniffers.

  • Yes they are possible.

    But no there is not "one" (as in singular) document/tutorial that covers those topics at once, seeing as the techniques used for similar mechanics are quite diverse.

    To keep it simple, just try and use the c2 multiplayer to create the multiplayer aspect.

    And use Ajax, or as Jayderyu mentions, google play services, to store data.

    There are a many paths to rome, you just need to find a path that suits your envisioned gameplay.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Less synchronizing.

    Depending on how you synchronize it, the state gets transferred between 10 and 30 times per second using synchronization methods, which would be a massive overhead on the bandwidth compared to just using a single transmitted command. Less overhead, less chance of lag.