0 votes

I'm thinking that I can use multiple Camera2D nodes to simulate classic Megaman's "room" structure from the NES games. However, I'm not entirely sure how I would transition from one node to another (where the player touches the edge of the screen, then the next room slides over into view). Any ideas?

in Engine by (197 points)

1 Answer

0 votes

I have tried something like that, is not hard, what you need is a single camera, and targets spots for transition.

Add a series of "area limits" to your level, when the player touches it, translate the camera to the next section start point, the new section should re-define the limits of the camera, until a new limit is reached.

Start with simple screen transition (tweens can help on moving the camera and translating a bit the player, areas and segment shapes to trigger change), then play with camera limits.

by (7,874 points)

Are there any examples of this that I could reference? My code spits back errors no matter what I do. Lol.

I don think so, is too specific and my crappy tests are on a dead drive now.

But start with simple stuff, write and draw on paper the things you want to do, the first is to make a camera move from one point to another on area enter.

Then link those points with variables (as you would do with teleports, to mention something similar), when the important node enters one area, the camera is moved to the point linked for transition.

Start with dirty code, then simplify with tweens to take care of the motions.

In the end, your level could be a single map/tilemap with special transition areas linked to a landing point for the camera.
Each section could be its own tilemap/scene too if you want to work in chunks, be creative ^^

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.