tulamide's Recent Forum Activity

  • Any picking done by the alias is forgotten when the alias returns (I initially thought that "inline" would change the SOL of the event that called the alias, but it's not the case).Ah, now I see. No wonder I had no success. It's completely the other way round.

    The wiki is awfully wrong at describing the workings. Here's from the wiki (most interesting part in italic):

    "In Inline mode (comparable to Remember), all currently picked objects are passed to the On Alias event, which can then pick other objects, and pass them back to the calling event again. In other words, with Inline aliases, object picking affects both events."

    I was relying on that and never thought in another direction^^

    Thank you, rojohound

    Shindoh

    Here is another method using two conditions.

    + Sprite: Value 'test' Equal to 0

    + System: CountMatching(Sprite.OID) Equal to Sprite.CountNow that's a compact, efficient way to do it!

  • tulamide could you explain, how that "isolated" stuff works oO.

    I see 'that' it works, but even after reading the wiki, I didn't get it 'why' it works ><.It doesn't work. I couldn't ever get it to work.

    If you try the examples from the wiki, you will see that they don't work. Simply forget about picking in aliases...

    ...at least until rojohound comes along and belies me <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Can't think of a really easy way at the moment, but here's a comfortable one:

    test_all_instances_match.cap

  • When you apply an effect to a layer, that effect will always work in screen space, not object space. That's why you have the impression of it being linked to a "camera".

    You could try to compensate the camera speed by adding/subtracting it to/from warp's speed by an appropriate factor, but that's right from my head without having actually tested it.

  • joxer

    I recommend reading the Construct wiki. It helps a lot understanding the concepts of "tick based" and "time based". The key to time based actions is "TimeDelta". http://sourceforge.net/apps/mediawiki/construct/index.php?title=TimeDelta

    Jayjay

    Just in case you're curious, there's another way to move something over time by combining "lerp" with "TimeDelta".

    lerp(a, b, t) interpolates between a and b at t, with t ranging from 0 to 1. t=0 results in a, t=1 results in b.

    If you add TimeDelta to a zero-initialised variable on every tick, it will be 1 after one second. To let it reach 1 after two seconds, you would add '0.5 * TimeDelta' instead.

    This would move the sprite horizontally from 200 to 100 in two seconds (pseudo code):

    + myVariable less than 1

    -> Add 0.5 * TimeDelta to myVariable

    -> Set Sprite.X to lerp(200, 100, myVariable)

    EDIT: And if this is too confusing, it might even give you more accuracy if you'd let myVariable count to the needed seconds. But then you need to divide myVariable by the correct number in "lerp". This example would move horizontally from 64 to 211 in 3 seconds:

    + myVariable less than 3

    -> Add TimeDelta to myVariable

    -> Set Sprite.X to lerp(64, 211, myVariable / 3)

  • You're welcome <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Is there a way to make the text object's "write text" action over-ride the game's timeScale?No, there isn't. Everything related to time is paused, when timescale is zero. Timer, Every x milliseconds, behaviors, etc. But the tick counter still works, of course. You can just do your own little "write text" routine, that is tick based. And it isn't very difficult. Here is an example (using globals, but you can do it with private variables just the same):

    write_text_tick_based.cap

  • From time to time I'm just blown away by all the efforts out there creating such detailed simulations not for some scientific application, but for games!

    CryEngine will use Beam's soft body physics, and although I doubt the claimed 100 fps in a finished game, it will add so much to realism even if a game with that would only run at 30 fps. The degree of detail simply is amazing for a realtime environment.

    http://beamng.com/

  • Maybe I misunderstand it, but let me say two things about it:

    1) This is a pixel shader. All a pixel shader does is altering pixels when the graphic card is rendering. It does not change behaviors, coordinates and the like.

    2) flip horizontal and flip vertical do exactly what the functions in the picture editor do. When you imagine pixels as numbers then the effect (and the picture editor) do the following to the pixels:

    <font face="Courier New, Courier, mono">before: 01 02 03 04 05 06 07 08 09

    after:   09 08 07 06 05 04 03 02 01</font>

    If you intended to rather flip all sprite in its local coordinates while keeping the global coordinates on the layout, then you're lost, I'm afraid. This can't be done with only one shader. You'd need to use the "flip horizontal" and "flip vertical" effects (that come with CC) on every object instead. (EDIT: Or flip in code with families, as Jayjay described)

    But if I'm wrong, and your intention was something else that this effect does not achieve, could you do a drawing of what you have in mind?

  • After reading this, I created an effect that could help, if there is headroom on the GPU side:

    http://www.scirra.com/forum/effect-flip-layout_topic52811.html

  • This effect flips a bunch of layers up to the entire layout.

    You need to use this effect as a layer effect and on a layer on its own!

    Without effect:

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout1.png" border="0">

    With effect:

    <img src="http://dl.dropbox.com/u/11182740/construct/fliplayout2.png" border="0">

    Usage:

    1) Create a new layer (named "flipped" in this example)

    2) Apply the "Flip Layout"-effect to "flipped"

    Everything underneath that layer will then be drawn flipped on the "flipped"-layer (replacing everything that currently is on that layer, so always use a dedicated layer).

    The effect has 3 parameters:

    flip vertical

    flip horizontal

    activation

    Set any of those to 1.0 to switch them on. Any other value will switch them off.

    Note: Activation is there to make it more comfortable to edit your game. The effect will still add to GPU load, it just doesn't show the result. To save GPU load, deactivate the effect using the system actions.

    In edit time the effect will look offset, this is not an error. In runtime it will all be ok. Furthermore, the effect only works using a little trick: the colors have to be merged with a very small amount of the layer's color. It's only 0.001% though, so no human being will notice it. And last but not least the usual limitation for pixel shader effects: Windows elements like editboxes or buttons can't be altered, they'll stay at their positions (have a look at the pictures above)

    Download: Flip Layout.fx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just the basics:

    Set your layout to "Unbounded scrolling" in layout properties. Then use something like

    + System: Always (every tick)

    -> System: Scroll to object Sprite

    -> System: Set display angle to Sprite.Angle

    Move and rotate the sprite (assumed it is the player sprite) according to the landscape.

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies