Yann's Forum Posts

  • yeah the fade behavior is a bit incomplete, lack that activate/deactivate. you can't just stop the object from doing his fading .... oh... maybe timescale?

    indeed... works neatly

    neatFade.capx

    Also

    You don't need to destroy... behavior does that for you (:

  • What I did on someone's capx

    <img src="http://dl.dropbox.com/u/23551572/C2/angleLerping.png" border="0" />

    If I remember I was smooth rotating the layout to align with the rotation of the Player (this Player.Angle)

    I don't think you need all these %360 though... I was just being too carefull

  • I would put the origin at top left of the background sprite.

    Put your two background in two animation frame of the same sprite

    set the speed of the animation to 0

    And then

    Global Variable offsetX = 0 //Offset for the next background
    Global Variable before = 0 //before or not (for picking)
    +Player:is Overlapping Background
      -> System: set offset = Background.X+Background.Width
      -> System: set before = 0
      +Background: X<Player.X+Background.Width/2
        -> System: set offset = Background.X
        -> System: set before = 1
    +Player:[invert] is Overlaping Background
      +System: before = 1
        ->System: substract Background.width from offset
      ->System: set X to Offset

    If you overlap two background at the same times, this code will become a bit wonky, but as the result only apply to the background you don't overlap, there shouldn't be any visible issue... To try :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my opinion, layer rotation isn't robust enough yet to be used in something as complicated as rotation+scrolling.

    I think layer rotation does one interesting thing that is: rotating groups of objects. But here are the limitations I know :

    - you can't yet set a center of rotation

    - as you said you can't easily position a layer (where would be the origin?)

    - there are some annoying issues with collision (don't know if it's just with physics or all kind of collision)

    - when you group objects under the same layer you can't finely tweak zOrder regarding object outside this group

    And basically, to rotate a group of object, I would just use the same sprite to represent them and do a:

    Global Variable PivotX = what you want
    Global Variable PivotY = what you want
    Object: set X to PivotX + cos(angleOfRotation)*distance(Object.X,Object.Y,PivotX,PivotY)
    Object: set Y to PivotY + sin(angleOfRotation)*distance(Object.X,Object;Y,PivotX,PivotY)

    There you have control on what object you move and the position of the center of rotation (pivot).

    You avoid zOrder issues 'cause they stay at the same zOrder before and after the rotation. Same goes for collision issues.

    If there were families, you could even use the same code on a whole bunch of different objecttype.

    So for now, if I were to participate, I probably would just use layout angle. 'Cause THAT is a neat feature (:

  • keepee

    sqiddster

    Actually it's pretty much the same thing. There's exactlly the same control and I suspect that "apply force at angle" does exactly what I did with apply force.

    So no benefit, just showing off some sinus and cosinus to scare our dear n00bs.

  • I honsetly don't know. I have to admit that I don't really know how fullscreen modes are calculated, by providing a capx in my last post I thought I found out, but it seems that there still was issue when kyat tested it.

    So you can try your chance in a bug reporte or we could directly ask Ashley here about this

  • System: set time scale to 0.5
    System: Restore Sprite time scale

    didn't work? (it's possible I never fiddled with time scale)

  • hmmm.. I'm not in my big pc, on my laptop things are always a bit slow. But I can't see what you call "jittery".

    Can you discribe it a bit more?

    I checked for the basics like pivot points and stuff like that and things seem finely done.

    But as I said I might have missed 'cause of sh*tty laptop (:

  • It's possible with ajax, but ajax works on the same domain the page is on.

    Won't work to call .txt from other domains.

    dialog.capx

    Works fine here

    http://dl.dropbox.com/u/23551572/C2-Gam ... index.html

    But I'm pretty sure it won't work if you export the .capx in your own webhost.

  • you made 2 mistakes and I made 1

    Although I don't know why, I had to add the layerangle and not substract it. It doesn't make much sense to me.. but heh that works now

    sniper.capx

    by the way your first mistake was that you didn't copy my formula correctly (you substracted distances instead of multiply them) and the second is that you didn't calculate position on a per instance basis but in a global value and from the position of the target (thanks for translating your capx <_< I'm traumatised by german since highschool)

  • Or don't use layer rotation, just rotate the helico and make the layout angle follow the helico angle (:

  • lilypadding.capx

    WindowWidth and WindowHeight are the real size of the display. either you put fullscreen on scale or crop mode, if you have a 1920 by 1080px like me (who has bought a dual screen 2x24" recently and can't seem to stop to brag about it) WindowWidth will be close to 1920 with a browser properly stretched.

    But the value you want is 640 since you scale to fit the display.

    If you were in crop mode you would use WindowWith, but there you have to create your own variable with 640x480

  • Yeah layer projection is a pain

    I don't use layer angle, but if the center of rotation is the center of the layout, basically the conversion is quite simple

    if X and Y are the position in the unrotated layer

    rX and rY the same position in the rotated layer

    cX = Layoutwidth/2

    cY = Layoutheight/2

    you just have to take the point and counter-rotate around the center of rotation of the layer, with the same angle.

    It's exactly the same formula as the other topic on planete rotating around a sun

    rX = cX/2+cos(angle(cX,cY,X,Y)-LayerAngle)*distance(cX,cY,X,Y)

    rY = cY/2+sin(angle(cX,cY,X,Y)-LayerAngle)*distance(cX,cY,X,Y)

  • Yeah it was the aim of the 'trigger once'.

    I didn't wrote it nicely I think you misread that the 'trigger once' was a nested condition

    +Keyboard: down arrow is down
      -> Sprite: set crouching to true
      -> Sprite: set Platform vectorX to 0
      -> Sprite: set Platform vectorY to 0
      -> Sprite: Platform start ignoring control
      +System: trigger once
        -> Sprite: set animation to 'crouch'