Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base Layer explanation and adding user's intention #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LuniMoon
Copy link
Contributor

I noticed that the small (but important) notion of "keeping objects on the base layer" disappeared. So, I added it back.

I also changed some words to match user's search and reading intention: following an object vs moving an object, camera vs layer (I changed the word "layers" for "objects" because even if it's technically correct, the intention of the reader is on an object, not on a layer).

I "deprioritised" the use of other extensions like "copy camera settings", but I still included it under the "follow smoothly" section.

I noticed that the small (but important) notion of "keeping objects on the base layer" disappeared. So, I added it back.

I also changed some words to match user's search and reading intention: *following* an object vs *moving* an object, *camera* vs *layer* (I changed the word "layers" for "objects" because even if it's technically correct, the intention of the reader is on an object, not on a layer). 

I "deprioritised" the use of other extensions like "copy camera settings", but I still included it under the "follow smoothly" section.
@vercel
Copy link

vercel bot commented Mar 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gdevelop-wiki ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2023 0:17am


!!! tip

Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide.
Make sure that the character, enemies and platforms on the project are placed on the "Base Layer" on the layer panel. If the issue persist, ask the community on the [forum](https://forum.gdevelop.io/t/camera-not-following-character/45356).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Make sure that the character, enemies and platforms on the project are placed on the "Base Layer" on the layer panel. If the issue persist, ask the community on the [forum](https://forum.gdevelop.io/t/camera-not-following-character/45356).
Make sure that the character, enemies and platforms on the project are placed on the "Base Layer" on the layer panel. If the issue persists, ask the community on the [forum](https://forum.gdevelop.io/t/camera-not-following-character/45356).

@D8H
Copy link
Contributor

D8H commented Mar 31, 2023



## Move several layers together
Copy link
Contributor

@D8H D8H Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an important part of the actual solution. It should not be too far in the doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you're right.
Tho, I read the article as someone which issue is simple (a basic, beginner's issue): I wanted to follow a single character, with a single camera, and because I come from design (we're very methodical and organised with layers) I had multiple layers with objects (background, base layer, foreground).
So, after learning that all i needed to do was to place my platform (on background) on the base layer along with my character, my issue was fixed. So, the information of knowing how to move several layers together wasn't valuable for me. That's why I moved it to the bottom (true, I've been reading with my use case in mind, so I'm ignorant of others).

I'm starting to be afraid that the article might be failing to resolve the issue (and the reason why we're doing documentation efforts): users struggle to self-diagnose the issue they're experiencing, and feel they have to "guess" from the (so perceived) isolated answers on the web.
I do wonder if the structure of the article should be:

  • Which extension to use, and how to install it (done on the first chunk)
  • Why are layers a camera, and how do they work? (I tried to address this on the tooltip)

Ending the article here could theorically cover the basics but as we've observed, there can be different intentions on this single title (I wonder if they should be H2 on the article), such as...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Why are layers a camera, and how do they work? (I tried to address this on the tooltip)

This is the role of this other page:

  • Simply following a platformer object (keeping it simple on the base layer)

Using only one layer is not a simple solution, it's a just bad solution.

Some platforms and decorations need to be behind the player. If they are on the same layer, new platforms will be added on top of the player. The creator will need to change the z-order of the character each time there is something new and setting the player a big z-order won't cut it because new instances will always be the maxiumum z-order + 1.

Even for a very basic game, not using layers is a ticket to an UX hell.

image

It can be a new section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I know the existence of the Layers and Cameras wiki (it's included in one of the tooltips).
As for the layers, I see what you're saying: for changing Z positioning, I'd like to eventually merge layers with instances.
But for layer usage, like I said, I am very methodical with my layers, so I did separate them on my project as follows: backgrounds, base layer (in which I had my platform) character, and foreground. I had my character in my "character" layer, not on "base layer". After some help from y'all, I moved my character to the "base layer" but not the platform in which it was standing (which caused my character to float in the middle of the scene). My problem was there.

Tristan did suggested adding an extension called "copy camera position" (or something like that) but: 1. I got annoyed that I had to add yet another extension (I wonder if this is what a user meant by "relying too much on extensions"), 2. I didn't understand why I had to copy other camera's possitions.

So, maybe the solution is partially there: instead of giving them a "fake solution" (keeping most of the graphics on the base layer), pointing them to the "proper solution" -> creating a link to another article on why and how to copy camera position to follow a single camera. 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I know the existence of the Layers and Cameras wiki (it's included in one of the tooltips). As for the layers, I see what you're saying: for changing Z positioning, I'd like to eventually merge layers with instances. But for layer usage, like I said, I am very methodical with my layers, so I did separate them on my project as follows: backgrounds, base layer (in which I had my platform) character, and foreground. I had my character in my "character" layer, not on "base layer". After some help from y'all, I moved my character to the "base layer" but not the platform in which it was standing (which caused my character to float in the middle of the scene). My problem was there.

This advice was to give you the shortest way to have something that works. It's fine to give this advice to someone that is lost as a temporary solution. It's not fine in an official documentation.

Tristan did suggested adding an extension called "copy camera position" (or something like that) but: 1. I got annoyed that I had to add yet another extension (I wonder if this is what a user meant by "relying too much on extensions"), 2. I didn't understand why I had to copy other camera's positions.

Layers can be copied just like this, but Tristan's extension make it easier to do. I think it's better in an extension because it avoids to have a lot of actions that almost do the same thing directly in the engine (which could be overwhelming for beginners).
image

So, maybe the solution is partially there: instead of giving them a "fake solution" (keeping most of the graphics on the base layer), pointing them to the "proper solution" -> creating a link to another article on why and how to copy camera position to follow a single camera. 🤷

The existing page has a section for this "Move several layers together".

The **Action** should look like this:
To get closer to the character with the camera (zoom-in), use the action **Move camera closer**.

### Follow several objects together
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original title was "Move several layers together". The new one doesn't mean the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't.
The title of the article says "follow an object with a camera", so I wondered if "follow several objects together" wouldn't be better and closer to the original intention, to let the reader know what they'll achieve (instead of how to do it?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't. The title of the article says "follow an object with a camera", so I wondered if "follow several objects together" wouldn't be better and closer to the original intention, to let the reader know what they'll achieve (instead of how to do it?).

It explains how to make several layer cameras follow 1 object (as if layers were glue together).
Making 2 cameras follow 2 objects is something else and would required a split screen.

Focusing on a "One size fits all use cases" article.
Copy link
Contributor Author

@LuniMoon LuniMoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to read and respond to comments.
Tried to make changes on the original text based on comments.



## Move several layers together
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you're right.
Tho, I read the article as someone which issue is simple (a basic, beginner's issue): I wanted to follow a single character, with a single camera, and because I come from design (we're very methodical and organised with layers) I had multiple layers with objects (background, base layer, foreground).
So, after learning that all i needed to do was to place my platform (on background) on the base layer along with my character, my issue was fixed. So, the information of knowing how to move several layers together wasn't valuable for me. That's why I moved it to the bottom (true, I've been reading with my use case in mind, so I'm ignorant of others).

I'm starting to be afraid that the article might be failing to resolve the issue (and the reason why we're doing documentation efforts): users struggle to self-diagnose the issue they're experiencing, and feel they have to "guess" from the (so perceived) isolated answers on the web.
I do wonder if the structure of the article should be:

  • Which extension to use, and how to install it (done on the first chunk)
  • Why are layers a camera, and how do they work? (I tried to address this on the tooltip)

Ending the article here could theorically cover the basics but as we've observed, there can be different intentions on this single title (I wonder if they should be H2 on the article), such as...

Treated observations and comments.
Copy link
Contributor Author

@LuniMoon LuniMoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.
I dunno what to do next lol (GitHub si confusing).

Learn more about [layers and cameras](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras) and [how to keep UI objects on screen](/gdevelop5/tutorials/keep-ui-on-screen).
GDevelop [assigns a single camera per layer](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras). It is recomended to start by placing the main objects o the "Base Layer", and add other layers after.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o[n] the "Base Layer"
recom[m]ended

Typo

It is recommended to start by placing the main objects o the "Base Layer"

It's not, users can use the "Base Layer" for UI if they want to.

GDevelop [assigns a single camera per layer]()

It doesn't give an indication of what the linked page could be and the purpose of linking the page is not to repeat ourselves. What if layer can have several camera one day? We probably don't want to change 36 pages.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recomended > recommended

## You might be interested in:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This title is meaningless.

@D8H
Copy link
Contributor

D8H commented Apr 7, 2023

I can't review the changes because sections order has been changed which make impossible to see what has really changed.
Can the sections order be changed in another PR?

@LuniMoon
Copy link
Contributor Author

New version to better work with sections: #59

@LuniMoon LuniMoon closed this Apr 11, 2023
@D8H D8H reopened this Apr 11, 2023
Moving the sections to match the Wiki page.
Copy link
Collaborator

@Bouh Bouh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -11,36 +11,43 @@ This article includes instructions for implementing this functionality either wi

!!! tip

Learn more about [layers and cameras](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras) and [how to keep UI objects on screen](/gdevelop5/tutorials/keep-ui-on-screen).
GDevelop [assigns a single camera per layer](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras). It is recomended to start by placing the main objects o the "Base Layer", and add other layers after.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GDevelop [assigns a single camera per layer](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras). It is recomended to start by placing the main objects o the "Base Layer", and add other layers after.
GDevelop [assigns a single camera per layer](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras). It is recomended to start by placing the main objects on the "Base Layer", and add other layers after.


!!! tip

Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide.
Learn [how to install](https://gdevelop-wiki-git-fork-lunimoon-patch-2-gdevelop.vercel.app/gdevelop5/extensions/search/) new extensions by following a step-by-step guide.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add this kind of links https://gdevelop-wiki-git-fork-lunimoon-patch-2-gdevelop.vercel.app/.
This is a generated link based on a version of your fork (the edits that you're doing for this PR).
Instead you should use a link starting by /gdevelop5/.....

in other words the previous version before the edit was correct.

Suggested change
Learn [how to install](https://gdevelop-wiki-git-fork-lunimoon-patch-2-gdevelop.vercel.app/gdevelop5/extensions/search/) new extensions by following a step-by-step guide.
Learn [how to install](/gdevelop5/extensions/search) by following a step-by-step guide.


Games can contain a lot of objects and using several layers is a good solution to organize a project. All layers (except for UI layers) should likely be moved the same way when a character is followed.
To follow a single object with different layers (each layer has a single camera), install the **[Copy camera settings](https://wiki.gdevelop.io/gdevelop5/extensions/copy-camera-settings/)** extension. It allows to copy the main camera's position to a secondary camera.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To follow a single object with different layers (each layer has a single camera), install the **[Copy camera settings](https://wiki.gdevelop.io/gdevelop5/extensions/copy-camera-settings/)** extension. It allows to copy the main camera's position to a secondary camera.
To follow a single object with different layers (each layer has a single camera), install the **[Copy camera settings](/gdevelop5/extensions/copy-camera-settings/)** extension. It allows to copy the main camera's position to a secondary camera.


To configure the camera to center on an object, go to the [event sheet](https://wiki.gdevelop.io/gdevelop5/events) and **add an Action** *(no need to set a Condition)* called **"Center the camera on an object"**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To configure the camera to center on an object, go to the [event sheet](https://wiki.gdevelop.io/gdevelop5/events) and **add an Action** *(no need to set a Condition)* called **"Center the camera on an object"**.
To configure the camera to center on an object, go to the [event sheet](/gdevelop5/events) and **add an Action** *(no need to set a Condition)* called **"Center the camera on an object"**.

## You might be interested in:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## You might be interested in:

Copy link
Collaborator

@Bouh Bouh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a review. See the recommended changes above ☝️ .

The preview of this PR is visible here:
https://gdevelop-wiki-git-fork-lunimoon-patch-2-gdevelop.vercel.app/gdevelop5/tutorials/follow-player-with-camera/#you-might-be-interested-in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants