Forum rules - please read before posting.

Change camera for 2D game?

Hi,
First of all I know how to change camera. Question is abit more complex. In 3d game when you have more than 1 camera in scene and you change camera, game keeps same scene loaded - just changes camera, with selected transition etc. In 2d game it is different, because you can not fly camera around, orbit objects etc. Of course I understand you still can have more than one camera in the scene and change it, but for 2D you will also need to change background, to scale up to certain part of scenery. For example, you have room background and player can move inside it, but when he comes to right edge you want to show close up of this part of room. You can not use zooming in for this, because it will decrease image quality - it is bitmap, not vector. So what can be done?
Apparent decision would be to have scaled up part of room as new scene and when player comes to right edge load new scene, when he moves left edge of new scene load back old scene. But honestly I would not like to change scenes so often.
Another way I see is to make background image big enough to stay ok even when scaled up, but in this case images will be super big.
Is there any other solution?

Comments

  • Hi, @Makumba666 maybe you can create that "portion" of the room in higher resolution and place it upon your scene's original background, then make it invisible by default (with a "remember visibility" component on its inspector and a "Visibility on start: Off"), and when you're switching the camera, turn it on, and vice versa. You would need to use an interaction/action where you set Object: Visibility -> On /Off.

    There's another way involving the use of the Sprite Fader component, but I don't think that will be necessary.

    PS: I would blur the edges of the "portion" of the background (against transparent pixels, saving file as png) in order for the "transition" between that overlay and the background doesn't look too sharp...

    Hope that helps!

  • juanmaguerrero,
    Thanks for idea - it seems best way to handle this.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.