Yann's Forum Posts

  • Oh cool (: Thanks Ash

  • WebFont display correctly on preview, but after an export I get a default font instead.

    Works fine on firefox, seems like a chrome-only bug (didn't test IE or Safari though)

    Here is my simple testing capx

    Chrome-WebFont.capx

    As well as an export

    https://dl.dropbox.com/u/23551572/C2/Re ... index.html

  • Don't use the same sprite for rotation and platforming. Because of collision issue, when your sprite is rotated 15 degree one corner will touch the ground.

    Then you set it to 0 degree it goes back in fall mode. Probably creating some wiggling.

    You should then do something like setting another sprite to follow your platform sprite. I usually set the platform behavior on my collision box only and then set the eye candy graphics of the character on another sprite that doesn't handle collision.

    Let's call it "PlayerSkin"

    (You'll have to put your mirroring logic to the PlayerSkin instead by the way)

    Global number JRotSpeed = 120  // in degree per second
    Global number JAngleLimit = 15  //Limit of jump rotation angle
    
    Player: On Jump 
      -> PlayerSkin: set rotSpeed to PlayerSkin.isMirrored ? JRotSpeed : -JRotSpeed
    
    Player: On Fall 
      -> PlayerSkin: set rotSpeed to PlayerSkin.isMirrored ? -JRotSpeed : JRotSpeed
    
    Player: On Landed 
      -> PlayerSkin: set rotSpeed to 0
      -> Player: set angle to 0
    
    Every Ticks:
      -> PlayerSkin: Set Angle to Clamp(Player.angle+rotSpeed*dt,-JAngle,JAngle)

    (Sorry, didn't keep your awesomely long variable names :D)

    Use dt, this way your movement isn't fps dependant

    if you rotate 2 degree per frame the movement won't have the same speed at 30 and 60fps

    By multiplying by dt (time delta = time (in seconds) between the previous and the current frame) you'll always keep the same speed.

    And also it allows you to express your values per seconds (adding 1*dt to a value each frame, this value will go up to 1 per second)

    Anyway it should work

  • mouse button is down -> add 5*dt to power

    will progresively add 5 to power per second so 1 per 0.2 seconds

  • System: set scroll X to scrollX+100*dt

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cool Thanks (:

  • Ashley

    It would be great to have an "initial animation" property

    So you can specify a precise frame from a precise animation by combining this property with the initial frame property.

  • Ashley

    I confirm, can't reproduce with r101 (:

  • I don't see where is your problem... if you want your maze to be centered vertically and horizontally you just have to untoggle the 4th event...

  • superpowerjoe

    I don't remember :D

  • you can set a php file in your domain with the following code :

    <?php
    $rss = file_get_contents("http://something.com/rss");
    echo($rss);
    ?>

    and then query this file via AJAX

    but you might have some trouble parsing it since for now the XML object doesn't seem to like namespaces.

    and of course it won't work for preview.

  • Maybe it's using the default size of the texture.

    To be sure share the capx

  • Each layout is independant, when you switch layout the only thing that c2 keeps is global variables and objects, everything else is destroyed when you leave a layout. New instances are created when you enter the other layout.

    The event sheet just uses the object there's on each layout as if there was only one layout.

  • Global number n = 0        // counter
    Global number min = 0      // min value of the cycle
    Global number max = 100    // max value of the cycle
    Global number phase = 1    // phase of the cycle
    +Start of Layout
      -> set n to min
    +Every Tick
      -> set phase to (n=min) ? 1 : phase
      -> set phase to (n=max) ? -1 : phase
      -> set n to clamp(n+phase,min,max)
  • shinkan, yeah I see, I think all that comes from my bad animation implementation. I'll see what I can do, I'll probably rework on it for the arcade or something.

    I won't change the ludum dare version, that's not fair (: