r/godot • • 21h ago

help Godot Documentation is confusing to me

8 Upvotes

so I'm new to godot and game dev in general, and I heard if you have a problem you should search the godot docs. but whenever I try searching for a node or a built-in function for example, it often gives me completely different results than what I was looking for. which ends up confusing me even more and nearly results in a panic attack or sensory overload because of how much information and stuff there is (which for most people is a good thing but for me is very overwhelming). but now sometimes if I were to just google for the thing I need to know, it will give me a direct link to what I was looking for in the godot docs. I've been trying to force myself from using youtube videos for help out of fear of constantly relying on them. but with how confusing the godot docs are to me, idk if I should just give up on learning game dev at this point with how stressed I am because I can't even read the godot docs and with how stupid I am. does anyone have any advice for using to godot documentation without getting overwhelmed and stressed.


r/godot • • 14h ago

help Need help saving data

Post image
0 Upvotes

Hi all, I'm trying to follow along with the godot tutorial for saving a game here: https://docs.godotengine.org/en/stable/tutorials/io/saving_games.html#identify-persistent-objects

Problem is, I am getting an error on the very first part and I'm not exactly sure what I'm doing wrong. All it says is:

Error at (4, 1): Unexpected "for" in class body.

All I really want to do is build a Creature builder calculator tool for Pathfinder 2e so that I don't have to break out the GM Book for all the rules on it(I know, not the norm for a game dev engine, I just wanted to try and make it) that I can put on my phone and mess around with but obviously being able to save the creatures built is kind of important to that xD. Any help or guidance is appreciated!


r/godot • • 17h ago

projects Find the Bishop and the Queen...

Post image
0 Upvotes

Guess where the Bishop and the Queen are based on how many times each square is under attack.
Free game on Android.


r/godot • • 16h ago

help (solved) Signals don't show up in Signals and I give up trying to do it on my own

0 Upvotes

I've been trying to fix this for hours and I am thoroughly tired. I have a scene that functions as the board and other environment that my cards, which are in another scene, will be visibly placed into. The board is the main scene and the board script the signals are in is set as global. I need to provide the information required to determine what visual to give those cards to the card scene, which I am trying to do with two signals triggered when the player or the dealer draws (player_drew and dealer_drew).

I tried putting the signals into a smaller script referring to both other ones but it didn't work so I gave up and just did it in the wrong way by turning the entire script that calculates score and keeps track of the data side of card position in deck and field into a global script.

The signals don't show up in the Signals section no matter what script, scene, or object I select, so I can't even try the double click method.

I emit the signal from the board script in response to a draw occurring, and when I try to connect it to a function on _ready it says that the signal (which I have already declared in a global script attached to the main scene, as a reminder) is not declared. But when I try to declare the signal in the card script, it says it's a duplicate! So it knows it exists, but pretends it doesn't, and I have watched several videos and tried to read the documentation and nothing has worked so I give up. I know it's going to be a stupid error but I can't figure it out on my own.

extends Control

var s52_n:Array[String] = ["Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"]
var s52_s:Array[String] = ["Spades", "Clubs", "Diamonds", "Hearts"]
var suit_increment:int = 0 # I should really comment out these for clarity
var num_increment:int = 0
var baseline52:Dictionary
var current_deck:Dictionary
var unshuffled_deck:Dictionary
var being_shuffled:Array
var player_fielded_cards:Dictionary
var dealer_cards:Dictionary
var cards_in_hand:Dictionary
var player_fielded_aces:int = 0
var dealer_fielded_aces:int = 0
var drawn_card_key:String
var player_total:int = 0
var dealer_total:int = 0
var winloss:Vector2i = Vector2i(0,0) #Win/Loss
var winlossratio:Label
signal player_drew
signal dealer_drew

func _ready()-> void:
  s52_fill()
  rando52()

  var hitmebtn:Button = Button.new()
  hitmebtn.text = "Hit me"
  hitmebtn.pressed.connect(_on_hitmebtn_pressed)
  add_child(hitmebtn)

  var standbtn:Button = Button.new()
  standbtn.text = "Stand"
  standbtn.pressed.connect(_on_standbtn_pressed)
  add_child(standbtn)

  winlossratio = Label.new()
  winlossratio.text = "Win/Loss = " + str(winloss.x) + " : " + str(winloss.y)
  add_child(winlossratio)

