Wish List

  • Yes the DUCK is an animation, but isn't a RUN or JUMP an animation? It may be fine if the player is just a box. But most platformers use ANIMATIONS that correspond to a key press, and if you touch left/right an object moves left/right, and the corresponding animation plays that were added with KEYBOARD and PLAYERBOX ---> PLATFORM ON... events.

    It would omit an extra step needed to add an animation on a DOWN button press. Actually looking at it, i guess it won't actually omit a step, but it may be easier to figure out. It took me a few hours to figure it out.

    Maybe i'm not understanding correctly the way C2 is implemented , but that's the great thing about C2. It can do almost anything. You just have to spend hours trying to figure it out when there is no related info on the subject.

  • Yes the DUCK is an animation, but isn't a RUN or JUMP an animation? It may be fine if the player is just a box. But most platformers use ANIMATIONS that correspond to a key press, and if you touch left/right an object moves left/right, and the corresponding animation plays that were added with KEYBOARD and PLAYERBOX ---> PLATFORM ON... events.

    It would omit an extra step needed to add an animation on a DOWN button press. Actually looking at it, i guess it won't actually omit a step, but it may be easier to figure out. It took me a few hours to figure it out.

    Maybe i'm not understanding correctly the way C2 is implemented , but that's the great thing about C2. It can do almost anything. You just have to spend hours trying to figure it out when there is no related info on the subject.

    Run and left/right are not animations, but controls (left and right makes the object with the behavior move, and jump makes it jump), animation control is separated from the behavior.

    Basically the platform behavior controls the logic, you have to control the graphics separately, the same thing happens also for putting a running or jumping animation.

  • Run and left/right are not animations, but controls (left and right makes the object with the behavior move, and jump makes it jump), animation control is separated from the behavior.

    Basically the platform behavior controls the logic, you have to control the graphics separately, the same thing happens also for putting a running or jumping animation.

    Yes, animations (run, jump) are controlled by a key press or a touch(up = jump, left/ right = corresponding movement but then why can't i have a down key press for a slide or duck? Why must it be different than a run or jump key press?

    All i'm saying is the option should be available. It could open more possibilities in game play.

  • [quote:22jp7r53]Why must it be different than a run or jump key press?

    It doesn't have anything to do with the movement physics. Platform behavior is preset behavior that makes the physics like collisions easier. It is also possible to make your own platform physics using events but, that is quite advanced. That's why it is as behavior. Also changing collision box isn't something that behavior should do.

    I would suggest you set Default controls from the behavior to "No". Now you have more control over the movement through events.

    [quote:22jp7r53]why can't i have a down key press for a slide or duck?

    Of course you can if you make it so.

    [quote:22jp7r53]It would omit an extra step needed to add an animation on a DOWN button press.

    If you consider ducking as an extra step then how are you gonna make any other interesting stuff happen in the game?

    Conclusion. This is not a thing that the platform behavior is supposed to do and if you have questions about it you should ask in how do I section or look from tutorials.

    I have one platformer tutorial there that has Mario game style ducking.

    https://www.scirra.com/tutorials/753/mario-style-platform-example-with-spriter-animated-player

    From events look under. Player -> Player_Controls -> Player_Controls_Common

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jeffige , Aphrodite and Katala already covered pretty much everything about this. You have misunderstood what the Platform behavior does and what it does not do and for what purposes it's made for. Let me put it in my words too, just for the sake of argument.

    Forget about the animations for a moment. Lets focus on a simple box. How do you make it move..? You can can create 2 events just to make it move left/right:

    When right arrow is down---> box set X position to self.X + 350*dt (to move it 350 pix per second like the Platform behavior does)

    Equally, When left arrow is down----> box set X position to self.X - 350*dt.

    So far so good. But how do you make it accelerate and decelerate to and from this 350 pix per second speed? You''ll need to make some variables that are interpolating from 0 to 350 and 350 to 0 speed. That's a bit complicated but doable.

    Now, how do you make it jump? You need a way for it to move on the Y axis in a parabolic manner. I wont even pretend to know the math behind it. That's even harder. But let's say that you did manage to make a system that does that, and even simulate the acceleration from the gravity.

    Now you are left with the collision detections. When the box is on the floor, when it has a wall on the right or on the left. This is very-very difficult to make with events. But it comes by default with the Platform behavior.

    Having said all of the above, up until now nothing has anything to do with animations. These are events that sorely make a box behave/move like Mario.

    If you want animations (visual representations of someone doing something), you can use the key-presses to trigger the corresponding animations on a separate Sprite (pinned on the one that has the Platform behavior-the box).

    Now (finally), for ducking and sliding.

    Ducking should just trigger an animation and perhaps decrease the height of the Sprite that hold the collisions for your character (the one I was referring to as box).

    Sliding is a bit more involved. You could emulate it with the following events, including a boolean variable and the timer behavior:

    When Down key is pressed----> set Boolean "Sliding" to True , set timer "Slide" to 1 second

    If boolean Is Sliding----->Platform, Simulate movement Right (for example), set Platform max speed to 600 (for a fast dodge)

    On timer "Slide"----> set set Boolean "Sliding" to False...

    I hope I was helpful and sorry for the long post... X)

  • http://gigatron3k.free.fr/html5/customball.capx

    When i asked breakout style Movement i mean like this example.

    Original code From Pascal, Converted to C2 by me .

    ./.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)