Hawk Hill Manor
Proof-of-Concept: Lumberjack Hut is built from Foundations.
Builder collects Materials, then Builds Hut.
Needs more testing, but base idea works
Hawk Hill Manor
Proof-of-Concept: Lumberjack Hut is built from Foundations.
Builder collects Materials, then Builds Hut.
Needs more testing, but base idea works
Ich habe mal etwas zum Thema "Atomic #Design" und #Godot verfasst: https://godot-kurs.de/atomic-design-godot/
Teilt gerne mal eure Meinung mit mir :). Wie setzt ihr euer #UI in euren #Spielprojekten um?

Dieser Ansatz beschreibt ganz grob zusammengefasst die Praxis, UI Komponenten "atomar" aufzubauen. Bedeutet, dass eine UI Komponente eine klare Funktion erfüllt. Effektiv sind das auch die bezeichnenden "Atome" gemäß dieses Ansatzes. Moleküle bilden sich aus dem Zusammenschluss von mindestens 2 Atomen, während sich ein Organismus aus Molekülen zusammensetzt usw. Im
I wish this would work in #Godot, for small local definitions. I dislike having too many tiny source files in my project.
«Колесо фортуны» или выбираем куда сходить на каникулах с помощью Godot 4 и API сервиса афиши
Если на минуту задуматься, великая это вещь - колесо. Человечество значит разок его попробовало и все. Подсело. Теперь почти ни дня без колеса. Завертелось всё, закрутилось, как хоровод вокруг новогодней ёлки. Так и я намедни сделал для семейных развлечений свою вариацию на тему игры «Поле чудес», а в поле чудес кто главный герой? Нет, нет, отнюдь не «импозантный мужчина в усах». Я имел в виду – красавец барабан. А барабан это что? Правильно, барабан – колесо. Поэтому, один раз научившись вращать двухмерное колесо в игре на движке Godot я уже не смог остановиться. Захотелось мне это колесо еще где-нибудь использовать на благо прогрессивного человечества. А тут как раз каникулы длинные нарисовались. И чтобы не было соблазна все выходные сидеть в теплых светодиодных лучах монитора, я сделал простенькое колесо фортуны, которое поможет мне с выбором занятия на день. И как всегда готов поделится результатом с вами.
Me: How do I code NPC Behaviour in Godot?
Replies: Ah, you mean NPC AI? Are you wanting Chat-GPT-based NPC dialog options, or a Claude-style code-assistant?
:(
Hawk Hill Manor
Cannot get my head around my Worker State Machine.
Doesn't help that I haven't touched it for a couple of months.
I don't like how monolithic it is, but can't see how to avoid a load of Inherited Classes, with almost-identical State Machines.
Any advices, or pointers to resources on how to get my Colony-Builder NPCs to do what they're supposed to?
I've glanced at Behaviour Trees, but they seem no less complex
Hawk Hill Manor
I've got the basics of a Colony Builder, but one thing I'm missing is having Buildings get Constructed. Currently, you click Build, and it appears, fully functional, and the Cost is removed from your Supplies
I'm interested in how to have a Building appear as Foundations and have Builders bring materials and take time to construct it.
Does anyone have hints/advice??
How to tween a shader in Godot ✨
#godotengine #MadeWithGodot #tip #Shader #Gdscript #Tween #Animation #Meme
Did you know you can pass script types around in #gdscript and use them as normal variables? Just have give a class_name to your script and it's ready to go!
It doesn't quite work like generics would in other languages, but at least you can get an object's script and compare it.
I don't know if it's possible to do it with built-in classes though...
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")sort_custom() that makes it a lot simpler.