func _on_hitmebtn_pressed()-> void:
  player_draw()

func _on_standbtn_pressed()-> void:
  dealer_draw()

func s52_fill()-> void:
  for number:String in s52_n:
    for suit:String in s52_s:
      var new_card_key:String = str(number) + " of " + str(suit)
      baseline52[str(new_card_key)] = Vector2i(num_increment + 1, suit_increment + 1)
      suit_increment += 1
      if suit_increment == 4:
        suit_increment = 0
    num_increment += 1
  num_increment = 0
  for keys:String in baseline52:
    unshuffled_deck[keys] = baseline52[keys]

func rando52()-> void:
  for key:String in unshuffled_deck:
    being_shuffled.append(key)
  being_shuffled.shuffle()
  for oldkey:String in being_shuffled:
    current_deck[oldkey] = unshuffled_deck[oldkey]

func board_reset()-> void:
  player_fielded_cards.clear()
  dealer_cards.clear()
  current_deck.clear()
  being_shuffled.shuffle()
  for oldkey:String in being_shuffled:
    current_deck[oldkey] = unshuffled_deck[oldkey]
  player_total = 0
  dealer_total = 0
  player_fielded_aces = 0
  dealer_fielded_aces = 0

func player_loss()-> void:
    winloss.y += 1
    board_reset()
    winlossratio.text = "Win/Loss = " + str(winloss.x) + " : " + str(winloss.y)

func dealer_loss()-> void:
    winloss.x += 1
    board_reset()
    winlossratio.text = "Win/Loss = " + str(winloss.x) + " : " + str(winloss.y)

func player_draw()-> void:
# Need to do something to prevent clicking draw on an empty deck eventually
  drawn_card_key = current_deck.keys()[0]
  player_fielded_cards[str(drawn_card_key)] = current_deck[drawn_card_key]
  current_deck.erase(drawn_card_key)
  if drawn_card_key.contains("Ace ") == true:
    player_fielded_aces += 1
  player_drew.emit(player_fielded_cards)
  player_score_blackjack()
  print(player_fielded_cards)

func player_score_blackjack()-> void:
  player_total = 0
  for key:String in player_fielded_cards.keys():
    var temp_value:Vector2i = baseline52[key]
    var player_unmodi_value:int
    if temp_value.x <= 10: # make face values 10 and let other values through
      player_unmodi_value = temp_value.x
    else:
      player_unmodi_value = 10
    if temp_value.x == 1:
      player_unmodi_value = 11
    player_total += player_unmodi_value
  if player_total > 21 and player_fielded_aces > 0:
    player_fielded_aces -= 1
    player_total -= 10
  if player_total > 21 and player_total != 0:
    player_loss()

func dealer_draw()-> void:
  drawn_card_key = current_deck.keys()[0]
  dealer_cards[str(drawn_card_key)] = current_deck[drawn_card_key]
  current_deck.erase(drawn_card_key)
  print(dealer_cards)
  if drawn_card_key.contains("Ace ") == true:
    dealer_fielded_aces += 1
  dealer_drew.emit(dealer_cards)
  dealer_score_blackjack()

func dealer_score_blackjack()-> void:
  dealer_total = 0
  for key: String in dealer_cards.keys():
    var dealer_temp_value:Vector2i = baseline52[key]
    var dealer_unmodi_value:int
    if dealer_temp_value.x <= 10:
      dealer_unmodi_value = dealer_temp_value.x
    else:
      dealer_unmodi_value = 10
    if dealer_temp_value.x == 1:
      dealer_unmodi_value = 11
    dealer_total += dealer_unmodi_value
  if dealer_total <= 16:
    dealer_draw()
  if dealer_total > 21 and dealer_fielded_aces > 0:
    dealer_fielded_aces -= 1
    dealer_total -= 10
  elif dealer_total >= player_total and dealer_total <= 21 and dealer_total != 0:
    player_loss()
  elif (player_total > dealer_total and player_total <= 21) or dealer_total > 21 and dealer_total != 0:
    dealer_loss()

Above is the board script, below is the card script. If any of the indentation is wrong, blame reddit for not letting me get it pasted with indentation for 15 minutes so I gave up and did it manually. I am inconsolably pissed off now.

