How do I smooth move forward?

Get help using Construct 2

Post » Tue Sep 16, 2014 9:23 pm

All of those questions can be answered if you read my first few posts @Dutoit .:P
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Tue Sep 16, 2014 9:41 pm

Can you post a capx? What you describe sounds weird to me. The scroll behavior should work otherwise.
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Post » Wed Sep 17, 2014 9:00 am

VIKINGS wrote:All of those questions can be answered if you read my first few posts @Dutoit .:P


I did, and that is why I wanted to clarify... Did you use the systems scroll to because it didn't work with other systems? or did you use behaviour which just works, got nothing to do with systems.

A capx example might be better.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Wed Sep 17, 2014 11:57 pm

Can't post a capx at this point @eli0s, too far into development. The events look exactly like I wrote them there, here I'll post a screenshot of em.
The scroll to behavior didn't work with the rest of the game @dutoit thats why I ended up with move forward and scroll to position every tick.
The forth event is disabled while I was testing the pin behavior that someone mentioned a few posts above. Doesn't matter if I use pin to or set position, the game behaves the same. I'll probably stick with the pin to as I'm guessing it takes a bit less processing power?

Image
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Sep 18, 2014 1:10 am

I don't get why you're having problems. The setup you describe is straight forward enough, there shouldn't be any problems. The sprite you are pinning is irrelevant and it shouldn't affect in any way the scrolling of the PlayerBox or the system scrollX action.

Here is an example using both ways, apart from a tiny jump which is probably due to a missing tick between the group activation/deactivation, the scrolling is exactly the same.
SmoothMoveForward.capx

If this plays ok in your system then something else is causing the problem.
Perhaps you have other objects with the Scroll to behavior forgotten somewhere? Or a redundant scrolX action hidden in your code? Maybe the PlayerBox is jumping from layer to layer and those layers have different parallax values?

If it doesn't run smoothly, then it's your system that is having trouble maintain steady frame rates.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Post » Thu Sep 18, 2014 7:40 am

As a matter of fact @elios I do have different layers and one of them does have a different parallax value. The sky layer has 50,50 parallax the others have 100,100, I did that tho give the illusion of the sky being far away .
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Sep 18, 2014 12:44 pm

@VIKINGS , and you rightfully do so! My point is that if you have an object that C2 takes into account to do the scrolling calculations (either with the "Scroll to behavior", or the "scrollX" action), and you move this object between layers that have different parallax values, then C2 won't know by its self how not to jump around due to the layer's offsets.

In your case, do you move the PlayerBox object between layers that have different parallax values?
Have you checked your other objects for a forgotten "Scroll to behavior"?
Or your code for a redundant "scrollX" action?
And does my example above runs smoothly in your system?

Come on, you have to help us out if you want to help you out :)
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Post » Thu Sep 18, 2014 11:53 pm

@eli0s The playerbox object and the character object are on the same layer(a 100,100 parallax layer) and as far as I can tell they don't cross over.
I don't have any residual srollx code or any forgotten scroll to behavior.
I can't check your capx at the moment because I have version 178 and your capx was made with v 180+ so it won't load it. And sorry, but I'm not upgrading to beta versions.
Any other info you need let me know please.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Fri Sep 19, 2014 12:48 am

You can unrar the capx file and then use a text editor to change a line in the caprog file.

Change the <saved-with-version>18000</saved-with-version> into <saved-with-version>17800</saved-with-version> and it should work.

I can't think anything else other than what I told you already.
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Post » Fri Sep 19, 2014 9:45 am

K, I made your capx work @eli0s and it seems to work pretty much the same, still has some... I guess micro stutter is what you would call it?
I'm using Waterfox, a 64-bit browser to preview the game, if that matters. And I olso created a new Template: Auto-runner just to test, and that one works fine.
Last edited by VIKINGS on Fri Sep 19, 2014 11:00 am, edited 1 time in total.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: combotg, Lancifer and 8 guests