-
Notifications
You must be signed in to change notification settings - Fork 2
Update plugin & add GodotCon demo #19
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copied from game-01
max_polyphony is set to 10 for ding & pew to allow overlapping sounds since if you happen to collect two coins in quick succession the previous sound may still be playing when the next one starts. But we never crash twice so that one has the default max_polyphony of 1.
Obstacles now move towards the left. No gravity is applied. The ship collides with the obstacle.
The image doesn't loop properly but we can fix that later.
When obstacles scroll off the left screen, they fall into a new deadzone where we detect the collision and remove them.
Instead we will use the built-in blocks to load a sound by path and play it by name
The BackgroundMusic node should have its Autoplay property set to start the music when the game starts. I haven't done this because it's so annoying in development. We have no blocks for AudioStreamPlayer nodes so we can't call stop on the track, but we can just remove the player from the scene.
(cherry picked from commit b496173)
This was a runner, like game-06. But it predated SimpleSpawner, so used animations to make the obstacles fly past. game-06 is a more exemplary example of the same concept, using newer plugin features.
Remove game-01
Nothing too difficult here. https://phabricator.endlessm.com/T35698
Port split-screen to current plugin version
To latest Block Coding plugin version. Changes: - Node blocks are used for calling methods when possible. - The remaining groups are now global (and thus shared with the other demos). These are used for calling the same method in multiple nodes or for a single node in a different scene. The game should play as before. An upcoming change will use the new SimpleSpawner for the blasters. https://phabricator.endlessm.com/T35693
Update Space Ship top-down demo
The Block Code plugin has been updated to newer one which is not backward compatible. So, update the Platformer accordingly.
Use Sprite2D as the frames holder and AnimationPlayer to play idle, walk_right, walk_left, jump_up and jump_down animations. Also, defined methods be_idle, walk_right, walk_left, jump_up and jump_down in the BlockCode of the AnimationPlayer. They can be invoked by the player's action.
Thanks to the new Block Coding plugin providing access the node's method feature. This commit uses it to play the AnimationPlayer's shake animation by invoking the the Block node's play_shake method of the AnimationPlayer node.
Play the hit animation of the AnimationPlayer node when reset the player.
Drop AnimatedSprite2D node from player scene. It was the reference of the new AnimationPlayer node.
Previously the RESET track also wobbled the platform. With this change, the RESET track restores the platform's position to (0, 0).
If the player does not move, then there is no need to check it is on the floor, nor velocity of y direction. Use the "else if" condition to avoid further check which improves performance.
Rebase the platformer demo agaist the new plugin
This was mainly a direct reimplementation of each BlockCode program, with a few tweaks. I had to make the Ball group global so that it shows up in the “[something] is in group [group ▼]” dropdown. I also added an extra Reset method on the "Bump!" label to hide it when the game resets, calling it directly with "call [method] on [node]". The code that plays one of 5 sounds at random when the ball hits a pin previously relied on being able to pass an int as the "sound name" parameter, which would for some reason I didn't bother digging into would previously cause a str() conversion to be inserted, but now does not. ```gdscript func _on_body_entered(body: Node2D): if body.is_in_group('Ball'): PinSound = randi_range(1, 5) var __sound_node_1 = get_node(str(PinSound)) # ... ``` So instead I use a chain of conditionals that compiles to: ```gdscript func _on_body_entered(something: Node2D): if ((something).is_in_group('Ball')): PinSound = randi_range(1, 5) if PinSound == 1: var __sound_node_1 = get_node('1') # ... elif PinSound == 2: # ... ``` This is a bit wordier than what was there before but it works. It would be nice to have a way to define a local variable rather than a property of the node, but it's not the end of the world. https://phabricator.endlessm.com/T35697 JJ: M game-04/main.tscn JJ: M game-04/pin.tscn JJ: M project.godot
Port Pachinko to current plugin version
This backs out commit 3ede4ed. All other games are now functional again. https://phabricator.endlessm.com/T35683
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://phabricator.endlessm.com/T35683