Possible to Create Multiple Viewports(Cameras)?

0 favourites
  • 10 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • I searched for a plugin and couldn't find one that did what I needed. I was wondering what would be a practical way to get the same multiple camera effect the game: "Where is My Heart" doing.

    It takes the level, then shows only portions of it in different windows and mixes them up so they aren't consecutive.

    (For example, the top right and the top middle ones overlap part of the cloud and the heart.)

    Thank you in advance.

    EDIT: Changed title from "Cameras" to "Viewports(Cameras)"

  • Create a blank sprite for each area that you want the camera to be limited to. Then use an event: When Player is OverLapping sprCameraArea1, Move Camera to sprCameraArea1 and so on.

    Hopefully, that explains it.

  • Create a blank sprite for each area that you want the camera to be limited to. Then use an event: When Player is OverLapping sprCameraArea1, Move Camera to sprCameraArea1 and so on.

    Hopefully, that explains it.

    Wouldn't that only allow for one camera, viewing a single area? Just the sprite area the player is overlapping?

  • One camera, multiple locations.

    Edit:

    Give me an hour and I'll put together an example capx.

  • Here you go. Dig through this and hopefully it helps.

    https://www.dropbox.com/s/8x4ixsobadeql4q/CameraSwitch.capx?dl=0

  • Here you go. Dig through this and hopefully it helps.

    https://www.dropbox.com/s/8x4ixsobadeql ... .capx?dl=0

    Thanks so much for the speedy reply, I've never had a reply on any other forum this fast!

    The example is much appreciated, it's not quite what I was trying to do though.

    This is what I was trying to accomplish (mute the commentary): https://youtu.be/-HUr5H0oVig?t=3m16s

  • Oh haha, that is something complete different. I would need more time to play around because I have never created something like that before.

  • Found a post from 2008 https://www.scirra.com/forum/multiple-cameras_t53580

    Suggestion was to allow for a split-screen functionality/support multiple viewports.

    [quote:3bfr38e9]It's on the todo list - at the moment the Layout object can't show a portion of the same layout. I guess this would be a kind of Viewport object - I should be able to make it able to show offscreen parts of the layout too, with custom scaling and rotating, which would be pretty cool... It's a good idea, and would allow splitscreen too.

    Anyone know anything regarding this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can probably do this with Paster, but you'll have to do a lot of the work yourself.

  • Hmm I think you will need a copy of every sprite object in the game per "camera", and a system to keep track of each "camera" position relative to reach other, and use those to offset the objects. Each set of your sprites would be on their own layer and you would use a blending mode like destination in with force own texture on the layer to create a clipping mask.

    Just theory crafting here, have that rough idea in my head but no idea how feasable it is. Might give it a shot later.

    It would need a lot of custom code to deal with interaction and sync the viewports'objects... Not unlike net code actually.

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