Wraparound

Get help using Construct 2

Post » Wed Aug 07, 2013 9:47 pm

Hi All

Ive been trawling different engines for about a week now, im really liking how construc2 works but how easy/difficult/are there any examples/tutorials for the following:

a platform game where the vharacetr stays int e centre of the screen and the level and background move instead?

to achieve this i need to be bale to draw enitities twice (?) so half of each entity is displayed om each side of the screen as it scrolls (the one disappears and is killed (?)

and platforms the same, so when they go off the ege of the screen they appear on the other side.

How would you achieve that with construct 2 .... id love to give it a go if it can achieve this?
B
3
Posts: 6
Reputation: 187

Post » Wed Aug 07, 2013 9:54 pm

There are lots of examples of side scrolling platformers in the FAQ section.

Look under:
Sidescroller/Platformer genre

In general that is a really great page for inspiration.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 10:12 pm

cheers, but nothing that specifically handles wraparound for background, tiles and entities :-(
B
3
Posts: 6
Reputation: 187

Post » Wed Aug 07, 2013 10:27 pm

The response was mostly to the first 3/4 of you post

If you want him to appear back at the start(left side) when he leaves the layout on the right side, you can just set his position to the left side in an event.

I am not quite sure if that is what you are asking. An example would be nice. a link to someone who has done something similar. (doesnt have to be in C2 but just to get the idea of what you want to achive)
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 10:33 pm

well i see the WRAP feature:

The Wrap behaviour simply repositions an object to the opposite side of the layout or viewport if it leaves the area. It has no conditions, actions or expressions. The Wrap to property allows you to choose whether to wrap the object when it leaves the layout area, or when it leaves the visible viewport.

The object only wraps once it is fully outside the area, i.e. no part of its bounding box is in the layout or viewport area.

But as you can see it doesnt allow tile or entity to be in two places at once : take a look at the demo at the bottom of this page and you ll see what i mean, but id need that functionality for entities, pickup, platforms and backgrounds :( (the player remains in the center of the screen)

Good news is id only need wrap in the x not the y too :-D

@cvp demo is under the title : THe wrapping (near bottom of page)

http://www.wildbunny.co.uk/blog/2012/04/13/implementing-a-wrap-around-world/


notrobot2013-08-07 22:39:20
B
3
Posts: 6
Reputation: 187

Post » Wed Aug 07, 2013 10:43 pm

Sry... it might be me thats a bit slow tonight, its getting late here

You are saying that your player will stay in the middle? If i understand you correct?

You need the wrapping for other things? or?

If so, why not just make the layout bigger at the beginning and end to fit your objects outside the viewport, and then wrap them?
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 10:47 pm

@cvp because thats a solution based on technology rather than addressing the requirements of the game design and the visual cohesion for the player .. in other words, the "engine" has to cope with a single screen level design fundamentally that wraps smoothly and consistently...i appreciate what our suggesting is a simple solution, but imagine playing it .. it wouldn't feel or look right!


guess your in the uk too? had along day myself, thanks for your input so far! notrobot2013-08-07 22:53:13
B
3
Posts: 6
Reputation: 187

Post » Wed Aug 07, 2013 11:01 pm

I am in Denmark.. so +1 hour

I know its not the nice mathematical solution. But sometimes with engines you have to make it work.

But from the time i have used C2 you wont be disappointed with its capabilities.

And that is leaving out the fact that the C2 team does new releases very often. With a lot of cool stuff.

There is also the option for you to implement the 100% correct solution in your own behavior. Javascript style

For what its worth.. i think you could make it work as I suggested with extra spacing on the sides. And done right, the player would know the difference. Only you.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 11:07 pm

yes, i thought of that, and theres plenty of engines, including this one, that could achieve that effect .. i started writing a tile engine inpixi, but just thought WTF .. im reinventing the wheel here, lets find an engine that can do this out the box .. a week later i havent found it :-)

I appreaciate that not knowing the deign fully its difficult for you to understand why the larger than viewport method wont work for this game .. im guessing with construct i'd have to spawn a duplicate entity/tile/object then kill them all when the wrap feature catches up :-(
@cvp

i'll look into how to write the js with construct since a lot of the other functionality would save me a ell of a lot of time...thks for your time again!notrobot2013-08-07 23:19:24
B
3
Posts: 6
Reputation: 187


Return to How do I....?

Who is online

Users browsing this forum: bikachu, GabrielBalas, Google [Bot], omnipaws, PixelByPixel and 9 guests