Yann's Recent Forum Activity

  • That's not a bug.

    That's the difference between a Trigger and a non-Trigger event.

    Trigger event (those with the green arrow on the left) are events outside the game loop. They are usually triggered before the next game loop to respond fast to the player input.

    The order of event is kept inside triggers though.

    if you do a

    Keyboard: On any key pressed
    [ul]
    	[li]> set Right_Pressed to 0[/li]
    [/ul]Keyboard: On Right arrow pressed
    [ul]
    	[li]> set Right_Pressed to 1[/li]
    [/ul]Keyboard: On any key pressed
    Right_Pressed = 1
    [ul]
    	[li]> Play sound[/li]
    	[li]> set Right_Pressed to 0

    The sound will play

    Keyboard: On any key pressed
    [ul]
    	[li]> set Right_Pressed to 0[/li]
    [/ul]Keyboard: On any key pressed
    Right_Pressed = 1
    [ul]
    	[li]> Play sound[/li]
    	[li]> set Right_Pressed to 0[/li]
    [/ul]Keyboard: On Right arrow pressed
    [ul]
    	[li]> set Right_Pressed to 1

    The sound won't be played

    Also notice that in your capx, if you put event 12 as the first event, you'll hear the sound.

    And for the number not displaying as you expect. The trigger is "On Up arrow pressed" that means that this event will play the instant you press the Up arrow, not before, not after. Then your Every tick that reset these variables will prevail.

  • MovObj_PF_r75.a.capx

    MovObj_PF_withPreview_r75.a.capx

    Hop! little logic debug. Some of my old decision made the sprite jump directly from the first to the second case. In step mode it wasn't an issue but in smooth mode if you moved by just one cell there wasn't any interpolation.

  • Oh you mean something like that?

    gridMovement.capx

  • If you can do part of the animation directly by event its better.

    Else you can maybe split stuff, like if you have a constant background you can just render what moves and put it on top.

    Well it basically depends on how your animation is made of course.

  • First, I don't want to sound pessimistic, but making a 2D fighting game is super hard, there's a lot of timing issues to do right and I don't talk about animation.

    That said, making the computer adapt to your playing style. Hmmm how could this be done?

    What is a playing style? A sequence of input that appears more often than other?

    Maybe we don't need to go that far as to register input sequences but then register the prefered moves?

    If we tackle the question from another angle, what is a good fighting game player? In my opinion it's a matter of timing. Doing the proper attack at the proper time, or doing the proper defense or counter.

    So let say you managed to register the moves and you have a graph of what moves appear most often. What should the computer do?

    When the player launch an attack doing a weighted random picking on possible defense or counter moves ?

    And then when the computer choose (?) to attack, he will do a weighted random picking on each possible attack based on the defenses or counter the player does rarely ?

    Ok why not. On the paper that seems doable. Now what kind of game would it be. It would be a game where, if you vary your attack the most you have better chances to win?

    So the player will have to memorise what attack he already used and use others to keep the weighted random balance the more even possible. Or maybe volontarily making the same move over and over to the risk of being heavily countered and then switch to something else?

    I wonder if it would be that fun. Maybe yes. Anyway, I'm really curious to see the result. I'm interested in IA adaptation so I hope you'll succeed (:

  • your [invert] collision = 1 isn't inside the loop so yeah you are running the full iterations congrats :D

    Also [invert] collision = 1 is the same as collision not equal to 1... there's the operator... Well as it's the same it's not an issue, just wonder what is better practice.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann