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

Chapter 03, some things are unclear #3

Open
singalen opened this issue Aug 11, 2020 · 3 comments
Open

Chapter 03, some things are unclear #3

singalen opened this issue Aug 11, 2020 · 3 comments

Comments

@singalen
Copy link

singalen commented Aug 11, 2020

  • Why should [0, 0] translate to to Vector2(100, 100), but START_X/START_Y have different values? Do they have a different meaning? What do they mean then, and why introduce but not use them?
  • It would be nice to add a comment to vector_to_array with a couple of examples, which coordinates should translate to which.
  • It's unclear why index_to_vector has 4 arguments, when only 2 are sufficient. What are the other two for?
  • Ditto about a comment.
  • What are sprite groups and what groups of objects require different groups?
  • Also, it would be nice to offer a way to duplicate the 2D scenes. Duplicating them in the MainScene editor doesn't let you edit them afterwards.
@Bozar
Copy link
Owner

Bozar commented Aug 11, 2020

Hi, I need some time to answer these questions. Probably by the end of this week. (8/16/2020)

@singalen
Copy link
Author

Thank you! No rush, I have got past them. It's rather a pointer to where the tutorial text may be improved.

@Bozar
Copy link
Owner

Bozar commented Aug 14, 2020

I have updated the tutorial and here are the short answers.

  • Why should [0, 0] translate to to Vector2(100, 100), but START_X/START_Y have different values? Do they have a different meaning? What do they mean then, and why introduce but not use them?
  • It's unclear why index_to_vector has 4 arguments, when only 2 are sufficient. What are the other two for?

Vector2(100, 100) is an example which has no special meanings. A sprite in the top left corner on the imaginary dungeon board is showed at Vector2(START_X, START_Y) on the screen. These two constants are used in vector_to_array() and index_to_vector().

If we want to show a sprite that is slightly away from the center of a dungeon board grid, we use x_offset and y_offset to move the sprite by pixels.

  • What are sprite groups and what groups of objects require different groups?

Group is a powerful tool in Godot. It acts like a tag that you can attach to a sprite.

  • Also, it would be nice to offer a way to duplicate the 2D scenes. Duplicating them in the MainScene editor doesn't let you edit them afterwards.

To duplicate a scene as another .tscn file, first select the original scene in FileSystem tab in Godot engine. Press Ctrl+D or right click the scene and select Duplicate... in the drop down menu. Give the new scene a different name and save it.

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

No branches or pull requests

2 participants