XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Godot Forum - Topics tagged godot-4

Topics tagged godot-4

Invalid access of index '0' on a base object of type: 'Array[BaseButton]'.

Godot Version 4.7.2 Question I’m very new to Godot and to coding as a whole, and have been stuck on the same problem for days. Im trying to make a dialogue system, and am following a YouTube tutorial because I’m new, but I have this stupid error that I just cant fix. Even when this is fixed, I’m sure there will be new problems, but any help would be great. Code: extends CanvasLayer @export var b_group : ButtonGroup var dia_choices : Dictionary signal next_id(id: String) func _ready() -> void:…

Editor Viewport Resolution

Godot Version 4.7.2 Question I’ve been trying to modify the UI for my game, but have been having trouble getting it to look right due to issues with the differing resolution between the editor viewport and the play-mode viewport. For stylistic reasons the game is being rendered at a low resolution and then fit to the screen, keeping the aspect ratio and using black bars for any remaining window space. Because of this low resolution, the viewport being 1 unit per pixel has a big impact on how…

Relationship Web: NPCs who remember, with love, grudges, jealousy and families

I wanted villagers who remember: who helped them, who wronged them, who they’re sweet on, and who they’ll never forgive. So I built the relationship layer as an addon. Feelings each way between every pair (affinity, trust, familiarity, romance, attraction), so a crush or a grudge can be one-sided Personality traits and attachment styles that change how feelings move Grudges that fester or get let go, and feelings that drift back toward a baseline as days pass Love in steps: attraction, crush,…

How to realize weapon selection in a top-down shooter on C#

Godot Version 4.7, C# The problem is that, although you can simply attach a weapon node to a player, this will cause huge problems down the future. Next, I’ll describe the model I tried: Apparently, he started by creating an abstract class: using Godot; public abstract partial class Gun : Node2D { [Export] private PackedScene _projectileScene; [Export] public Key ButtonForUse; public abstract void Shoot(); public abstract void SpawnProjectile(); } The code for the realization this class doesn’t…

GrassPro 1.2 is out, and it now works with Terrain3D

Hey all, Quick update on GrassPro, my interactive grass add-on for Godot 4. Version 1.2 just went live. The big news is built-in Terrain3D support, which a few people asked about. How it works Add one GrassProTerrain3D node and your grass sits on your Terrain3D terrain. That’s it. Holes and steep slopes stay bare on their own. You can also set grass by ground texture. Each texture gets a rule for density, height, dryness and flowers. So rock and dirt stay clear, and your meadow textures grow…

Chat Chronicles: The Last Admin — Godot 4 Action-Adventure | Gameplay Trailer & Community

Chat Chronicles: The Last Admin — An Original Godot 4 Adventure! A mysterious industrial city. Dangerous robots. A group of friends. And an adventure that keeps getting bigger. Hello, Godot community! I’m Volodymyr Ihlin, an independent game developer and creator of ChatChroniclesStudios. Today, I’m excited to introduce Chat Chronicles: The Last Admin, an original 3D action-adventure game currently being developed with Godot 4. What started as a personal passion project has grown into an…

Struggling to identify scene relative to root node

Godot Version Godot_v4.7.2 Question Hello! I’m trying to write a global script that will handle transitioning between scenes in my game. My issue currently is that I can’t get the script to identify the scene I want disabled (the “Shop” scene.) I don’t know if it’s syntax I don’t know yet or if I’m missing something. I’ve tried making an onready variable for the scene and referencing it any way I can but it always says the node is “not declared in current scope.” extends Node @onready var shop:…

Darkness threshold shader

Godot Version 4.7.stable Question Hello! In the game I am making, I need the darkest color to be #390C1B, but 3D environments will inevitably have darker hues no matter how much I try to work around it, so I was wondering if it was possible to make a canvas_item shader that works as a color limiter, but only to make the darkest color possible be one that i have assigned? 2 posts - 2 participants Read full topic

RigidBody3D doesn't apply physics before queue_free()

Godot Version 4.6 Question I am making an FPS game where the bullets are physical objects. The bullets are RigidBody3D’s. When the bullet impacts an object, it despawns and creates a small visual effect. I’ve noticed that the bullets don’t affect other RigidBody3D’s. When I don’t have them despawn, the collisions do apply, so the other physics objects are working and it’s only the bullet despawning that’s the problem. However, the queue_free() code should only run if the bullet is already…

How to make a node inherit another node's position and rotation with code

Godot Version 4.7.1 Question I’m struggling to find a good way to make my character’s gun switch between different hands, my current implementation works like this but has unwanted side effects: in the code of the weapon: func _physics_process(_delta: float) -> void: if gunposition == 0: global_transform = lefthandgunpos.get_global_transform_interpolated() elif gunposition == 2: global_transform = righthandgunpos.get_global_transform_interpolated() This creates some delay when moving the gun…

There is no support for async functions profiling

Godot Version 4.6 Question My scene loading uses a lot of procedural data generation - and a big scene takes up to 40 seconds! I have no clue why - the built in profiler seems to be useless, I cannot find tickbox combo that tells me anything. I guess that is due profiler works per frame. But for me framerate is not issue, I use await and signals to update the progressbar, and that updates fast enough during the scene load few hundred frames are passed. Is the only way to add in functions start…

Resource based weapon system, circular reference issue

Godot Version 4.7.2 Stable Question I want to define my weapons using Resources which would store the PackedScenes for the pickup and the weapon so my player could instantiate the weapon when equipping it from the inventory, or drop the pickup item into the world. The trouble I ran into is that, if my pickup scene holds a reference to the weapon resource which in turn holds a reference back to the pickup scene I get quite a few errors related to the circular reference. I saw that someone else…

ForgeThrottle — Building an isometric combat racer in Godot

Hi! I’m building ForgeThrottle, a single-player isometric combat racer set in an industrial foundry. In this 10-second clip, Miette jumps over a vat of molten metal. Then we cut to Rusty Wharf, where she hits a boost pad and goes from fourth to first. ForgeThrottle — Molten Metal, Full Throttle I’m working on making the action easy to read from an isometric camera. In the Rusty Wharf shot, can you tell which car you’re following and when the boost kicks in? Wishlist ForgeThrottle on Steam 3…

Warli World: a folk-art village that lives along the bottom of your screen (Godot 4, Mac + Windows)

Hi all. Warli World is a desktop idle game: a transparent, always-on-top strip along the bottom of the screen, just above the Dock or taskbar, where a small village in the style of Warli painting (white rice paste on red earth, from Palghar in India) goes about its day while you work. Warli World: a Warli folk-art village that lives along your screen (trailer) Some Godot details that might be useful to others: The window: borderless, transparent and always on top, with…

Mosh Pit Mogul: Idle Metal — 2 closed testers needed

My idle metal game, Mosh Pit Mpgul is in Google Play closed testing, and Google requires 12 testers opted in for 14 days before I can apply for production. I’m at 10 — I need 2 more. I know nobody wants to hand their email to a stranger, so I set up a Google Group you join yourself (the member list is private — only I can see it as manager): 1. Join the group: https://groups.google.com/g/moshpitmogul-testers 2. I’ll add new members to the tester list each evening — after that, tap “Become a…

Saving high scores/scoreboard: Error: Attempt to call function ‘store_32’ in base ‘null instance’ on null instance

Godot Version 4.7.2 Question Hi all, I am a first time developer and this is my first time posting! Would appreciate any help on the question below. How do I fix the following error: Attempt to call function ‘store_32’ in base ‘null instance’ on null instance, which is crashing my game every time it attempts to save my high score? I am building a game where you hold off waves of enemies and get a point per enemy killed. I would like the game to save the highest score achieved, so it is…

Script on instantiated child scene not running in main scene

Godot Version v4.7.2.stable.official Question I am building an app which has some draggable and droppable tiles on a main scene. I am very much a beginner and I’m loosely following along with this tutorial https://www.youtube.com/watch?v=uhgswVkYp0o (which I think uses an old version of Godot). I have a Tile scene with nodes like so and the root node has the following script with signals coming from the TileShape node: When I run the Tile scene by itself, the signals work correctly and the tile…

Detecting Mouse Click in Isometric Perspective

Godot Version 4.7.2 Question How do I properly do click-detection on isometric tiles using TileMapLayer? Seeing as the textures are cubes larger than the diamond-down isometric grid, I want the entire texture to be detectable as clicking on that coordinate grid space. var local_mouse := main_layer.to_local(get_global_mouse_position()) var cell := main_layer.local_to_map(local_mouse) if main_layer.get_cell_source_id(cell) != -1: return cell Simple code that returns the coordinate of the clicked…

Enemy pathfinding in a proceduraly generated world

Godot Version 4.6.1 Question I am trying to implement pathfinding into my game, but the enemy will not move and i think the problem is not as simple as baking it in the editor due to having procedural terrain generation so i would have to bake at runtime i was using this example here from godot docs: func _ready() -> void: var on_thread: bool = true bake_navigation_mesh(on_thread) And the navigation is from a tutorial here and the code for the enemy is not complex: extends CharacterBody3D var…

How to set increment to joint's Limitations.angle? (FABRIK3D)

Godot Version 4.7 Question Learning FABRIK3D at the moment. I want to set an angle to the first joint in skeleton and for the rest of chain to increase their rotation by 10 var angle = 10 var increment= 10 set_function(each_joint_rotation, angle + increment ) results : joint_1 = 10, joint_2 = 20, joint_3 = 30 Current code that I want to apply to: var joint_limit_cone := JointLimitationCone3D.new() joint_limit_cone.angle = deg_to_rad(10) for joints in ik.get_joint_count(0):…

Unparenting a Node2D while retaining its position, scale, rotation, skew

Godot Version Godot_v4.7-stable_linux.x86_64 Question So initially, I (naively) have Utility functions for parenting/unparenting: func parent_add_child_without_transform(parent: Node2D, child: Node2D) -> Transform2D: var global_transform = child.global_transform parent.add_child(child) child.global_transform = global_transform return global_transform func parent_remove_child_without_transform(parent: Node2D, child: Node2D) -> Transform2D: var global_transform = child.global_transform…

Local Network Access for HTML5 Export

Godot Version 4.7 Question I asked this question on the Discord, and I figure I’ll ask here, too. I’m trying to build a sort of Jackbox-esque local party game, where the game server runs on desktop, and the clients are HTML5, with the players going to the web page (either locally hosted and spun up by the game server, or hosted on itch.io) on their phones. So I’m testing Web Sockets with the WebSockets Chat Demo, and I’m having issues accessing the LAN on the HTML5 export. If the web page is…

Error not showing up in the debug window

Godot Version V4.7.2 Question # Quit if the audio bus wasn't found if audio_bus_id == -1: push_error("Could not find target audio bus: " + audio_bus_name) push_error("Quitting...") get_tree().quit(1) For some reason I don’t see any errors in the debug window or console when this runs. Am I not using push_error() correctly? 2 posts - 2 participants Read full topic

Issue with diagonal movement being faster even though all vector lengths are 1

Godot Version 4.7.2 Question Even though I'm using a vector3 that's normalized moving diagonally either with holding left/right and forward/backward or looking diagonally is causing movement to be faster all normalized vector lengths are 1 and the one non normalized vector's length is the max speed. Here's the code(I pasted it instead of a screenshot as there's a lot of non movement related clutter in the function) var direction : Vector3 = (transform.basis * Vector3(input_dir.x, 0,…

Resources for multiplayer game programming (web)

Godot Version 4.8 Question Hello, I am looking for resources for how to make a multiplayer game in Godot. I found a couple of samples and they were ok, and the docs were good but I was hoping for a more thorough guide to follow to avoid snag cases and bugs further along. I am making a FOSS web MMORPG a bit like WOW with more rustic grsphics but you can play it in the browser and almost everything is procedural to keep the web cache data in smaller manageable chunks. 1 post - 1 participant Read…

Visible gaps (dots) between tiles

Godot Version v4.7.2.stable.official [ed1daf0bf] Question Hello everyone! I have little to no experience in godot so I apologize in advance for an otherwise pointless question. But anyways, is there a proper way to fix surfaces from “leaking” light behind it? https://drive.google.com/file/d/1svQLFr1M4seZU69yILlmjL2ibi77gG5m/view?usp=drive_link I haven’t changed any project and editor settings. Light only passes through seams between tiles. The wall is built with 2 planes instead of 1, which…

Free CC BY 4.0 lofi music for Godot games — Purrple Cat (starting with Up All Night)

Hi, I’m Purrple Cat. I make cozy lofi music, and it’s all free to use in Godot games under CC BY 4.0, as long as you add credit. This is a solo project I’ve been running since 2018. 500+ songs, 500M+ streams, 425K followers. Every part of it is made by me: the music, the cover art and the animation. The tracks are regular audio files (MP3 / WAV), so you can import them as background music. I’ll use this thread to share my Self Release albums, one at a time, in release order. First is the debut…