Yann's Forum Posts

  • 1) well that doesn really matter, as long as you're sure you get the work done but you can always do a

    repeat 10000000000 times

    As long as you stop it when the condition becomes false you just need to be greater than the greatest possible loop you need.

    2) Yeah it looks like C2's angleLerp although I didn't know there were this action in CC

    3) haha the bottom one it a little trigo trick, really simple actually

    if number is positive the angle(0,0,number,0) is just a flat 0 degree angle (imagine a line between (0,0) and (number,0)

    and cos(0) = 1

    if number is negative, it's a 180 degree angle

    and cos(180) = -1

    if number = 0... hmmmm now that I think about it you might get 0 and then cos(0) = 1 so it won't be exactly the same as the sign() function but hehe... it might not be a problem.

  • (1) While loop

    To do a while loop do a for loop with a insane amount of loop and stop it once "what would be the while condition" is false

    (2) RotateAngle() ? what does that do?

    (3) Sign()

    sign(negative number) = -1

    sign(positive number) = 1

    sign(0) = 0

    What I usually do instead of sign(number) is either

    number/abs(number)

    but you have to check that number isn't equal to 0

    or

    cos(angle(0,0,number,0))

  • R0J0hound

    Oh! Seeing your fix, I see how wrong the movement was now. And not using bullet for now will probably be simpler than a sprite following another sprite as I just suggested.

  • There a simple solution to that robit. Make the bullet invisible and make another sprite follow it at the proper angle (:

  • I did something for a friend where drawing was involved. But it was just joining points in a given time.

    So click on a point, drag to the next point and release to draw the line

  • R0J0hound

    That's weird I can't see any difference. Using FF or Chrome.

  • Velojet avatar from tastybytes (:

  • I don't understand your problem

    seems pretty fine here

    shipShooter.capx

    here I made the ship volontarily shot at 90 degree to test the "bullet should follow the ship"

    And even if you have the weird impression it goes sideway, if you think horizontally it follow the ship quite well.

    ship90degreeShooter.capx

    The impression you have that the bullet doesn't follow, might be caused by the fact that you are accelerating. Your bullet just get the instant velocity the moment you shoot. You can see that in the second capx, when you attain maxSpeed, bullets follow the ship. But when you change direction and your velocity is not constant anymore, the bullet doesn't follow anymore.

    That's an expected behavior

  • Bob Thulfram

    What do you mean by overshoot a corner when moving? You overlap a wall? If you do I'd like to see a screenshot 'cause in my mind that's pretty unlikely.

    Also what do you mean by "360 degree vector with angles" ?

    This example works by first moving a detector in the direction given by th input key. The cos and sin gives the proper direction to multiply by the length of the cell. (event 5)

    And if the detector doesn't overlap a wall, the move is checked we can initiate it(event 6 does the opposite)

    The move itself works by adding a little bit each tick. dt ensure that this little bit is always proportionnal to the time between two frame, thus making it frame rate independant (event7)

    The only problem is that it's not a whole number. But we have to stop the movement after 32 px exactly, so once I cross the number I just substract the difference to get 32px exactly (event8)

  • Keyboard: A is down

    Keyboard: D is down

    Keyboard: On W pressed

    There's a nuance (:

  • imothep85 looks like he tested some of the last release of mmf2 and indeed they have a cool feature. You can display sprites on top of a video object (ActiveDirectShow if I remember)

    I actually used that to help a friend with her game http://vimeo.com/25798545

    This way all the camera angle of this point&click were in some video sequence (instead of heavy animated sprites) that looped and you could overlay sprites and UI on top of it.

    So yeah it could be a nice addition for c2 but I don't think video support is that advanced yet for HTML5... Don't know (:

  • Seriously guys, don't be that focused on screening cheaters.

    The aim of this contest is to promote C2 and make it known by other communities (while giving some gift to the best)

    Having the free version as limitation will be like "look at what you can already do with only the free version. Now imagine what you could do with the standard illimited version"

    Those who know me know that I'm kind of a technician with C2 and that I can make some convoluted stuff with the tool like pseudo 3D or gravity stuff.

    But technic DOESN'T make good games. It helps a lot, but first you need to be a good designer (that's what I'm lacking (: )

    I can tell you that you can make MoonShield and probably most of Airscape's mecanisms in less than 100 events.

    Cubemaze is 483 events but Moonshield and Airscape are way better.

    So yeah more than 100 events won't necesseraly make a better game. The simpler the better. Try to keep the 100 events limitation and work around that, you might even make something better.

    Help C2 be known and show that the C2 community is fair. It's should be more than enough.

    As far as I'm concerned I won't participate. I have too much project in my mind. But, I will help anybody that needs it (and ask politely :D). You can also ask me by pm if you want to keep your project secret. But I prefer when answers are shared.

    Good luck every one and make good games (: .

  • you can use

    distance(0,0,player_ship.Physics.VelocityX,player_ship.Physics.VelocityY)

    it's the same (well ok there's no much gain in term of place on that one)

    For your bullet if it's a bullet behavior you have to give the angle of movement and the speed if I remember so it would be

    angle of the object = angle of the ship

    bullet.movingangle = angle(vector Velocity of the bullet + vector velocity of the ship)

    bullet.speed = magnitude(vector Velocity of the bullet + vector Velocity of the ship)

    In short you have to add the two vector and then retrieve the angle and speed of the solution

    To add the two vector do it this way :

    Global number bulletSpeed = 500 //put what you want
    +On shot
      Local number bVx = 0  //bullet X component of default velocity vector
      Local number bVy = 0  //bullet Y component of default velocity vector
      Local number sVx = 0  //ship X component of velocity vector
      Local number sVy = 0  //ship Y component of velocity vector
      Local number rVx = 0  //result X component of velocity vector
      Local number rVy = 0  //result Y component of velocity vector
      player_ship: Spawn projectile
      System: set bVx to cos(player_ship.angle)*bulletSpeed
      System: set bVy to sin(player_ship.angle)*bulletSpeed
      System: set sVx to player_ship.Physics.VelocityX
      System: set sVy to player_ship.Physics.VelocityY
      System: set rVx to bVx + sVx
      System: set rVy to bVx + sVy
      Projectile: set angle to player_ship.angle
    // if your bullet is just a physic object you can set it's velocity X and Y to rVx and rVy... For bullet behavior you need two more steps
      Projectile: Bullet set moving Angle to angle(0,0,rVx,rVy)
      Projectile: Bullet set speed to distance(0,0,rVx,rVy)

    Tell me if it worked, not sure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dialogTree.capx

    and tuto... hmpf... I'll see

  • masking.capx