extends Node

const CARD:PackedScene = preload("uid://du5mbf2gqj1tn")

func _ready():
  player_drew.connect(player_draws)
  dealer_drew.connect(dealer_draws)


func player_draws():
  print("hitme") #test
  var card_copy:Node = CARD.instantiate()
  add_child(card_copy)

func dealer_draws():
  print("stand") #test
  var card_copy:Node = CARD.instantiate()
  add_child(card_copy)

r/godot • • 20h ago

help Is it good to use Ai to learn godot and help me build some very simple games

0 Upvotes

I'm a beginner in Godot and game dev in general, and after doing the GDQuest Learn to code from zero, the Brackey's Gdscript tutorial and the Godot docs getting started section. I'm now trying to make small games by myself to learn more and the first one I tried making was a simple Pong game, and I used Claude to help me design its layout, which nodes I should use to build the paddle scene, ball scene, etc and also used Claude to help guide me in how I should code the functionality, etc. Its been helping me quite a lot, like I could've never know I had to use cos or sin to calculate the bounce angle. Or that a function know as move_and_collide existed so I could move my paddle/ball . It even gave me a full roadmap as to how I should develop each thing in my game and how to test if it works

But I'm thinking that if I need this much help to make a simple pong game then have I not learnt enough to start making my own ultra-small games yet ? Do I need to watch YouTube tutorials or read more of the Godot docs to get the knowledge to build a tiny game ?

Do yall think this is alright or that im missing some fundamentals I need to get started ?
(GodotRulz)


r/godot • • 5h ago

free plugin/tool Godot Editor Live Wallpaper Plugin (4.7+)

Thumbnail
gallery
1 Upvotes

A cozy little open source editor plugin that puts a wallpaper behind the Godot editor (a still image, a sprite sheet, or a shader) and makes the panels see-through so you can actually look at it while you work.

Works best with shaders atm (and comes with some default shaders for you to try), but you can use a video to spritesheet converter to get your own video working in it, without having to write complicated shader code.

Everything stays inside the editor. Zero runtime code, zero autoloads, and nothing gets shipped with your game.

It's not perfect, and I still have features lined up for it. Like full control over the theme on a project by project basis without excessive touching of Godot's Editor Theme functionality.

Try it out and let me know what you guys think of it, I just released version 0.5 on the github.

I have only tested this with more modern Godot versions, results may vary with older versions (namely, 4.3 and down since a lot changed in the editor recently)

Get it here with more info:

https://github.com/MAZTN/Godot-Live-Wallpaper-Plugin

(Coming soon to the Asset Store)


r/godot • • 15h ago

help (solved) How to @export a property ?

1 Upvotes

I want to @ export a property of a node , to change in code like (for a verry basic example),

have a @ export var SumPropertyOfANode : Property

func _ready -> void:

Node.SumProperty += 1 #This would help me have a more diverse component


r/godot • • 5h ago

help (solved) 3D newcomer, how would I make this work?

Post image
8 Upvotes

Hey! I've been coding games for quite a while, but I was focused in 2D and 3D still feels a bit painful... But after learning some Linear Algebra it has gotten a bit better.

So, I'm making a SICK SUPER COOL ASS player controller which can do one thing no other controllers can - DASH (I know very unique)

And I want to make so player will gain additional upward velocity based on how steep the ramp is. Right now it works, it checks for the normal (blue arrow) and applies the upward velocity after that (red arrows). But, I never check whether the player is facing the ramp or not, so even if they are getting of the ramp the upward velocity still applies. And I want for the player to just slip off of it.

And I'm not sure what's the best way to handle that? Thanks for your answers!

Solution

Thanks to everyone! I've gotten the solution from Discord, it was actually pretty easy. Al you gotta do is dot the forward vector of a player with the floor normal:

Vector3 floorNormal = _player.GetFloorNormal();
if (_player.IsOnFloor() && floorNormal.Y != 1)
{
    if (_player.Head.Transform.Basis.Z.Dot(floorNormal) > 0) 
    v += floorNormal * _player.DashSpeed * 0.5f;
}
_player.Velocity = v;

r/godot • • 16h ago

discussion Showcase your game

0 Upvotes

I would love to see and try out your games.

Specifications-

2D recommended

Godot only

Should be available on the PlayStore.


r/godot • • 17h ago

help Guided tips for Zero Experience?

2 Upvotes

Could anyone help with A few video guides of some kind with the current version of godot in it's default state.
I really just want to break that barrier of not having made anything ever, while always wanting too.
some sort of third person project to learn and test and just mess around in.


r/godot • • 3h ago

projects Agoneld

0 Upvotes

Game Title: Agoneld

Playable Link: https://play.google.com/apps/testing/com.agoneld.game

Platform: Android (add the Android flair after posting)

Description:

Agoneld is a single-player 2.5D action RPG for Android. Choose Warrior, Barbarian, Mage, Druid or Archer, then fight through 55 stages and 55 bosses in a story about a shrinking Void. Each hero levels to 60 with talent trees and Aspects, which are skill choices you pick as you level. Every hero also gets an evolving companion pet with its own gear. Collect hundreds of armor sets, weapons and wings, trade on the Auction House, and pick a difficulty from Beginner to Nightmare. It's in Google Play closed testing, and I need 12 testers to keep it installed for 14 days. Bug and balance feedback is welcome.

Free to Play Status:

[x] Free to play

[ ] Demo/Key available

[ ] Paid

Involvement:

Solo developer. I design the game and direct the build, using AI tools for code and art.

How to test:

Join the group: https://groups.google.com/g/agoneld-testers

Opt in with the same Google account: https://play.google.com/apps/testing/com.agoneld.game

Install it from the Play Store and keep it installed for 14 days.

Feedback: Rumcokeandshots@gmail.com. Happy to test your app in return.


r/godot • • 21h ago

projects Just uploaded my demo yesterday, surprised by how long people are playing it!

Post image
4 Upvotes

I uploaded the demo for my game yesterday, and I'm honestly quite surprised by how long people are spending playing it!

I expected people to try it out for a few minutes, but some players are spending much longer than I anticipated. Even more surprisingly, people have already started speedrunning it!

It's really cool seeing people get so invested in something I've spent so much time working on.

If anyone wants to give it a try, here's the Steam page:

https://store.steampowered.com/app/5169740/Ragdoll_Fighting_Simulator/


r/godot • • 20h ago

projects month 3 of making my dream mx game!

15 Upvotes

Full video here

