Skip to content

Make SimpleCharacter more flexible #123

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

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

manuq
Copy link
Contributor

@manuq manuq commented Jul 8, 2024

To allow different movement kinds for different game possibilities. The previous is now the default and named "as top-down". In addition, now "as platformer" and "as spaceship" are available.

The speed is now exposed as a property to prevent the block getting too long with 3 parameters. The speed vector is used differently in each situation:

  • for platformer, Y is the jump speed
  • for spaceship, X is the rotation speed

For platformer, the gravity is read from project settings, but also there is a method to update it.

Remove the gravity custom setting from the project setting, that was added back at some point by mistake.

https://phabricator.endlessm.com/T35549

To allow different movement kinds for different game possibilities. The
previous is now the default and named "as top-down". In addition, now
"as platformer" and "as spaceship" are available.

The speed is now exposed as a property to prevent the block getting too
long with 3 parameters. The speed vector is used differently in each
situation:
- for platformer, Y is the jump speed
- for spaceship, X is the rotation speed

For platformer, the gravity is read from project settings, but also
there is a method to update it.

Remove the gravity custom setting from the project setting, that was
added back at some point by mistake.

https://phabricator.endlessm.com/T35549
@manuq
Copy link
Contributor Author

manuq commented Jul 8, 2024

Grabacion.de.pantalla.desde.2024-07-08.12-31-57.webm

@starnight
Copy link
Contributor

starnight commented Jul 9, 2024

The GDScript part is LGTM. However, should the Pong example's Paddle use the new block Move with {player: OPTION} buttons as {kind: OPTION}, too? Or, that avoids the scene conflict?

Copy link
Contributor

@wnbaum wnbaum left a comment

Choose a reason for hiding this comment

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

Looks good to me, working as expected.

One comment I have is that couldn't these blocks just be dropdowns in the inspector? Like a player dropdown and a movement type dropdown as an exported property. The only thing we are really reinforcing with the block scripts is that "movement goes in the physics_process".

I think we really need to think about our target audience, and determine what we want the user to learn from their experience with block coding. I talked to Justin a bit today, and he had similar thoughts - while we want to make the experience fun, we do actually want to teach something about programming. To me this just feels like hiding it away. Things like "set the velocity" and then "moving and sliding" should make sense to high schoolers if explained properly.

What we have here is consistent with the other blocks though, so it seems useful to merge.

@manuq
Copy link
Contributor Author

manuq commented Jul 10, 2024

@starnight thanks, I prevented changing the example for now.

@wnbaum exposing the 3 modes in the Inspector is interesting, we can try that after merge. As per level of abstraction, there are some discussions happening. Justin can formalize that talk you both just had and that will be very appreciated. My understanding from past conversations is that we don't want that lower level "change velocity + move and slide" blocks.

@manuq
Copy link
Contributor Author

manuq commented Jul 10, 2024

I'm going to merge this as the Inspector change can happen after some learning feedback.

@manuq manuq merged commit 60cd9c4 into main Jul 10, 2024
2 checks passed
@manuq manuq deleted the simple-character-improvements branch July 10, 2024 11:12
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.

3 participants