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

Add Pong demo #35

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Add Pong demo #35

merged 2 commits into from
Jun 19, 2024

Conversation

manuq
Copy link
Contributor

@manuq manuq commented Jun 15, 2024

And make it the main scene.

The paddles have 2 custom blocks for movement, borrowing from the SimpleCharacter example. But the speed parameter is a Vector2 so the movement can be limited to the Y axis.

The HUD has methods to change the scoring labels. For now a BlockCode node is added to the root node for setting arbitrary score as example.

All components have been copied from Moddable Pong and removing the logic. The ball properties were left for now.

The project window viewport is adjusted to match Moddable Pong. Also the gravity setting was set to zero.

https://phabricator.endlessm.com/T35504

@manuq manuq changed the title WIP WIP Pong example Jun 18, 2024
@manuq manuq force-pushed the pong-score branch 2 times, most recently from 3ba3a92 to dbb7bdd Compare June 19, 2024 01:56
Overriding the native get_class is not supported and raises an error.
Add a method to get either the custom or the native class.
And make it the main scene.

The paddles have 2 custom blocks for movement, borrowing from the
SimpleCharacter example. But the speed parameter is a Vector2 so the
movement can be limited to the Y axis.

The HUD has methods to change the scoring labels. For now a BlockCode
node is added to the root node for setting arbitrary score as example.

All components have been copied from Moddable Pong and removing the
logic. The ball properties were left for now.

The project window viewport is adjusted to match Moddable Pong. Also the
gravity setting was set to zero.
@manuq manuq changed the title WIP Pong example Add Pong demo Jun 19, 2024
@manuq manuq marked this pull request as ready for review June 19, 2024 02:19
Copy link
Contributor

@starnight starnight left a comment

Choose a reason for hiding this comment

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

LGTM!

@starnight starnight merged commit caee3ae into main Jun 19, 2024
2 checks passed
@starnight starnight deleted the pong-score branch June 19, 2024 07:25
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.

2 participants