oosyrag's Recent Forum Activity

  • Ah.

    The pixel rounding setting should still overwrite whatever you see as the canvas coordinate. That is it should only attempt to draw the nearest (rounded) "full" pixels, regardless if layer coordinate or canvas coordinate is not a whole number.

    Anyways you can see what exactly pixel rounding does in this project dropbox.com/s/cdw5a1e9agxk4jy/pixelroundingexample.c3p

    Try turning it on and off to see how it behaves when pressing the right arrow.

  • If you're going for smoothness and want to use tween, you'll need to define an "update period", as tween is something that happens over time.

    You wouldn't tween something every tick, since that is no different then setting the position directly.

    You also generally don't want to use multiple overlapping tweens unless there's some specific effect you are going for.

    So to prevent overlapping tweens, such as your fuel draining normally, and your fuel filling from pickup, you'll need some additional information. All tweens need a start point and an end point. Assuming your fuel is still draining during the time it takes to fill up, you'll want to find out how much fuel would have been drained during the time it takes for your fill up tween and subtract that from the end amount. When it's done filling, then start a new emptying tween from that point to 0. But then you would need to set a new time, based on the amount of fuel you currently have, since fuel drain should be constant...

    Anyways I still think tween isn't the way to go here.

    Just have a fuel variable that is subtracted from (dt amount) every tick for a constant smooth rate. And if you want your fill up to be smooth do the same thing, and add fuel at a constant rate every tick until the total amount added runs out (you can keep this in a separate variable).

  • I'm not too familiar with the relationship between the drawing canvas coordinates and layout coordinates.

    But at least pixel rounding doesn't have anything to do with behaviors or set position. You can see in debug mode even with pixel rounding on, if make an event for example on right button pressed, set sprite position to self.x+0.11, you can still increase the position of the by decimal amounts. But the rendering engine will not attempt to draw the sprite at sub pixel locations, so you won't visually see it move until it gets rounded to the next whole pixel. This preserves crisp edges for pixel art.

    I'm assuming if your canvas position is not a whole number, pixel rounding should still prevent drawing sub pixel locations, but if the drawing canvas plugin breaks that rule then I don't know.

  • At the end of your event sheet, every tick set object position to int(self.x), int(self.y). This may have performance implications depending on how heavy your game is to begin with. But it shouldn't be too bad in normal situations.

    On the other hand, it was my understanding that pixel rounding doesn't prevent objects from existing at sub pixel locations, it just rendered them at whole pixel locations. So I wouldn't think it would cause artifacts even if the object position had a decimal. There may be another issue you are overlooking.

    Edit, from the manual on the pixel rounding property:

    Note this does not affect their actual X and Y co-ordinates, which can still be between pixels - it only affects where they are drawn on the screen.

  • Not sure if there's a particular reason you want to use tween here.

    This is all you need.

    + System: metermask.Height > 0
    -> metermask: Set height to metermask.Height-0.1
    
    + System: Every 5 seconds
    -> metermask: Set height to min(metermask.Height+25,150)
    

    Note that you will probably eventually want to keep something like the fuel level value in a variable, and set the mask height based on that variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dropbox.com/s/7zux43j2ab1zrhb/minimaldisintegrateteleportexample.c3p

    Edit: (Offtopic) After making this, I wanted to call it the Cheese Man example due to the way it looked without all the additional effects, then I searched and found out Cheese Man's name is not actually Cheese Man. Profound sadness. megaman.fandom.com/wiki/Yellow_Devil

  • That just gives you the notice to change to the latest beta after loading the latest stable, if you are going to editor.construct.net

    To always go to the latest beta by default, bookmark the address editor.construct.net/beta

  • It looks like interpolation is included as part of the Photon BOLT product's functionality.

    doc.photonengine.com/zh-TW/bolt/current/reference/interpolation-vs-extrapolation

    doc.photonengine.com/zh-cn/bolt/current/demos-and-tutorials/advanced-tutorial/chapter-3

    You'll need to implement it yourself, locally, otherwise.

    Regarding the network and NAT issues on the official plugin, 99% of those can be solved by simply adding a TURN server to your ICE list. These are usually not free, and therefore there are none added by default. I know some users have found free solutions in the past though, at least for low utilization/traffic.

  • That sounds about right, although I don't have a running example so best to just try it and see and modify and fix it as you go.

    Here's an example of what hit/hurtboxes look like if you were to be able to see them. There is usually no need to follow the exact curvature of your blade. Games "feel" better if you cheat a little in favor of the player - make the hitbox extend past what the blade looks like a bit. You also won't need to create/reshape a unique hitbox zone for every single frame of your animation this way.

    eventhubs.com/imagegallery/2016/mar/13/sf5-hit-and-hurt-boxes/14

    The boxes do not always exist, and usually last for more than one frame. So they would be created when the triggering frame starts, and destroyed when the "active" portion of attack animation ends.

    Edit: More reading if you're interested game.capcom.com/cfn/sfv/column/131422

    reddit.com/r/Fighters/comments/by2hzu/question_fighting_games_where_hitboxhurtbox_is

  • I don't think you can add a second audio object.

  • To improve the gameplay experience, the multiplayer engine interpolates between updates for values like X and Y co-ordinates. In the case of positions, it will linearly interpolate between updates. For example if data is coming in every other frame, then the frame which does not receive an update will use a value half way between the two updates either side. This makes the motion smooth again without needing any more data.

    The official multiplayer plugin has interpolation built in. You will probably need to implement this yourself if Photon does not have it built in. (I imagine it should, so check Photon documentation on how to handle it)

    After interpolation is applied on the peer side, you will want a way to reconciliate any differences from actual synced positions when they become available from the host. These differences can vary due to latency. The official plugin will "fast forward" or "slowdown" the engine based on latency to compensate, which is a more advanced method. A simpler way would just be to adjust/tween the predicted position to the actual position over the course of a multiplayer tick/update.

    These concepts are described here construct.net/en/tutorials/multiplayer-tutorial-concepts-579/page-6.

    I have no experience with Photon though, so you'll need to find out the equivalent features in Photon. I'm 99% sure Photon has this sort of basic functionality, you'll just need to find out how to use it.

  • Your title said unique touch event for instances, so you would need a unique identifier for each instance to determine what unique event to run. You can set an instance variable when creating objects via events as well no problem.

    If you want a generic event for flipping the card, then a simple on touched object would suffice - only the touched instance would be picked, and only that instance would flip.

    I don't know why your previous event with for each doesn't work, as I have no idea why you would want to use for each in this situation to begin with, since for each doesn't really have anything to do with what I understand your question to be.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

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
  • 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
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies