From 9ffc1601b83c808188fb74b3337154ca117889eb Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 9 May 2023 03:33:50 -0600 Subject: add new blog post and update flappybird post --- live/blog/g/flappybird_godot_devlog_1.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'live/blog/g/flappybird_godot_devlog_1.html') diff --git a/live/blog/g/flappybird_godot_devlog_1.html b/live/blog/g/flappybird_godot_devlog_1.html index 8667e0f..95d4eb4 100644 --- a/live/blog/g/flappybird_godot_devlog_1.html +++ b/live/blog/g/flappybird_godot_devlog_1.html @@ -98,7 +98,7 @@

The game was originally developed with Godot 4.0 alpha 8, but it didn’t support HTML5 (webassembly) export… so I backported to Godot 3.5 rc1.

Not going to specify all the details, only the needed parts and what could be confusing, as the source code is available and can be inspected; also this assumes minimal knowledge of Godot in general. Usually when I mention that a set/change of something it usually it’s a property and it can be found under the Inspector on the relevant node, unless stated otherwise; also, all scripts attached have the same name as the scenes, but in snake_case (scenes/nodes in PascalCase).

One thing to note, is that I started writing this when I finished the game, so it’s hard to go part by part, and it will be hard to test individual parts when going through this as everything is depending on each other. For the next devlog, I’ll do it as I go and it will include all the changes to the nodes/scripts as I was finding them, probably better idea and easier to follow.

-

The source code can be found in my GitHub here, it also contains the exported versions for HTML5, Windows and Linux (be aware that the sound might be too high and I’m too lazy to make it configurable, it was the last thing I added), or you could also go to the itch.io page I setup where it’s playable in the browser:

+

The source code can be found at luevano/flappybird_godot#godot-3.5, it also contains the exported versions for HTML5, Windows and Linux (be aware that the sound might be too high and I’m too lazy to make it configurable, it was the last thing I added), or you could also go to the itch.io page I setup where it’s playable in the browser:

Table of contents

@@ -352,7 +352,7 @@

This is the final scene where we connect the Game and the UI. It’s made of a Node2D with it’s own script attached and an instance of Game and UI as it’s children.

This is a good time to set the default scene when we run the game by going to Project -> Project settings… -> General and in Application/Run set the Main Scene to the Main.tscn scene.

Scripting

-

I’m going to keep this scripting part to the most basic code blocks, as it’s too much code, for a complete view you can head to the source code.

+

I’m going to keep this scripting part to the most basic code blocks, as it’s too much code, for a complete view you can head to the source code.

As of now, the game itself doesn’t do anything if we hit play. The first thing to do so we have something going on is to do the minimal player scripting.

Player

The most basic code needed so the bird goes up and down is to just detect jump key presses and add a negative jump velocity so it goes up (y coordinate is reversed in godot…), we also check the velocity sign of the y coordinate to decide if the animation is playing or not.

@@ -750,7 +750,7 @@ func _ready() -> void:

By David Luévano

Created: Sun, May 29, 2022 @ 03:38 UTC

-

Modified: Thu, May 04, 2023 @ 18:26 UTC

+

Modified: Tue, May 09, 2023 @ 08:28 UTC