This is my dirtbike game MX legacy 3 months into solo development (:

Just wanted to come here and show my progress.


r/godot • • 18h ago

projects Just released Demon Sword prototype!

1 Upvotes

I just released the prototype of my game

You are not human. You are the Sword (Demon).

In this pixel-art roguelite, you take on the role of a sword in procedurally generated dungeons. You must choose adventurers worthy of your hilt and guide them through the floors.

I'd love to hear what you think. Any feedback, suggestions or ideas are welcome.

https://flora22dev.itch.io/demon-sword


r/godot • • 6h ago

discussion Stylized Movement Games made in Godot?

1 Upvotes

I'm looking for examples of Godot games similar to Bloodthief (movement game) and Blood Vial (Boomer Shooter)

Or something that looks and plays similar to Rebel Engine (not Godot)

I having trouble finding something that it's not a prototype


r/godot • • 7h ago

help how can I improve my horrendous tileset workflow?

2 Upvotes

Last time I made a platformer game, I used 1 tileset. Each time I wanted new tile types, I went to Aseprite, added my new tiles, and saved that new version as a .png and a .aseprite. Then I went to Godot and dragged my new .png version into the file system.

I have different tilelayers for different types of objects, like ground, spikes, decoration, ect. One time, I tried deleting the old versions, but I realized that I would have to update every tilemaplayer node of each type, in each level, because everything still relied on the old version. This is probably confusing so ima give an example to clarify it:

Take the spikes tilemaplayer. It has a few different spike textures. Each time I make a new level, I copy paste a generic blank level I have saved. Then, when I make the next world, I want a different color of spikes. So I make them in aseprite, and I go to the blank level and change the spike tilemap to the new png that has the old spikes plus the new spikes. Now all future levels I make will use this version of the spikes, but the old levels won't have them. I would have to update each old level that I want to include the new spikes individually.

Now if delete the old textures, the old levels are fried because they rely on the old versions. The levels that I made after importing the most recent texture will be fine though, because I didn't delete their texture.

If your confused at how terrible my workflow is, I am too. Here's the problems I would like to solve:

  1. I have many different tilemaps in my filesystem; I want 1
  2. When I make art for a new world with new ground, spikes and deco, I need to go into my blank level template and change the spikes tilemaplayer node's texture, the ground tilemaplayer node's texture, and the deco tilemaplayer node's texture. I want to only change 1 texture. (btw every single object that is placeable on a tilemap in my game lives on 1 spritesheet)
  3. I make a .png and a .aseprite file. I can't remember why I did this, but I prolly did it for a reason maybe? idk

Can someone please help me improve my workflow lol


r/godot • • 11h ago

help I don't know if I should go with pixel art text or normal text

Thumbnail
gallery
51 Upvotes

Hi! I've been doing this video that is supposed to be on an old computer. Thing is that a lot of this game has a lot of text and requires reading, but I realized that the pixel fonts can be somewhat unreadable (or too big on fullscreen, in between sizes make the pixels have inconsitent sizes).

I tried some fonts from Google Fonts (idk also if these are to overused) and I've even made my own pixel font, but idk, still I am very unconvinced.

The not pixel art font is supposed to look retro but it is not pixel art, but as you can see from the main menu, the not pixel art font clashes with the pixel drawing I have.

Also, in different resolutions some pixels look bigger than others because of some weird interger division that I cant seem to get right (look at the "trees" on the last picture, which I am also thinking about redrawing because of this issue).

Idk if this is a real issue or something that only I care about as the developer that has just been staring at this for too long. Any feedback helps, thanks!!!


r/godot • • 9h ago

projects Meet Donnie the Worm Creature #godot #cg #yokohara

Thumbnail
youtube.com
3 Upvotes

r/godot • • 13h ago

help How to fix global signal not connecting.

0 Upvotes

Im trying to make a simple flappy bird clone and I want the pipe to send a signal each time it hits a certain distance, the pipes spawn with the same space between one another.

Whenever I try and connect it the spawn pipe node I get this error

The eventbus script

I doubled check and the script is auto loaded with global variables checked. If anyone knows the solution please do share ๐Ÿ™


r/godot • • 4h ago

projects I released my first Godot game

12 Upvotes

I've tried to make games for many years now but I just never really pushed myself to keep going.

That is until I learned about Godot roughly a year and a half ago and then decided to try to learn the engine. Very thankful that I stuck with learning the ins and outs of the engine as I now have a finished game on Steam. It's nothing crazy, but is still a game that I would play so I made it myself. You can check it out here if you are curious.

I have come to really like using Godot and am already looking to work on a new project and to keep learning new things with the engine. I haven't gotten into the 3D side of the engine just yet so I think I might start there.

Good luck to all who are learning Godot!


r/godot • • 18h ago

free tutorial The Programming Pattern that built Slay the Spire 2

Thumbnail
youtu.be
310 Upvotes

There's already a lot of deep-dives into Slay the Spire 2's codebase (which you should totally check out if you own the game), but I wanted to talk about the core pattern it uses to make all of it's cards, relics, potion, powers, etc work.

It's all hooks.

(and maybe the Template pattern if we really need a OOP name)

There's a lot of cool stuff talked about in the video, but I wanted to discuss more in depth how the overall pattern works here, along with some pros and cons. The main use case is a game where you want a variety of different "items" that can cleanly trigger different affects on the game state, making it easy to add new items and new effects. Here's how it works:

  1. A base class defines all of the event hooks.

These are game events that are broken up into specific, empty hook functions. For example, `beforeCombatStart()` or `afterItemAddedToInventory()`. The important thing is that one base class holds all of these hooks, and they all have a default implementation that does nothing. This means child classes that inherit from here can stay empty, and only define the functions they want to override

A game manager will then loop over every item that's active, and call it's hook function. For most items, this will be empty from the default implementation.

Additionally, there can be multiple hook functions for a single event to ensure the correct "order of operations". The best example is calculating damage, because if everything was calculated under a single hook, effects for additive and multiplicative changes would mix and make an inteterministic result. STS2 gets around this by breaking the hook into:

- `modifyDamageAdditive()`

- `modifyDamageMultiplicative()`

- `modifyDamageCap()` - ex, if enemy can only take a max of 9 damage per hit

These all get calculated in that order.

2. Core functionality comes from static "command" objects

This one is a little interesting, because you constantly hear about "not using globally accessible classes/vars", but here it simplifies the design substantially. Instead of saying "this is bad practice", here's the pros and cons that I could think of:

Pros

- Easy access to call commands inside other classes

- Simple

- Logical grouping of functions in classes (almost like a util library)

Cons

- If a functions contract changes (ex need a new parameter, return type, etc), it would require changing every invocation of that function

- Harder to isolate unit tests (you can't mock a "PlayerCmd" object as it's directly called by the class, so if you had a test suite and something was wrong with PlayerCmd, it could appear as failures in unrelated classes)

The big one that I think most people have run into is changing the contract, but it seems like they have a pretty stable design so they can afford to take that risk. In other words, if you really know that something isn't going to change, you can afford to keep it simple.

Thanks for reading! (and/or watching)


r/godot • • 19h ago

free plugin/tool Free top-down pixel art for Godot: everything in this dungeon room is free (characters, boss, items)

Thumbnail
gallery
11 Upvotes

Everything in this GIF is free: the dungeon tiles, torch, chest, coin and potion, the Knight and Rogue, Slime, Skeleton, Goblin, Gnome, the King Slime boss, and an animated spellbook + scroll.

For Godot: each character is a PNG sprite sheet with one row per animation (idle, walk, attacks, hurt, death ร— 4 directions) plus a JSON file with frame durations and tags, so it's quick to set up in AnimatedSprite2D. The tiles are a 32x32 grid with the wall tops laid out for autotiling.

- Top-Down Heroes LITE (Knight + Rogue): https://tinytileset.itch.io/top-down-heroes-free

- Top-Down Monsters LITE (Slime + Skeleton): https://tinytileset.itch.io/top-down-monsters-free

- Orc Warband LITE (Goblin Stabber): https://tinytileset.itch.io/top-down-orc-warband-free

- Elemental Spirits LITE (Gnome): https://tinytileset.itch.io/top-down-elemental-spirits-free

- Boss Pack LITE (King Slime): https://tinytileset.itch.io/top-down-boss-pack-free

- Grimoires & Scrolls LITE (spellbook + scroll): https://tinytileset.itch.io/grimoires-and-scrolls-free

- Dungeon Tileset LITE (tiles, torch, chest, coin, potion): https://tinytileset.itch.io/top-down-dungeon-tileset-free

๐ŸŽฎ Made a game with them? Share it in the comments here or on the itch page. I'd love to see it, and I'll feature the best ones!

โญ If these helped you, show some love on this post and follow me on itch: https://tinytileset.itch.io ๐Ÿ™

Ask me anything about setting them up!


r/godot • • 14h ago

projects Procedural weather in my Godot 4 survival game: rain rolls in, and every biome reacts differently

145 Upvotes

Hey Godot folks! I wanted to show off the weather system I've been building for my survival game.

Weather fronts drift across the world with the wind, and the biome underneath decides what happens. A swamp gets soaked, a meadow gets rain now and then, and the desert mostly just watches clouds go by. The rain doesn't just switch on, either: the sky slowly gets darker, the wind picks up, and then it starts pouring.

Godot made a lot of this really fun to put together. The sky is a custom sky shader, the clouds near the camera use a FogVolume so you can actually fly into them, the rain is GPUParticles3D, and global shader parameters let grass, trees and water all react to the same wind and rain. All the logic is plain GDScript.

Still polishing it, but I'm really happy with how alive the world feels now. Happy to answer questions!


r/godot • • 10h ago

discussion How do you approach adding translations/alternative languages to your game?

13 Upvotes

As the topic says - is this something you bake in at design time, or do you not bother? Do you get a translator, or just use an online service? Do you wait to see if there is a requirement? What languages would you say are the defacto languages?

English
Spanish
French
Russian
(sorry if I missed your mother tongue out here!)

Eventually my game will be very verbose (in a textual way) - and would like to ensure it is accessible by as many players as possible.

So, how do you approach this - any real world examples?

Thanks!