How to speed up my layout?

Get help using Construct 2

Post » Mon Oct 29, 2012 6:11 pm

Hey guys! Im a newbie when it comes to construct 2 and Im making a game like Jetpack Joyride, an infinite runner if you will. Ill upload the capx but I was wondering how do I get the layout to speed up over time? If you could tell me, link me to a tutorial or something that would be great! I appreciate anybodies help :D

Thanks!!

B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Mon Oct 29, 2012 6:18 pm

im about to get a capx file in a sec! :)
Edit*
Here it is! This is my first time using dropbox so im not sure if Ive posted it correctly
https://www.dropbox.com/s/knagwfwctx8f969/lavarun.capxmichealmurray522012-10-29 18:34:55
B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Mon Oct 29, 2012 8:52 pm

You have some nice art there! That man's running animation is hilarious!

To make something acellerate.
Basically, in your movement code, you are currently saying
set x to self.x + 40 * dt
or something, right?
To add acelleration, just change the constant to a variable:
set x to self.x + speed * dt
and every tick, or every X seconds, add something to that speed variable.

If you don't understand, mention me with @sqiddster so I don't lose the thread ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Mon Oct 29, 2012 9:12 pm

@sqiddster
Thank you for the compliments! I just tried out your game(and really liked it!) and I really appreciate that!
I get it now, but if I want to make a certain group of trees go faster than another group I would just make another variable called faster speed right and I would write in
set x to self.x + fasterspeed * dt
right?
Thanks again!
B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Mon Oct 29, 2012 9:27 pm

Yep, that would work. Alternatively, you could do something like 'speed * 1.2', which would probably be more efficient ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Mon Oct 29, 2012 9:46 pm

@sqiddster
ahhh, Im still getting used to all the stuff like that.
While your enlightening a noob, I see gaps in my scrolling platform, any idea how to fix that?
B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Mon Oct 29, 2012 10:14 pm

Ah, gaps. I have heard of that problem but I have forgotten the solution :P

Try a forum search perhaps?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Tue Oct 30, 2012 12:24 am

@sqiddster I did, but with no luck im afraid, maybe its my computer, where there gaps when you ran it aswell? It seems to get larger as it goes on
B
7
S
2
G
3
Posts: 15
Reputation: 2,319

Post » Tue Oct 30, 2012 12:28 am

Have you tried just adding to timescale? If there are other things you want to move at a constant speed you could just set them to normal with each increase.

B
27
S
8
G
5
Posts: 429
Reputation: 6,902


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests