[SOLVED] How do I make this type of mini run game

Get help using Construct 2

Post » Thu Jun 30, 2016 5:12 am

How to make this type of mini game
Image
link of above pic
What I can do here
    Run Animation
    Speed
    Score
    Obstacle moving
What I can't do
    invert screen
    increase speed smoothly
    random obstacles, distance
    birds position up, down, mid randomly

I could make random obstacles but difficulties comes when their is matter about distance between their.
I can do increase speed but i can't do smooth speed
when score is greater then 100 then set speed 200 from 100
this increases instant speed
Last edited by luckyrawatlucky on Fri Sep 16, 2016 6:58 am, edited 3 times in total.
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Thu Jun 30, 2016 5:40 pm

Maybe try using a linear equation to set the speed?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Tue Jul 05, 2016 4:51 am

Bump
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Tue Jul 05, 2016 7:44 pm

Did you try using a linear equation? You keep bumping this without actually trying to solve it yourself, it seems.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Wed Jul 06, 2016 4:47 am

gumshoe2029 wrote:Did you try using a linear equation? You keep bumping this without actually trying to solve it yourself, it seems.

actually I don't know about linear equation, I am just googling about linear equation and trying it
but currently i am also asking about
invert screen
random obstacles, distance
birds position up, down, mid randomly
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Thu Jul 07, 2016 11:42 am

how to use lerp expression ?? pls explain how lerp works ?
I only know lerp(a,b,x) but don't know their behavior or how they works
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Thu Jul 07, 2016 3:57 pm

Lerp creates a linear extrapolation between two given points; and, based on a percentage of the way between them, returns a value.

For example, if you have lerp(0,1,0.5) will return 0.5.
This is equivalent to using the linear equation: y =x
Image
Because 0.5 is 50% of the way between 0 and 1.

Similarly, lerp(0,2,0.5) will return 1.
This is equivalent to using the linear equation: y = 2x
Image
Because 1 is 50% of the way between 0 and 2.

Similarly, if you do lerp(0,1,0.3), you will get 0.3, and lerp(0,2,0.3) will return 0.6.

The lerp function does linear extrapolation for you, and thus would fill your role for a linear speed modifier well enough.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Fri Jul 08, 2016 1:09 am

ohkkkkk
thanks for this information, its helpfull
I was always confused with the third number x
lerp(a,b,x)
example: my current speed is 200
i want to increase 50 every 10 second
i was doing
lerp(200, 50,10)
infect i have try many numbers with 10
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Fri Jul 08, 2016 5:44 am

Now I can do
1) increase speed smoothly
2) random obstacles, distance
3) birds position up, down, mid randomly
but
4) invert screen is still pending , how to do it
Image
B
64
S
39
G
45
Posts: 651
Reputation: 32,214

Post » Fri Jul 08, 2016 2:46 pm

To increase speed smoothly, you just change the x value in the lerp function between 0.0 and 1.0 by maybe 0.01 every tick or so.
You lerp needs to work like this:
lerp(200,2000,x) (2000 is just an example, but whatever the 'max' speed is)

I am not sure what you mean by random obstacles. There are one million different ways you can go with that.

Bird position you can randomize by using random(a) for the y-position. You can even use sine movement to make them go up and down some.

I am not sure that there is an easy way to invert the screen.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Next

Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION and 61 guests