oosyrag's Forum Posts

  • I keep saying that MoveTo is not the same as tweening, but Ashely won't listen.. These two behaviors look similar, but serve different purposes.

    With tween you can't make an object to accelerate to max speed, move at constant speed for some time and then decelerate to zero and stop. Yes, you can use one of the "In-Out" functions or linear, but this will not be same.

    MoveTo can change direction and continue moving at the same speed to a new position. Tween can't do this.

    Tween can't be stopped by solids.

    With MoveTo you don't have to care about the time - you tell the sprite to move to a position and that's it, it will arrive when it will arrive. With tweening you need to calculate the duration, which depends on the distance, approximate speed and chosen function.

    The list goes on...

    What would the differences between moveto and bullet be (I haven't used moveto)? Sounds the main addition would be setting a target destination and rounding/truncating the last step for precise movement. Maybe adding this functionality to the bullet behavior would be good?

  • Are you using peer and host groups for events?

    Upon getting kicked, all peers will try to reconnect, the first one that manages to do so will be the new host, and will need to enable and disable it's peer/host event groups as such. Otherwise, it will remain using peer events even though it is the host now.

  • Minimal example - dropbox.com/s/rdlifbmm83uj113/splitscreen.c3p

    wasd to move the left side, arrow keys for the right side.

    Make sure each viewport, along with its own content, is on it's own layer with "Force own texture" enabled. This makes sure the "mask" blend mode only effects objects on its own layer.

    The way I've put it together is just one way of doing it. Explore blend modes with scirra.com/arcade/tutorial-games/blend-composite-modes-sandbox-27823 to see what works best and makes the most sense for yourself.

  • Thanks! Should have mentioned 8 direction isn't setting the sprite's angle, but simple enough to use an instance variable instead of the angle.

    It's an isometric view, using 8direction.movingangle to set the frame showing which direction the sprite should face. First issue occurred when stopping, the sprite would always face right. Got around this by updating the animation frame only when not stopped, but that would still always end up at 90 degree angles due to how the behavior stepped motion.

    Looks like the key is to stop updating the angle upon releasing input. I don't think I need to use anglelerp, although its nice how it normalizes different ways angle is represented.

    Second issue was an input that would add a short burst of speed. While moving is fine, but when stopped it would always boost to the right. I don't see a way to specify angle of motion with 8 direction in an action, so I guess I'll just have to set vectors based on the stored angle.

  • Does anyone have any experience/tips regarding the preservation of the last MovingAngle for the 8 direction behavior? Upon coming to a stop, MovingAngle resets to 0.

  • Copy the event, invert "Has line of sight to player" by right clicking, then change your actions to how you would like it to wander when it doesn't have line of sight.

  • Generally speaking, massive sprites run into graphical memory issues. Best practice is to use a combination of tiled backgrounds and a variety of layered components (that can be resized, reshaped, or recolored for relatively low resource costs), or a tilemap.

    Another technique can include using a lower resolution "outline", resized to be massive, as a blending mask over a tiled background "texture" to create layers for things such as biomes.

    Read this article if you haven't already - construct.net/en/blogs/construct-official-blog-1/remember-not-to-waste-your-memory-796

  • Step 3: "leave as the host (peer now becomes host)" does not happen automatically, and is probably the source of any issues you are having. How are you handling this step currently?

  • It tells you how to approach the problem.

    First make your base game, with x number of inputs. This will run in the background, it is up to you if you want to make any of it visible.

    Then, make a copy of every object per input, offset by a certain amount based on the position of each player for their individual "viewports".

    Have each individual viewport on its own layer, so you can use blending modes to slice the total viewport into halves or quarters or whatever you want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • "The Else event runs if the previous event did not run." As moon said, a subevent only runs if the parent event DID run, which is a direct contradiction.

    It would work however, if there was an additional subevent on the same level above it.

    The way it works and looks is unique to Construct's event sheet, so I would try not to get too hung up on what "correct" should look like using other programming languages as a standard (especially if you're teaching Construct).

    If I were to teach someone how to use the else event, it would be directly related to toggles as you have done, and I would explain it exactly like how it is explained in this article scirra.com/tutorials/292/guide-to-construct-2s-advanced-event-features.

  • Using a low resolution and scaling up to a high resolution/large display will result in lower quality visuals.

    Using a high resolution and scaling down will utilize more graphics memory (and overall download size), which may or may not be a problem depending on the scope and size of your project.

  • Does the built in sprite.asjson expression include the texture data?

  • Try request from url to get the file from the drive rather than the project file, which might be cached upon downloading/running the app.

    When I previously worked with dynamic files on the local system I used nw.js, and I know that worked, but I'm not certain if Ajax by itself can do it.

  • Localstorage should last forever, barring a significant update to the game that changes how saves are handled, reinstalling the browser (or changing browsers/computers), or manually clearing the browser cache. It is related to the "Cookies and other site data" option under the clear browsing data options in Chrome.

    For persistent storage, your best option is to use a cloud service or your own server to sync user data online in addition to using local storage.

    Alternatively, if your game is packaged as an app or executable, it should be significantly more difficult for localstorage to be unintentionally cleared.