How do I constantly scroll?

Get help using Construct 2

Post » Tue Jul 01, 2014 1:50 pm

@LordShiva1948

Thank you!

@SeriouslyCrunchy

Yes your spot on - the difficulty curve is quite specific so at the moment objects need to be in a fixed location.

Again your exactly right - having a lot of objects does cause some pretty huge headaches performance wise, especially on lower-end devices. The strangest thing is though, even on high end devices (where the frame rate sits happily at 60) the screen still seems to 'vibrate' as the player is moving. That's why I was originally wondering if ScrollTo was actually the best way!

I will honestly look forward to your reply, I'd greatly appreciate your continued input - It's a pretty interesting topic!

(Also while your tutorial isn't 100% relevant to my question right now, it is a well written guide which I will definitely be using in the future!

Thanks
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Tue Jul 01, 2014 2:25 pm

TMAJA that was not tutorial but, to guide you and inform you that it was not EXAMPLE but template. Scroll to you can use it but, it has it's own drawback. I would rather scroll the background and so on. For you my friend depend entirely up to your choice
B
256
S
39
G
15
Posts: 1,982
Reputation: 41,032

Post » Tue Jul 01, 2014 2:38 pm

@TMAJA

Yes, this is getting interesting. We have two ways of doing this, and I honestly think both are viable. If you were to follow the infinite runner template example, you would have to hard code in what 'time' each object would need to spawn at, with its corresponding X and Y co-ordinates, which honestly is a bit of a pain, but would clear up any performance issues.

However, I'm convinced you can still use scrollto quite happily! So I've spent a few moments editing the infinite runner template and using your approach instead. I think now the best way for you to try this is to edit the way your player character moves forward. You could either give the player character the Bullet behaviour, or if you're already using the platform behaviour, have it so every tick you simulate control of the player character in the direction you need them to go.

Heres the quick capx I cooked up using the bullet method, if you want to try the simulate control on every tick method, remove the bullet behaviour from the player character and enable the event in the event sheet : https://dl.dropboxusercontent.com/u/245 ... ollTo.capx

The only way I can see this not working so well is if you need more control then that over your player character.

Hope this helps!
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
7
Posts: 52
Reputation: 3,126

Post » Wed Jul 02, 2014 6:35 pm

SeriouslyCrunchy wrote:@TMAJA

Yes, this is getting interesting. We have two ways of doing this, and I honestly think both are viable. If you were to follow the infinite runner template example, you would have to hard code in what 'time' each object would need to spawn at, with its corresponding X and Y co-ordinates, which honestly is a bit of a pain, but would clear up any performance issues.

However, I'm convinced you can still use scrollto quite happily! So I've spent a few moments editing the infinite runner template and using your approach instead. I think now the best way for you to try this is to edit the way your player character moves forward. You could either give the player character the Bullet behaviour, or if you're already using the platform behaviour, have it so every tick you simulate control of the player character in the direction you need them to go.

Heres the quick capx I cooked up using the bullet method, if you want to try the simulate control on every tick method, remove the bullet behaviour from the player character and enable the event in the event sheet : https://dl.dropboxusercontent.com/u/245 ... ollTo.capx

The only way I can see this not working so well is if you need more control then that over your player character.

Hope this helps!


Hi SeriouslyCrunchy,

Sorry it took me so long to reply on here! Your capx was incredibly interesting to inspect, and I have actually changed my characters movement to the simulate control method! Thank you very very much for your informative answer and taking the time to provide some example code; amazing!

I have come across another related question though - as I am now using the platform behaviour and simulate control to constantly move the player object forwards, is this behaviour frame rate independent? Obviously frame rate can be pretty changeable on mobile devices and my previous method was robust to those changes. I had a look in the manual and it actually doesn't say (unless I have missed something)!

Thanks!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Wed Jul 02, 2014 10:52 pm

No worries, honestly I love working through these little problems, and its been interesting to test out different things!

I cant be sure on wether the behaviour is frame rate independent, but considering 'simulate control' effectively runs every tick, you would imagine it might be affected by frame rate changes. Try experimenting between that and the bullet behaviour for best results is my best guess. As is so often the case, wherever possible playtesting should give you the answer!

Glad to be of help!
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
7
Posts: 52
Reputation: 3,126

Post » Thu Jul 03, 2014 11:00 am

SeriouslyCrunchy wrote:No worries, honestly I love working through these little problems, and its been interesting to test out different things!

I cant be sure on wether the behaviour is frame rate independent, but considering 'simulate control' effectively runs every tick, you would imagine it might be affected by frame rate changes. Try experimenting between that and the bullet behaviour for best results is my best guess. As is so often the case, wherever possible playtesting should give you the answer!

Glad to be of help!



Hi SeriouslyCrunchy,

You've been a huge help - this topic has been very interesting! One last question though:

Would I be right in thinking: System| Every tick - Player Object| Set Platform vector X to Self.X+250*dt

Is regulating the X movement of the player object by dt therefore making it frame rate independent?

This doesn't really seem ideal though...

As far as I could tell after some quick prototyping the platform and bullet behaviours aren't actually frame rate independent (unless someone knows otherwise). This is obviously a problem for me so I need a way of making the movement robust to changes in frame rate!

Any suggestions?

Even after a few years programming I'm still yet to realise it's never, ever simple!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Fri Jul 04, 2014 11:56 am

@TMAJA

Sorry for the delay in reply, and sadly I only have time to write a few brief words as its a busy day today.

You are right that "System| Every tick - Player Object| Set Platform vector X to Self.X+250*dt " would be frame rate independant but :

Had a quick gander at the manual on dt : https://www.scirra.com/tutorials/67/del ... dependence right at the bottom it says "Don't forget behaviors already use dt (except with Physics where you must turn it on yourself)"

This would indicate that using the bullet behaviour to constantly move your player forward would make your game frame rate independent, so long as there is no other event changing the horizontal movement of your player character. However im unable to test it out right now to confirm. Give it a go and see what happens!
Intermediate level Construct 2 developer, looking to build up my portfolio : https://seriouslycrunchy.itch.io/

Current projects : Bite Sized Game Development, please have a look at my tutorials and comment!

I also write for http://moonbooks.net/, please come and check us out!

Follow me on twitter! @SrslyCrunchy I'm always looking for games or templates to highlight, use the hashtag #madeinconstruct !
B
15
S
7
Posts: 52
Reputation: 3,126

Previous

Return to How do I....?

Who is online

Users browsing this forum: Bing [Bot] and 20 guests