lennaert's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • That is precisely what I have done but the stringvariable ends up simply being empty..

    Then either your request is incorrect, or your request does not get you anything.

    How do you know stringVariable is empty ? Did you check the debugger ?

  • Okay. So, to have it written as straightfoward as possible, for each room there are 1 host and X peers, right ?

    Yes

    Ah ! Another question while I'm here : the multiplayer objet can sync instances positions and variables.

    So, what's the best way to synchronize attributes like visibility ?

    Send a broadcast message to the peers, the peer receives it and changes the instance visibility ?

    Or just to add an instance variable "visibility" on the object which will synchronize automatically, and add a global event (availble for the host and peers) like "if sprite visibility = true -> sprite ; set visible" ?

    For those kind of actions I often just send a message to the peer.

    send to peer xxxx, tag "setVisible" message = "no" (or yes)

    Peer on received message "setVisible"

    sub compare 2 values: Multiplayer.Message = "yes" , action set visible

    sub compare 2 values: Multiplayer.Message = "no" , action set invisible

  • thank you unfortunately, i a, aware of all that - and i don't see any way to tag an Ajax request in C2.

    https://www.scirra.com/manual/107/ajax.

    I'm just wondering what is the simplest way to get Ajax.Lastdata into a string?

    Did you take your time to read this ?

    Read the first thing that comes after "How to make a request".

    In your request, I believe its the last entry/option ... there you can add a TAG name.

    The info I gave you is what you are asking for.

  • 1) no, a peer is a client, connected to other clients. The c2 host is considered the "server" side of things.

    2) If you are thinking about RPG like mechanics, just store your player info somewhere, together with whatever he or she unlocked.

  • Ajax.LastData is generally a textual string.

    If you have a Ajax request tagged: "getPage"

    On Ajax request done "getPage" set StringVariable = Ajax.Lastdata

    The Ajax.LastData needs to be called in the On ajax request done trigger. (or as a sub event)

  • no.

    The first client to "join" a room, is not 'just' joining it, he creates the actual room on the signalling server , then joins it. and instantly becomes "Host"

    Clients that follow join the room and become "Peers".

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies