Yann's Forum Posts

  • the sin() part is really basic, sin() make things evolve from 0 to 1 to 0 to -1 to 0 etc... with the abs() I force it to evolve frome 0 to 1 to 0 to 1 to 0 etc... and then I just have to multiply this value by an amplitude to make the height evolve.

    The lerp thingy is just used to quickly go back to the starting size. (If you don't use lerp it will just snap back instantly).

    I strongly suggest you learn how it works. Your way is way more complicated. There's too much variables and situations to take into account. Once you get the hang of sine and lerp you will see that things get easier and well... You can use that for so many things.

    Anyway, this capx was to demonstrate one thing: you can tweak width and height even with mirror. You just have to always put the mirror at the end of the event list for it to be applied. So you don't have to resort on your animation frame tricks anymore.

    Using lerp and sine is not necessary, you can use a variable you increment and decrement for scaling as you already do. (with sine it's just more straighforward)

    That's all (:

  • works fine with me

    ninjaTurn3.capx

  • Well I don't think there that much difference between this last capx and yours, you should explain a bit, so I know what to change and what to keep (:

  • That's how I would do it

    ninjaTurn2.capx

    Your way is too convoluted I think.

  • Oooooh I didn't know that :D

  • This article can be interesting if you want to know a bit more about pacman ghosts

    http://gameai.com/wiki/index.php?title=Pac-Man

  • The main issue really is CPU if you plan to work on big worlds like Terraria.

    I don't know why you would need xml though.

  • That's not really a bug, that's because triggers works a bit like standalone events so you're never sure when they happen compared to normal events.

    ninjaTurn.capx

  • hehe yeah that works how he explained

    the lerp is just to set opacity according to animation frame

    if frame = 0 (with collision) opacity = 100

    if frame = 1 (with the collision trick) opacity = 50

    And it won't work with layer rotation as collision doesn't get rotated.

  • conditionalSolid.capx

    Will you be able to guess the trick?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • did something like that on cc some month ago

    waterSim.exe

    Basically it's an algorithm called "cellular automata".

    It's Array based:

    Foreach cell that have water, check the surrounding bottom cell and transfer water if empty.

    My example handle communicating vessels (which makes it a bit more complicated, you don't transfert water anymore but mass, and you put exces on top), terraria doesn't.

    But anyway it's pretty heavy in a large scale, event in cc.Yann2012-02-07 16:17:12

  • 7Soul yeah you're right, that's exactly what I did

  • haha some people got stoned to death with that kind of idea :D

  • you wanna do something like that?

    cladogram.capx

  • 1/ why do you have to delete frames? explain a bit more about your game and we might find out that it's not required (some control stuff can be done by events)

    2/ Instances always have the same animations with the same frames. If you want to differenciate frames you have either to create other animation inside the sprite, or clone the sprite and change the animation.

    But as I said, you might want to consider sharing a bit more about your game to have the best answer.