Wraparound

0 favourites
  • 9 posts
  • 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?

  • 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.

  • cheers, but nothing that specifically handles wraparound for background, tiles and entities :-(

  • The response was mostly to the first 3/4 of you post <img src="smileys/smiley1.gif" border="0" align="middle" />

    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)

  • 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)

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sry... it might be me thats a bit slow tonight, its getting late here <img src="smileys/smiley1.gif" border="0" align="middle" />

    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?

  • 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!

  • I am in Denmark.. so +1 hour <img src="smileys/smiley1.gif" border="0" align="middle" />

    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 <img src="smileys/smiley16.gif" border="0" align="middle" />

    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.

  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)