Feature/20250901 flappy bird#24
Conversation
- random pipe generation system; - bird controll; - main scene
|
Did you use AI to make this? I can review the code and give you pointers if you'd like but as it stands I cannot merge this, since the code has many weird errors and oddities. |
Yes, I used AI to assist and speed up some parts of the code. If you could review my PR and provide some feedback, it would help me a lot. Im willing to make any necessary adjustments, I would really like to be able to contribute to the project. |
|
Sure, I'll review it soon. This doesn't guarantee your PR will get merged, however. AI writes lots of garbage and I would recommend learning Godot & GDScript proper to contribute to projects. |
popcar2
left a comment
There was a problem hiding this comment.
I just skimmed the code but these are the biggest issues. Honestly, please don't use AI for coding. Especially in GDScript. People will realize instantly that it's poorly made with many issues.
| @onready var button: Button = $Panel/VBoxContainer/Button | ||
|
|
||
| func _ready() -> void: | ||
| label_title.text = "Flappy Pixel" |
There was a problem hiding this comment.
Set the default label text in the labels themselves, not in functions
| button.text = "Start Game" | ||
|
|
||
| func _on_button_pressed() -> void: | ||
| emit_signal("start_game") |
| @export var shadow: PackedScene | ||
| @onready var hud: CanvasLayer = $Hud | ||
| @onready var sfx: Node = $sfx | ||
| @onready var song: AudioStreamPlayer2D = $song |
There was a problem hiding this comment.
Have better node names please, "song" is unclear. Also, it shouldn't be an AudioStreamPlayer2D because that's positional audio.
|
|
||
| func _physics_process(delta: float) -> void: | ||
| if life > 0: | ||
| if (is_on_ceiling() or is_on_wall() or is_on_floor()) and alive: |
There was a problem hiding this comment.
Why check if it's on ceiling/wall/floor?
| if not is_on_floor(): | ||
| velocity.y += gravity * delta | ||
|
|
||
| # Pulo |
| value = -1.0 | ||
| generator_playback.push_frame(Vector2(value, value)) | ||
|
|
||
| func play_coin() -> void: |
| generator_playback.push_frame(Vector2(value, value)) | ||
| await get_tree().create_timer(duration).timeout | ||
|
|
||
| func giorno() -> void: |
| self.rotation += 4 * delta | ||
|
|
||
| move_and_slide() | ||
| if not alive and life == 1: |
There was a problem hiding this comment.
Why would alive be set false when life > 0?
| @export var coin: PackedScene | ||
|
|
||
| @onready var deathScreen: CanvasLayer = $DeathScreen | ||
| @onready var bg: ParallaxBackground = $Background |
| queue_free() | ||
|
|
||
| func _process(_delta: float) -> void: | ||
| position.x -= 1 |
There was a problem hiding this comment.
This is framerate-dependant. Multiply speed by delta. This applies to all your scripts.
This pull request adds Flappy Pixel, a minimalistic Flappy Bird-inspired game where you control a single-pixel bird through pipes while collecting coins. The game combines retro simplicity with responsive gameplay and a fun audio-visual experience. The game is fully integrated into the normal operating system workflow, making it launchable like any standard application.
Key Features
Highlights