oosyrag's Forum Posts

  • Sorry don't have an answer off the top of my head. I'll experiment a bit when I get the chance to see if there is anything that can be done.

  • Sometimes, it pays off to not be too strict about authoritative host when certain requirements need to be met. Bullet spread is definitely a classic problem for real time multiplayer shooters. There are many approaches, for different situations.

    1. Fudge the local visual. Example - Counter strike - the bullet holes a player sees doesn't necessarily mean that's where the server decided the bullet actually went, even if they have the same constraints. It is an illusion, but doesn't necessarily affect game play significantly. For a third person view like yours, this works especially well if you have an "accuracy" type system as well, where a bullet passing through a sprite has a percent chance to do damage or "hit". Running with Rifles is a good example. If it is known the enemy has a chance to not get hurt even if it looks like they get hit, they will be more accepting of fudging done due to mismatching host/client visuals.

    2. Use a seeded random. A possibility, but not recommended with something as numerous as bullets across multiple peers.... Keeping the order synced sounds like a nightmare to me, but I haven't tried it so I might be wrong.

    3. Best for slower projectiles - Have the local input prediction fire off a bullet sprite with 0 angle, and after it receives the actual angle from the host, start correcting the course of the local bullet. The slower the projectile, the less distance it will travel before getting the actual angle, making it not really noticable. There would only be a slight discrepancy near the origin, where the angle has the least impact anyway.

    I think for your particular situation you have two best options - just fudge the player's visual feedback and accept that it might not be "real", or allow the peer to be authoritative on the angle of the shot.

    An additional nice touch is to have seperate feedback for a host determined "hit", like blood or flashing some other indicator. Then even if it looks like a bullet passes through the enemy, if they don't flash maybe it can look like the bullet went by them (above?). Also if it looks like the bullet missed, but host determines a hit, at least the player will get some feedback that there were hits.

    Lastly, the less possible bullet spread the easier it is to fudge acceptably in general, which may be a consideration.

  • I have no idea. Try it and find out.

  • "Access-Control-Allow-Origin:" Is a setting on your web server (Apache?) where the file you are trying to get is located. If you not managing your own web server config, such as with a third party hosting site, you might not have access to this. You can always try inquiring with your host/server admin to see if it can be enabled.

    ref: https://enable-cors.org/server_apache.html

  • Can you give an example of how you are currently assigning custom keys to your controls? It will be easier to see how best to integrate.

    Basically upon entering an "Assign key" state, add events for on left/right/middle mouse clicked - do something. This should be in parallel to your on keyboard key or button pressed.

  • Your second layout does not have an event sheet attached to it. Click the Layout, then check the properties bar to assign an event sheet.

  • Gotta break up your link a bit with spaces so it doesn't get truncated

  • Google Drive works fine.

  • Without seeing what you did, I can only say you did something wrong.

    Here is an updated example with layout switching: https://www.dropbox.com/s/881zxb3m1ch94 ... .capx?dl=0

  • Any Array can be represented as a single string with the Array.AsJSON expression. You can save this string however you want - into a variable, dictionary, localstorage, another array, ect. You can then load it again with the Array Load action.

  • Create ColumnSumVariable

    Repeat Array.Height times - Add Array.At(x,loopindex) to ColumnSumVariable

    Alternative -

    Repeat Array.Height times

    -> System compare values Array.At(X,loopindex) > 0 - Do something

    -> Else - Stop Loop

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So an array width 4

    x indexes are

    0 | 1 | 2 | 3

    array.width-1 = 3, which would be the last column. Since I pushed to the back of the array.

    If you push to the front of the array, you would simply use 0. I don't remember if I had a particular reason to push to the back...

    As for what it does - After pushing current pick to the back, it only sets the first row value (y0). So I need to move the other values in the other two rows (y1 and y2) as well..

  • Check in the properties bar when selecting the layout from the project bar. There should be a property that allows you to choose the event sheet associated with that layout.

    To create new layouts or event sheets, right click in the project bar.

  • You're saving the text in text box, which would be whatever the player decides to enter as their name.

    You can add the action go to next layout in the same event.

    Have you done the beginner tutorials?