Camera+ Example - JR01

Definitely, this will add more flexibility to the camera, making it easier to switch how you want the camera to behave.

Example (For my game): When the character enters a boss battle, the camera will switch to two-subject camera.

3 Likes

Update 11/14/22:

  • Fixed spastic camera movement at the start.
  • Added On/Off input
  • Added Remove input
  • Added Re-Add input
  • Re-ordered the wires

The Camera now starts where the camera object is, and then moves to the start once the setup is complete. The On/Off input is a single input for turning on or off the boundaries. With the Bundles set to off, the bundles will always center to the target. The Remove input lets you remove an area in the list so that when reaching that area (like are C or F), the camera doesn’t react when in that area. This only works if there is an Area with that Letter. Re-add input puts the removed area back into the camera list, this only works if you have removed an area.

Turning Off/On the bundle

Camera+onoff

Removing and Re-adding Areas/Rooms

Camera+removeadd

9 Likes

This is amesome work! Is this a game you are planning to make or ya just showing how this camera mechanic works?

2 Likes

Kinda wanna test this in ducky :grin:

2 Likes

Ducky? There is a game about ducks. Sound like fun.

1 Like

Yeah check it out
Link

1 Like

Just showing how the mechanics work.
I have a lot of example like this on my profile, some of which are on the help page too.
https://flowlab.io/users/profile/622236

2 Likes

hello, i’m having an issue where if i the player be able to go in two different directions then the cam bounds created 2nd don’t work and the game just unlocks the camera, here’s a link to the game if that helps https://flowlab.io/game/play/2163698, specifically the camera unlocks when going right

1 Like

wait, actually the camera completely unlocks if you add two different directions it can go in

1 Like

You have to name the cam-bounds objects correctly.

A1 and A2 are correct, but you have 2 B2 objects and a B3 and one that’s not named.
You need A1, A2, B1, B2, C1, and C2 as the object name.

2 Likes

oh, i just realized, thanks!

1 Like

Update 11/30/22:

  • Replaced the “On/Off” input with “Modes” input.
  • Added a Room output on the bundle.
  • Changed the Level layout.
  • Changed player and camera start position.
  • Changed example Remove to where you can remove the current room.
  • Changed example Re-Add to re-add all rooms that are removed.
  • Updated Game Description.

Modes:

  1. Follow Room layout and off-bound areas (Default)
  2. Disable off-bound areas (Stops at last room)
  3. Always Center Target (Ignore all areas)
  4. Check Activation (mode 2)

Thanks to @Greggo for suggesting a way to disable off-bound areas. And with some other ideas, I’ve changed the “on/off” input into “Modes”. Mode 1 is default, Mode 2 is the same but doesn’t center the player when outside the rooms. Mode 3 is how no/off worked before and just moved the camera to the target position. And Mode 4 is one I added last minute, where the camera will only change rooms when you input 4 into Mode (like a manual check).

I also added it to where the Room Letter always outputs from the bundle, so you can make changes depending on what room the player is currently in. Like in this example, you can now use R to remove the Room you are currently in to show off the functionality. But also for simplicity, you can press T to re-add all the removed room. Whenever the target is outside the rooms, the bundle will output “Out of Bounds”. If the Camera is in Mode 3 (ignore all areas), the bundle will always output “Out of Bounds”.

I also made a few edits to the map for easier testing.
If you have any bug reports, suggestion or thoughts, let me know.
https://flowlab.io/game/play/2117959

5 Likes

Just started using this on one of my games and it works so smoothly
this example is so amazing

@JR01 quick question, will changing the parallax of the camera mess up the system at all?

Parallax should not be connected to the camera system.

2 Likes

The parallax is set to 0. I’m wondering if changing it would mess up how it works.
image

What I meant was that the Parallax is not going to affect anything because it’s just the parallax. Parallax effects are just in the background and should have no effect on foreground objects. They should not effect anything with how the camera follows the player because they are 2 separated systems.

2 Likes

Small update,
The camera bounds are marked as A to Z for 26 zones. But for some users 26 zones is not enough, so I made it now from A to ZZ for 702 zones. Where after using zone Z, it starts as AA, AB, AC, etc.

12 Likes

So good; I have to start using this too!
Incredible work, and if that update was needed, it’s a good sign that people are using it :ok_hand::sparkles:

5 Likes

Small Update

  • Smooth overlapping Transitions
  • Fixed sorting lists bug
  • Cleaner code

I’ve been slowly updating this example depending on requests and bug reports. This example can now handle bounds that overlap and automatically change to the newest room in crossing the overlap. So now the character doesn’t have to be off-screen for the camera to move to the next room (but will if you turn around while in the overlap area). As well, there was a small bug that varied game to game but was mostly hidden. So if you have any issues with this system and it just breaks when importing or when playing on mobile/slower devices or maybe it just fixes on reload, this should be fixed now.

Also a tip, if you have a lot of overlapping areas or having issues with rooms being next to each other, try making triggers to delete and re-add the room letters with the remove and re-add inputs on the bundle.

5 Likes