fiaful's Forum Posts

  • no idea?

  • The Solution: if ball > scrollx ..then.. Toggle Host and re-Sync objects.

    Hi Dr.Hasan, thanks for the answer ... but the solution you proposed is wrong for different reasons.

    1. You cannot exchange the host and peer after connection, for technical reasons. Just as you can't change synchronized objects (they are declared before connecting to the signalling server).

    2. The host is the one who has the authoritative version of the game: the whole game (therefore also the physical simulation) happens only on the host. Peers just try to keep up with the best they can.

    3. Surely in some way, taking into account the previous 2 steps, you can still show the view of what happens only on the single players (very simply you could just set the camera). Alternatively you can make a common host and both 2 peer players (but in this way simply double the problem).

    4. Even if you do this you would still have the problem, as you would still see the ball cross the player before he hits it.

    I know what the solution would be, the problem is that, due to the physical engine, I don't think it's feasible.

    The (theoretical) solution consists of:

    a. enable peer input prediction (ok, already done);

    b. send peer inputs to the host (ok, already done);

    c. the host must rewind the peer player to where it was before the lag (feasible);

    d. the host must check the overlap of the ball with the peer player (feasible);

    e. the host must perform the physical simulation taking into account the impact of the ball with the peer player (if any) to the position of the past (I do not think this is feasible);

    f. the host must report the position of the peer player to the present position (feasible).

    the problems are concentrated in the steps d. and e.

    for step d. the host should disable the physics behavior of the peer player, pause (I don't think disabling is correct) the physics behavior for the ball, then start the overlap test;

    for the step e. after the host has verified the overlap, recalculate the physical simulation based on the impact occurred (!), then restart the simulation with the new settings (!), and after a certain period of time (ie after the ball no longer overlaps the player), rehabilitate the physics behavior even for the peer player.

    I believe this is not possible (or at least I don't know how to do it).

    perhaps you can completely ignore the steps d. and e. causing the physical engine to handle the collision with the peer player once it is brought back ... I have not tried, but I think you would get some unreal results from the physical simulation (for example, the player, moved backwards, could launch the ball because it moved quickly towards it).

    the concepts are clear to me, my problem is to put together the physics engine with the multiplayer engine ...

    I hope for some help in this regard, or in an alternative solution that makes sense (taking into consideration that I need to use the physical engine).

    thank you all

  • Hi everyone...

    I'm trying to make a small multiplayer game. I state that the concepts are all quite clear to me, and this is the fourth multiplayer game I make ...

    different, compared to the others, this uses physics ... and is giving me a bit of trouble that I can't solve ...

    the game is simple: it is a kind of volleyball, two players (one host and the other peer) bounce the ball with each other. the ball has behavior physics. the two players have behavior platform for movement.

    the players and the ball are the synchronized objects, the player has the input values ​​of the client set on the inputs (bit by bit for the left, right and jump controls).

    peer behaviors are not disabled because I use peer input prediction enable.

    given this, here is the problem: the host has the authoritative version of the game, and on the host everything works perfectly, while on the peer, although the movement takes place smoothly due to the input prediction, the collision with the ball by the behavior physics, occurs with lag, effectively making the game unplayable.

    I would like to use lag compensation, but I don't know how to implement it with the physical ball ... do you have any suggestions?

    I am attaching the capx so you can do some testing if you want ... I'm going crazy without finding a solution ...

    P.S. behavior physics I can't remove (I need to experiment to do another, more complex project, based on physics)

    thank you all for your help

    here the capx: drive.google.com/open

    you can test, run it in two different browser windows/tabs

    also Ashley some ideas?

    (sorry for cross-post in Construct 2 > General Discussion also)

  • Hi everyone...

    I'm trying to make a small multiplayer game. I state that the concepts are all quite clear to me, and this is the fourth multiplayer game I make ...

    different, compared to the others, this uses physics ... and is giving me a bit of trouble that I can't solve ...

    the game is simple: it is a kind of volleyball, two players (one host and the other peer) bounce the ball with each other. the ball has behavior physics. the two players have behavior platform for movement.

    the players and the ball are the synchronized objects, the player has the input values ​​of the client set on the inputs (bit by bit for the left, right and jump controls).

    peer behaviors are not disabled because I use peer input prediction enable.

    given this, here is the problem: the host has the authoritative version of the game, and on the host everything works perfectly, while on the peer, although the movement takes place smoothly due to the input prediction, the collision with the ball by the behavior physics, occurs with lag, effectively making the game unplayable.

    I would like to use lag compensation, but I don't know how to implement it with the physical ball ... do you have any suggestions?

    I am attaching the capx so you can do some testing if you want ... I'm going crazy without finding a solution ...

    P.S. behavior physics I can't remove (I need to experiment to do another, more complex project, based on physics)

    thank you all for your help

    here the capx: drive.google.com/open

    you can test, run it in two different browser windows/tabs

    also Ashley some ideas?

  • it works perfectly! thank you!

  • Sorry... what topic? I've the identical problem of the image... (pick all tiles overlapped by sprite)... how can I resolve?

    Thanks in advance

  • in the meantime I would like to thank all those who gave me feedback, here on the forum and privately, and all those who started following me ...

    stay tuned because in a few days I will release a really huge plugin (which has nothing to do with audio) ... I don't anticipate anything ... it will be a surprise, I think, pleasing to many

  • Hi, RexRainbow adapted the plugin

    https://www.construct.net/en/forum/extending-construct-2/work-in-progress-addons-30/plugin-tone-js-117690

    But I do not know what state it is in, I think it has a bug and it does not have a C3 version.

    Well, that's what I know.

    Hi, I didn't know the toneJS and I didn't know the existence of such a plugin (nor can I tell you in what state it is) ...

    but other forum users have privately asked me to add something to the addon ... maybe, on that occasion, I could take a look, and see if I can integrate some of its features!

    thanks for the tip!

  • I had the privilege to discuss with fiaful during the plugin creation and that's something I really wished C2 had integrated since the beginning.

    pleasure and honor were mine ;)

    I am old school and I am sure this plugin will help everyone not only with their nostalgia, but also to shrink the size of their games.

    yes it is true ... then with regard to nostalgia ... we are put really bad! :)

    I usually try to avoid as much as I can plugin, but my rule doesn't apply for this. Too cool and useful!

    thank you very much!

    I am Italian and I have read the documentation, very well detailed and professional. I am sure when the English documentation will come out, your plugin will be very popular :-)

    now I'm struggling with another really huge plugin ... but as soon as this is over I plan to translate the BandChiptune documentation into English ... have a little more patience ...

    Thank you very much for BandChiptune!

    I have downloaded and happily donated to support you.

    Thank you! it's really very important for me ... thanks again

  • Well, I said I would never use ad-dons but ......... doood!

    I have been wishing for something like this for a long time...

    well ... what to say ... thanks! I'm really very happy to hear you say it!

  • Hello, some questions, what instruments are available? I do not see anything about that.

    Hello, at the moment only the "chip" instruments you see (ie the waveforms and noises ... at the time, with 8bit audio, it was difficult to talk about "instruments")

    Can you convert a MIDI file to use it with the plugin ?.

    as I answered in the previous comment, at the moment I'm not able because I don't know the MIDI format ... besides I see another problem to play MIDI ... midi needs sound fonts, which often occupy more than the single pieces in ogg or m4a ... making it unwise to use

    Thanks for share this.

    Thank you for comment!

    For example, toneJS uses some more instruments.

    I don't know toneJS ... thanks for letting me know, I'll see if I can integrate it into my addon or write a new one that uses it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Hello!

    i like your new plugin alot.

    I'm really very happy to hear you say it

    I wish there was an eazy way to convert from other formats to Bandchip format. I must dig deeper into that.

    Well, theoretically yes, probably the MIDI format is the one that comes closest, as the plugin handles notes and pauses like a musical score, and as far as I know, MIDI should do the same ...

    Any chance to see midi input for Bandchip?

    I don't believe by myself, and I don't believe for the moment ...

    but simply because I don't know the MIDI format ... I should first study it :)

    i would love to connect to you via discord.

    I have always had problems with discord unfortunately ... but I can give you my e-mail: fiaful(at)hotmail(dot)com

  • Hi there!

    BandChiptune reproduces sounds by calculating them in real time, just as computers and consoles used to do, saving huge amounts of bytes in the storage space (a BandChiptune audio will weigh only a few kilobytes).

    To meet any need of the developer, a BandChiptune object can reproduce the audio:

    1. indicated note by note, pause by pause, instrument by instrument, through code blocks directly in Construct 2 or 3;
    2. provided in an external file in JSON format, then loaded via AJAX;
    3. indicated through a string containing several tokens (for note lengths, pauses, notes to play, ligaments, volumes, etc.);

    For more information download and read the attached documentation and see the screenshots on the official project page.

    https://fiaful.itch.io/bandchiptune-construct-2-plugin-and-sample

  • Hi there!

    BandChiptune reproduces sounds by calculating them in real time, just as computers and consoles used to do, saving huge amounts of bytes in the storage space (a BandChiptune audio will weigh only a few kilobytes).

    To meet any need of the developer, a BandChiptune object can reproduce the audio:

    1. indicated note by note, pause by pause, instrument by instrument, through code blocks directly in Construct 2 or 3;
    2. provided in an external file in JSON format, then loaded via AJAX;
    3. indicated through a string containing several tokens (for note lengths, pauses, notes to play, ligaments, volumes, etc.);

    For more information download and read the attached documentation and see the screenshots on the official project page.

    https://fiaful.itch.io/bandchiptune-construct-2-plugin-and-sample

  • Hi everyone,

    I have a problem that I can't solve, and it's driving me crazy ...

    I made an addon (of type plugin) for construct 2 and I wrote an example project that uses it ... so far everything is ok, the plugin and the application work correctly.

    I then created the same addon for construct 3 ... but if I try to open the example project of the construct 2 version (so the capx), construct 3 tells me:

    "Failed to open project. Check it is a valid Construct 2 single-file (.capx) project."

    while in developer console the message I get is the following:

    main.js: 178 [Project] Exception opening: Error: wrong plugin type

         at n.ǃQkG (main.js: 82)

         at Function.ǃkst (main.js: 82)

         at Object.ǃQNj (main.js: 82)

         at n (main.js: 2)

         at t (main.js: 2)

    my plugin is global without user interface (like array practically) ...

    what can i check to fix it?

    thanks to anyone who can help me