oosyrag's Forum Posts

  • Correct. This is the nature of peer to peer networking. Although it's not exactly instant, there is some leeway in reestablishing a connection.

    Depending on the scope of your game and the amount of data required to sync, it is actually possible to recover or migrate hosts. That is a significantly more advanced topic though, and generally speaking it is not worth investing time into.

    You can also look into cloud services like firebase or photon cloud depending on your gameplay requirements.

  • I have tried the official signaling server. The problem is that the official rules for creating rooms do not apply to my current situation (the first one to enter is the host, and the second one to enter is the player). I need to make sure that some accounts must be the host, regardless of the order of entry.

    Don't use the auto join room feature.

    This can simply be done by requesting the room list after logging on (or otherwise authenticating your user by your preferred method. After you get the room list, you can see what rooms have people in them already, or are full. If you have a designated host client, have them enter/create a room that doesn't already exist, while a peer client will join one that does that has space.

    In addition, I also want to ask if I use the turn server for data relay. The principle of connection is that the host sends it to the turn server, and the turn server distributes the massage to everyone, or the turn server is still P2P.

    That's not how WebRTC works. The signalling/turn server only facilitates connections between peers, it does not otherwise handle any data.

    This won't change even if you host your own signalling server. Actually neither of your issues really has to do with the signalling server.

  • Two ways: Record inputs and time, or record absolute position and time.

    Either way, storage would probably be done via an array. For example...

    Every x seconds, push sprite.x to array, set sprite.y to array at (0,1)

    Would populate an array with the sprite position x and y every x seconds. Then save the array, and have your ai move to each position in the array in sequence.

    Alternatively, you would save what the player was inputting at every time instead of the sprite's position

    Depending on your game and how it is set up, either of these approaches could be optimized for further detail.

  • I believe sells a firebase plugin.

    rexrainbow used to have a free plugin for C2, but I don't know if that ever got ported to c3 by someone else, probably not.

    Otherwise, you can also access the firebase API directly through JavaScript, which you have access to in C3. construct.net/en/tutorials/construct-firebase-2163

    You can also use an app wrapper service like Enhance.

  • Eventually with percentages you will get a non even number, with a lot of decimals that won't fit into your text box.

    You can make your text box bigger, or try using floor(number) or round(number) instead to get rid of the decimal value.

  • 5% = 5/100, or 1/20.

    So on button pressed, set health to health+(health/20).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To run your own signalling server, you will need to purchase the signalling server code, then run or rent a server to host it.

    You can purchase it at - scirra.com/store/game-making-tools/multiplayer-signalling-server-161

    If you don't understand how signalling works or how to put one together already without needing to ask on these forums, I HIGHLY recommended using the official signalling service.

  • Haven't looked at your project yet (the filesize is rather large), but some possible issues:

    The sync action only syncs object creation, destruction, and optionally angle and position. Any resizing of the object will need to be manually done on both the host and peer and synced. You can either use consistent events between the host and peer (non host-authoritative) to do so, or put the information in a synced instance variable (host authoritative) and update the values on the host which peers read and adjust the object accordingly.

    Make sure the peer isn't running the spawn function, only the host should create or destroy any synced objects.

  • Have you tried using the WarpRipple effect in effects?

    Frequency 3, Amplitude 1%, Speed 15 seems to get a similar result for me. Settings probably depend on the size of the sprite though for whatever specific look you are going for.

  • From memory, start with a size 0 array:

    Repeat tokencount(sourceData," ") times

    Array Push back on x axis tokenat(sourceData,loopindex," ")

  • That looks great! Didn't realize that effect existed. For how well construct is documented otherwise, the effects documentations are conspicuously missing.

  • Sorry took a bit.

    See if this is what you're looking for.

    dropbox.com/s/uuh8u9a2yn6ndgo/preserveangle.c3p

  • Here's an example, although you have to click twice to get the right position, which may possibly be a somewhat related bug that I'll post a report for. dropbox.com/s/dkmkdrbqaot4g60/canvassize.c3p

    The black bars (letterbox scale), zoomed in (scale outer), or zoomed out (scale inner), depends on your fullscreen scaling mode. These are out of your control, because you cannot control the aspect ratio of the user's window (browser size) or phone screen. You'll just have to design accordingly, to see which mode is most suitable for you.

    construct.net/en/tutorials/supporting-multiple-screen-77

  • When needing to animate tilemap tiles, there are a few options. Creating sprites for just the parts you need animated works, like you said. You can also either layer the tilemaps and cycle through them by toggling visibility, or have the animation frames in the tileset and cycle through the tiles dynamically by events. Third way that may be more efficient if you have a highly dynamic coastline would be to maybe draw it at runtime using the drawing canvas plugin.

    Finally, although I'm just theorycrafting at this point, I feel like you should be able to manage something with a low resolution static sprite in the shape of the coastline with a gradient, scale it, and use the alpha clamp effect to have it shrink and grow.

  • Check to make sure your bullets are not created on the UI layer.