#GDScript

2025-12-11

I'm learning programming :3

Here's a thing I made. It sorts high scores for a local leaderboard. It must follow a
[[HISCORE, DATETIME, NAME], [...], [...]] format (or at least the first two items must be high score and date-time).

class LeaderboardSort:
	## Sorts duplicate scores prioritizing the earlier datetime.
	static func sort_duplicate_scores(a, b) -> bool:
		if a[1] < b[1]:
			return true
		return false

	## Sorts scores.
	static func sort_scores(a, b) -> bool:
		if a[0] > b[0]:
			return true
		return false


## Sorts the leaderboard array from highest to lowest score and handleds duplicate scores.
## Leaderboard array must be arranged like so: [HISCORE, int(Time.get_datetime_string_from_system(true)), "PLAYER_NAME"]
func sort_leaderboard(lb: Array) -> void:
	lb.sort_custom(LeaderboardSort, "sort_duplicate_scores") # This one must be done before sort_scores()
	lb.sort_custom(LeaderboardSort, "sort_scores")

It worked out for me! Let me know if there are any errors.

Looking up "godot leaderboard" online yielded a whole lot of nothing. There was SilentWolf and SimpleBoards, but a whole plugin to just do high score sorting seemed over the top to me. So, I decided to try to make a high score sorter myself. Thankfully, Godot has
sort_custom() that makes it a lot simpler.

No idea what "static" functions do or what separates them from regular functions, but the Editor was telling me they gotta be static. I looked it up and the explanations aren't that helpful.

#godot #gdscript #gamedev #indiedev #lambgamedev

2025-12-09

quién me mandaría a mi ponerme a traducir un plugin de #Godot de #CSharp a #GDScript

2025-11-24

Gosh, wordpress php dev reveals the yawning abyss of dev stuff when cmp to Godot. I can only wish for gdscript levels of awesome rn. Php in codium is actual hell.
#php #godotengine #wordpress #gdscript

2025-11-21

Hawk Hill Manor
Initial Junk Placement is randomised
Supernatural Disasters are unpredictable
Gatherable placement changes
Advanced Building Unlocks <not implemented> are procedurally assigned

Did I do a roguelike?!?

#godot #godotengine #gamedev #gdscript #roguelike #rougelight

Screenshot from game
Landscape has dead trees and detritus scattered all over, and many industrial buildings
Left: Railway
Right (background): The Three Sisters hill
Background: Hawk Hill Manor House

UI:
Right - City Inventory
Bottom: Build Buttons
2025-11-21

Hawk Hill Manor
Stumbling my way through Collision Layers.
Buildings, Workers, Gatherables (and other scenery), Spirits...
They all seem to interact with the NavigationRegion
I've got Raycasts for placing Buildings and Gatherables in unoccupied areas.
I think the Spirit "Blight Aura" is hitting what it is meant to.
Rebaking the navMesh takes far too long, but I don't know how to improve it.
Still lots to solve.

#godot #godotengine #gamedev #gdscript

2025-11-20

Godot Question:
I have a Spirit that floats across the World. it may collide with things, and I want them to react accordingly.
Currently, I just check if it is a tree/field/etc, and call it's "I Got Blighted!" function.
What is the best way to also check for collisions with Buildings, Workers, Etc?
Lots of "If"? How could I Match? Another way?

All advices gratefully received

#godot #gamedev #godotengine #gdscript

Function Code:

func _on_area_3d_area_entered(area: Area3D) -> void:
print (" SPIRIT COLLIDED WITH", area.get_parent().name)
var collided_item = area.get_parent()
if collided item is Gatherable:
print ("Collided with a GATHERABLE")
collided_item.do_blight()]A Spirit floating through a ruined housing area (Crossroads!). A few trees in the background.
2025-11-19

My interactive tween guide for Godot is out !

If you have trouble using tweens, adding "Juice" or picking the right transition, it should hopefully help!

The guide is free and will always be 🩵

qaqelol.itch.io/tweens

Boost and feedback are really appreciated ✨

#Godot #GodotEngine #Free #Guide #Tutorial #GameDev #Dev #GDscript #TechArt #Animation #2D #MadeWithGodot #itchio #Web #Tween

2025-11-15

Hawk Hill Manor
Well, I nearly got my motivation back. but I've run into the wall I built!
Need to decide how to replace destroyed building with ruin. I think having each building know what its Ruin is works best, or I could Match it's Group and decide there.
Or...
or...

