Skip to content

Conversation

starnight
Copy link
Contributor

Copy moddable-platformer to game-03, but detach GDscripts basically.
However, to make player move and collect coins, add some Block Coding
blocks to implement the behaviors. Besides, the player uses A & D keys
to walk left & right and W key for jumping.

This is not a beginning step as the baseline. More features will come
later.

https://phabricator.endlessm.com/T35632

@starnight starnight requested a review from manuq September 5, 2024 10:24
Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

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

Nice start!

For keeping the demo simple, please remove the modding assets. Leave a single "skin" for the level and for the player.

Some observations from playing:

  • The enemies don't hurt the player and they stay in the same position. Is this work in progress? Or was it a limitation you found in the block coding?
  • The HUD looks too big and the label "Press any key..." is cut. This project has a window size that is 1/2 of the moddable platformer. So you can probably scale it.
  • The label "Press any key..." stays after I press a key that's not Enter (UI Accept). So please change the text to "Press Enter to start" or remove it.
  • The camera has too much zoom, so the platforms around can't be seen before jumping.
  • There is an issue with the collision between the player and the platform. Sometimes the legs are inside the platform.
@@ -0,0 +1,37 @@
# Godot Minigames
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the docs from the moddable platformer? Instead use this template:

# [game title] ## About [What is this game about? Describe the goal and the challanges.] ## Implementation [Please describe how you managed to implement this without a single line of GDScript. Which blocks were useful? Which editor features and nodes? Have you found interesting ways of using the current blocks? Have you been surprised by something that required no programming at all in Godot?] ## Limitations found [What had to be workarounded and should be easier? What wasn't possible? Which blocks were you missing?] 
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure. Delete it first. Will add the README.md back after the game development reaches a milestone.

@@ -0,0 +1,21 @@
# Available modifications
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@manuq
Copy link
Contributor

manuq commented Sep 5, 2024

One more thing: You added a "move and slide" block below "move with player buttons". But the "move with player buttons" is already calling move_and_slide(). Check addons/block_code/blocks/input/characterbody2d_move.tres.

@starnight starnight marked this pull request as draft September 6, 2024 04:15
Copy moddable-platformer to game-03, but detach GDscripts basically. However, to make player move and collect coins, add some Block Coding blocks to implement the behaviors. Besides, the player uses A & D keys to walk left & right and W key for jumping. This is not a beginning step as the baseline. More features will come later. https://phabricator.endlessm.com/T35632
For keeping the demo simple, drop the modding assets. Leave a single "skin" for the level and for the player. https://phabricator.endlessm.com/T35632
Drop original coins and lives label/information. Because Block Coding's block cannot access the label's text, nor generate node dynamically. Use the simple_scoring node instead. Blocks can modify scores' values. Use left score as collected coins and right score as lives. Then, define collect_a_coin and decrease_a_life methods accordingly. Also, tweek the HUD's scale to fit in the viewport. https://phabricator.endlessm.com/T35632
Invoke collect_a_coin when player enters a coin to update collected coins information. https://phabricator.endlessm.com/T35632
@starnight starnight force-pushed the T35632-create-platformer-demo branch from ea7c009 to 33f2b8d Compare September 6, 2024 10:57
Invoke decrease_a_life when player enters an enemy to update lives information. https://phabricator.endlessm.com/T35632
Invoke decrease_a_life when player drops into dangerzone to update lives information. https://phabricator.endlessm.com/T35632
@starnight starnight force-pushed the T35632-create-platformer-demo branch from 33f2b8d to 321d980 Compare September 9, 2024 10:36
This demo uses the Block Coding's blocks. So, disconnect original nodes' signal. Fixes: commit af48d57 ("game-03: Copy moddable-platformer to game-03") https://phabricator.endlessm.com/T35632
Have two AnimatedSprite2D nodes: flag down & up. Hide the down flag and show up flag when the player reaches the flag. https://phabricator.endlessm.com/T35632
…& collects >= 19 coins Add a coins variable in the flag's BlockCode node and add the flag node into HUD group. Define collect_a_coin method which increases the coins variable, just like the simple_score's BlockCode node. It will be invoked when the player enters a coin, too. Then, only raise_flag and show_win when the player reaches the flag and collects more, or equal 19 coins. Here are 19 coins in the game. https://phabricator.endlessm.com/T35632
Have a Tutorial label showing the moving keys. And, add is_playing variable into player's BlockCode node as a gate before start the game. https://phabricator.endlessm.com/T35632
Introduce reset_player method into the player's BlockCode node. It will be invoked when decrease_a_life. https://phabricator.endlessm.com/T35632
Add the HitArea node into the player and set its collision layer & mask properly. Then, use the "on body entered" to check if an enemy enters into the player's HitArea. Finally, invoke the body's vanish_enemy method which comes from the enemy to vanish the enemy. https://phabricator.endlessm.com/T35632
Attach AnimationPlayer node to the enemy and add a move track to set start and end postions. Also, play the move track in wrap loop as patrol. https://phabricator.endlessm.com/T35632
@starnight starnight force-pushed the T35632-create-platformer-demo branch from 321d980 to bfe8629 Compare September 10, 2024 08:02
@starnight starnight marked this pull request as ready for review September 10, 2024 08:03
@starnight starnight requested a review from manuq September 10, 2024 08:03
@manuq manuq merged commit 5cf6658 into main Sep 10, 2024
@manuq manuq deleted the T35632-create-platformer-demo branch September 10, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants