Why is it differnet?

Just started using Construct 2? Post your questions here

Post » Sun Mar 23, 2014 7:01 pm

Message: CajedEnt is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hi folks;
I am new to Construct 2 - and was referring to Toms tutorial "Make your own "Flappy Bird" game in 10 minutes" .. and was curious why it seems the 'bird' has a decreased jump the lower it is on the Y axis? as the bird falls, clicking (or jumping) seems to be decreased and doesn't flow as well as it does the higher the 'bird' is on the Y axis...

I hope Im making sense here? haha

Thanks in advance for any help or explanation on this!
B
3
Posts: 3
Reputation: 181

Post » Sun Mar 23, 2014 10:39 pm

In the tutorial, when the bird flaps it's vector Y is set to 'bird.Y - 700'. The jump strength depends on the birds Y position. You want to set it to a fixed amount instead, like -500, as it is in the Flapping Bird template.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Sun Mar 23, 2014 11:44 pm

Thanks very much for the quick reply remones.. so the bird jumping strength (height) depends on the birds location on the page (Y axis)? So with the jump strength to 650 and the command: bird.Y - 700 makes the jump shorter the further down the Y axis the bird is? Is there anyway to make the bird jump the same no matter where it is on the Y axis?
Ive made a little youtube video of my settings and how the bird reacts when clicked: youtu(dot)be/RWwFEazlV54

Thanks so much everyone!!

Cajed
B
3
Posts: 3
Reputation: 181

Post » Mon Mar 24, 2014 10:18 am

Yes, just set it to a fixed number. Instead of 'bird.Y - 700' just use '-500' or whatever.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Mon Mar 24, 2014 6:29 pm

Thanks again ramones for your uber speedy replies!!

ahhhh I think I got it! But there is a difference in the code that I placed to ensure consistent jump height throughout the y axis no matter where the sprite is when the mouse is clicked.. perhaps its a version difference in Construct 2?
In Toms tutorial the action is: bird set Platform vector Y to bird.Y - 500 (or -700 as in the tut) and the birds jump height decreases the lower it is on the Y axis
If I set the action to: bird set Platform vector Y to bird.Platform.VectorY - 500 the jump seems to be consistent throughout no matter where the sprite is on the Y axis. But why? My code almost seems redundant... Only problem is, if the user clicks again halfway through the first -500 then the sprite looks like its double jumping - jumping higher on the second mouse click. But I suppose that would be normal as in:
on mouse click - get the birds y axis - move the bird 500p; now if the user clicks again when the bird moves up only 300 then the bird will look like its moves 800p.. adding 500p for every mouse click.. so if the user does a click-click the bird flies 100p instead of the preset 500.. but its not like that in the real flappy bird game.. what am i missing here?=(

.. am i on the right track?:P Is there an action that you can use that will not allow a double jump type movement.. All clicks will move the exact same height no matter what as in the real flappy bird game?

Thanks folks!!
B
3
Posts: 3
Reputation: 181


Return to Beginner's Questions

Who is online

Users browsing this forum: bobcgausa and 2 guests