I also need to Blight any non-Blighted Gatherables when a Spirit moves over them.

Lots to think on.

#gamedev #godot #godotengine #gdscript

2025-11-14

Hawk Hill Manor
Finally fixed movement code. Citizens rehome if House is destroyed.
Haven't figured what to do when rh homeless yet. Probably send them to The Manor House.
Next, replace destroyed building with ruins and swap inventory.

#gamedev #godot #godotengine #gdscript

2025-11-13

Hawk Hill Manor
Got most of the re-housing code working.
Broken the movement code.
Not sure why Workers don't want to go to their House.
Logs show that they know where it is, but Navigation finishes instantly, before they move, and then they go to work.
Very Odd indeed.

#gamedev #godot #godotengine #gdscript

2025-11-13

Hawk Hill Manor
After spending two days rewriting the Logic and tracing why everyone lived in the same hotel room, I eventually found the typo!
Now I can continue with the "Destroy Building" section.

#gamedev #godot #godotengine #gdscript

2025-10-31

All Hallows' Eve seems like a good time to get stuck in to my Spooky disasters for Hawk Hill Manor.
But I'm tired, and losing all motivation for it.
Code is sprawling all over the place. I've tried to keep it tidy, but it keeps bloating, and I don't even know what it should look like.
Several parts need a major rewrite.
I need proper art/assets to replace my placeholders.

:(

#gamedev #godotengine #godot #gdscript

2025-10-28

What's this? A strange spirit appearing from the Mines, and drifting towards a random building?
Is it blighting crops and trees along it's route? (not yet)
What will happen when it arrives? (plan: destroy some Inventory)
How can the good folk of Hawk Hill defend against it? (no idea! Maybe they should have listened to the tales about The Three Sisters, and the dread fate that befalls any who disturb them!)

#godot #godotengine #gamedev #gdscript

Screenshot from game
Hawk Hill Manor looms large in the background, while a dark spirit drifts across the landscape.
Dead trees and detritus litter the area
2025-10-26

Hawk Hill Manor
Food production and distribution (mostly) working. Deliverer occasionally wanders off to (0,0). Not sure why - probably "cannot reach destination".
Hungry Workers don't suffer any debuffs as yet, but do need to walk home and eat. Tactical placing of Houses might be important - no option to rehouse Workers (yet).
Next - Spooky Problems.

#gamedev #godot #godotengine #gdscript

2025-10-24

Hawk Hill Manor
Can't get Deliveroo Driver to take Meals to Houses!
They collect from Warehouse, go to Hut, and then go back to Warehouse!
Need to dive deeper into Spaghetti Logic!

(Haven't implemented Workers getting hungry yet, luckily, or they could be in trouble!)

#godot #godotengine #gamedev #gdscript

2025-10-24

Hawk Hill Manor
The first hauler seems to face the correct direction, but then others are all rotated! :(

They are supposed to face the direction of travel:

func do_move():
var target_pos = nav_agent.get_next_path_position()
var direction = global_position.direction_to(target_pos)
velocity = direction * walk_speed

rotation.y = Vector2(velocity.z, velocity.x).angle()
move_and_slide()

What's going on?

#godot #godotengine #gdscript #gamedev

2025-10-23

Hawk Hill Manor
Added Haulers to collect finished goods from Huts, rather than wait for the Hut Workers to fill their inventory and then spend valuable Working time delivering to Stockpiles.
It's a bit janky, and occasionally 2 haulers follow each other around the map, or roam miles to collect minimal supplies, but the concept seems sound

#godot #godotengine #gamedev #gdscript

Tyler Parkertylerparker
2025-10-22
2025-10-21

Reverted to Godot 4.4, and although I still get navigationmesh error, the pathfinding seems to work now.
Still no idea what is causing the error, or why the pathfinding failed, but I might be able to move on with the project now.
Maybe.
If it doesn't decide to randomly bork something .

#godot #godotengine #gdscript #gamedev

2025-10-21

🌻 Working on a demo for my interactive Tween Guide (it will be free dont worry) 🌻

Using Line2D and tween_method uwu

#Godot #GodotEngine #Tween #Wip #GameDev #DigitalArt #UI #Sunflowers #GDScript #Animation #Guide #Resource #Cute

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst