Battle Clash Movement

Get help using Construct 2

Post » Thu Dec 20, 2012 7:28 pm

Hi Guys,

I am trying to create a game similar to this.

Battle Clash

I managed to get an infinite scrolling background working, but how do I create the illusion that the enemy is part of the background? I would like to be able to stop the scrolling from time to time and continue from there.

Here's what I have so far

Infinite scrolling
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Thu Dec 20, 2012 9:25 pm

I don't see the problem. I suppose if you want more of a melding of the illusion. add some kind of closer scrolling foreground or ground that relates to enemy motion more
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Dec 20, 2012 9:35 pm

I guess that's the one I have no clue on. If the enemy were to stop suddenly, how would I recenter the camera and scrolling rate ?
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Thu Dec 20, 2012 10:26 pm

Well I don't know how you are moving your background. I'm not really sure how your working with your layout. Do you have a very large wide layout. or is in a single layout size equal to viewport and your just moving your background objects.

However if you want to link the speed of motion to the background you could do a translation of distance from center to speed ratio.

background animation speed = distance(enemy, viewport center) * X
so if your enemy is dead center the animation stops.



if you have a very large wide layout. I'll think about it some more.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Dec 20, 2012 10:31 pm

That actually might just work!! Thanks! I will try that out later. I am doing it as single layout, something like a treadmill. Right now there's three big identical cards just switch places everytime one of the card is near the end.

I have thought of doing it to a very wide layout, would that actually be adviseable? It definitely would not be infinite scrolling anymore.
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Fri Dec 21, 2012 1:21 pm

Currently tested it on a few android Devices and it seems I am getting an average of 30 fps, where compared to PC, I am getting 50-60. Is there something wrong I have done? If you are able, please do test out the game above, your help is much appreciated!

I am creating the game at 1280*720, would that be advisable or would it better to create it at half resolution?
B
27
S
9
G
5
Posts: 108
Reputation: 5,744


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests