ComedyReflux

  • Mar 22, 2024
  • Joined Apr 30, 2021
  • 0 best answers
  • Should have updated. After fixing

    • the .json export so that it also does this for Linux
    • the capitalization errors that I had. I just had two typos where I had given a capital D to the "/data" in my URL, and found out this is not a problem for Windows as it's apparently not case-sensitive even though you can use capitals in folder names, but is a problem for Linux that then goes looking for the wrong file.

    it now works on Linux as well! Seeing that it really said "file not found" made me think again whether the json files were actually included and made me click around more in that export window, finding out those settings are applied per export template. So the fix was also in the lines of what I originally expected, as I was always told Godot can still read from res, it just can't write to it.

    I've been since working on a presumably wholly unrelated performance issue. Steam Deck is not handling the lights as well as my desktop is (which makes sense, my desktop has a beefy GPU)

  • ... whoops.

    Turns out this

    filter is not shared between different export types (Windows/Linux), and it was still empty for the Linux build.

    My apologies. ^^'

    I'm still getting a script error that says "cards.json" does not exist, but did get "0" error returns. And I can see that the "cards.json" file was made in the user directory. Might be a capitalization issue.

  • Have located user, cleaned up game folder and now also get 0 feedback for making the directory. But I do indeed get a false for file_exists.

    Converting to Resources at first view would have a big impact on all of my implementation. I think for my save file, I'd still want to export and read from a JSON file in user? It seems Godot 4 is also planning to make json files actual resources so this would fix the problem? Sighs in 3.5.1 ^^'

  • On SteamDeck, I get an 0 return code for the dir.open, but apparently a 32 (already exists) for the dir.make_dir. Right, gonna have to look for where the user directory is made and remove it for a clean bootup. It seems not to be just in "Home" on Deck.

    On windows (exported version, freshly emptied user (app_userdata)) all of this just works:

    Dir open feedback: 0
    Dir make dir feedback: 0
    Err data = 0
    Err data = 0
    Err data = 0

  • (to be clear, I have .json files included in export)

  • The way it's set up I found as a solution when releasing my first bigger Godot game and found out that res was not accessible in exported version; on Windows copying to res worked and was recommended as a solution because it was said not to be platform dependent. I thought perhaps the problem was with the permissions of the file or something.

  • But that's what I'm using it for. At bootup, put json files into user so I can use them later on. I never touch res afterwards. Is there a different way to put my json files into user?

  • Extra information: pck is embedded in export.

    And full code block (after check if user file already exists or needs to be copied first) is:

    var dir = Directory.new()
    		dir.open("user://")
    		dir.make_dir("data")
    		var err = dir.copy("res://data/FileImUsing.json","user://data/FileImUsing.json")
    		print("Err data = " +str(err))
  • I'm preparing to take a demo of my game on Steam Deck to have some friendly gamedevs try it out and give feedback. The game runs perfectly on my local Windows PC, both from the editor and from a Windows export file. My Linux Export on the Steam Deck runs fine for the most part, but there's some functionality that doesn't, and it appears to have to do with copying some files from the local "res" to the "user" directory.

    I have the following code:

    var err = dir.copy("res://data/FileImUsing.json","user://data/FileImUsing.json")
    		print("Err data = " +str(err))

    And this returns an "Err Data = 7", so "file not found" error.

    Since in this early stage I just run the game from the Steam Desktop (mode), it's not from the Steam store client or anything. I figured out how to do (not well-versed in Linux) this from the Konsole and that's how I figured out the copying wasn't working.

  • (Godot 3.3.2 stable, Windows 10)

    I have a TileMap under a Navigation node, generating simple paths for my enemies to move around in. I have an issue where sometimes, depending on position of the enemy, the pathing will suddenly cut through a space where there's no navigation, as you can see in the GIF:

    The white transparent lines are Line2D's using navigation data. You can see that after updating close to the corner, it suddenly goes through, while the other navigations (from 3 other enemies) keep going around.

    Is this a known issue?

    I don't think it's related, but I'm using a 3*3 minimal autotile, none of those have navigation on them and so I change all empty tile spots with one that has navigation on it.

    func _ready() -> void:	
    	# Find the bounds of the tilemap (there is no 'size' property available)
    	var bounds_min := Vector2.ZERO
    	var bounds_max := Vector2.ZERO
    	for pos in get_used_cells():
    		if pos.x < bounds_min.x:
    			bounds_min.x = int(pos.x)
    		elif pos.x > bounds_max.x:
    			bounds_max.x = int(pos.x)
    		if pos.y < bounds_min.y:
    			bounds_min.y = int(pos.y)
    		elif pos.y > bounds_max.y:
    			bounds_max.y = int(pos.y)
    
    	# Replace all empty tiles with the provided navigation tile
    	for x in range(bounds_min.x, bounds_max.x):
    		for y in range(bounds_min.y, bounds_max.y):
    			if get_cell(x, y) == -1:
    				set_cell(x, y, 0, false, false, false, Vector2(8,5))
    
    	# Force the navigation mesh to update immediately
    	update_dirty_quadrants()
  • It's the "standard one" Windows installed.

    I thought because it got detected and it just works plugged in via USB that there might be some sort of idiosyncrasy of the PS4 controller I didn't know about. Looking at the info page of Playstation itself, and remembering that Rumble is disabled, I'm thinking they just disable Bluetooth for PC, unless you use one of their USB plugins/dongles. I can play games via Steam but perhaps they just pulled some strings to get it working.

    Ah well, at least now I know for sure there's not a simple fix I couldn't find.

  • I'm trying to get input from my PS4 Controller via Bluetooth. It is listed in Godot as connected via Input.get_connected_joypads().size() and Input.get_joy_name(0). (It is also viewable as connected in Windows 10)

    I can't get any input from it, for instance via Input.get_joy_axis(0,JOY_AXIS_0), or Input.is_action_pressed("play_shoot") even though this works for the same controller if I connect it via USB cable.

    Is this a known issue? If so, is there a workaround/fix/solution for the problem?

  • Fixed it, redid the polygon2D.

    Did encounter another bug, where copying one of my existing polygon2D's and changing the UV rendered the polygon invisible, but only in Godot 3.3. Reopened the project in 3.2.3, perfectly visible there (below screenshots from 3.3 and 3.2.3 with same node selected and nothing changed), and then went back to 3.3 (I seem to get great performance benefit from the renewed 2D batching)

    Had possibly another issue then where it had saved my preferred language and had lost track of my projects, so had to reimport into project overview. ?

  • Right, it's from the Polygon2D, so I should look at the images I use, not the collision polygons. I do have one I turn off/on when I move. (One for idle, one for movement)

  • (Haven't had time for the project for a while)

    I'm suspecting it has to do with a polygon somewhere in my player character, it only seems to trigger when I move (must have misinterpreted it previously, as I also move when being attacked :-) ).

    All the collisionshapes I use in the player character are CapsuleShapes, either for Collision of the KinematicBody or for detection of to-hit areas (under a Area2D) for damage. I don't really define any of the points myself. I would also think there's not really an indice.

    The player moves on the tilemap that also has collisions, and those have arrays containing the points, but went through all tiles in the tilemap, and they all check out with 4 points.

    That's probably the hardest part of figuring this out, no stacktrace to the ingame object or node to give me an idea into which polygon I should be looking.

  • I'm getting a red error message that points to C++ source code but doesn't give me a reference to my actual GDScript code, some I have a problem with determining what's the problem. I think it might have to do with collision, as it triggers when an enemy is attacking the player.

    E 0:17:11.236 notification: Condition "idx < 0 || idx >= points.size()" is true. Continuing. <C++ Source> scene/2d/polygon_2d.cpp:330 @ notification()

    I'm not really at home in the source code, and can't really make sense of what's going wrong. Source code referenced:

    for (int j = 0; j < ic; j++) { int idx = r[j]; ERR_CONTINUE(idx < 0 || idx >= points.size()); tmp_points.write[j] = points[r[j]]; }