Skip to content

Conversation

menaechmi
Copy link

@menaechmi menaechmi commented Mar 13, 2024

I'm re-writing this description, because the status has changed dramatically since it was first written.

Tests

Two test currently fail:

  • tests/integration/test_manipulation_buttons.gd.TestManipulationButtons fails with
    [VECTOR2(203.93003845214843750000, 401.15228271484375000000)] expected to equal [VECTOR2(103, -240.5)] +/- [(2, 2)]: Card focused and in correct global position at line 17

The cards don't even have manipulation buttons in this nor when I tested it in 3.x so I didn't try to fix it.

  • tests/integration/test_piles.gd.TestPopupView test_popup_deck_viewfails with
    [true] expected to equal [false]: Cards returning from popup should respect piles card facing at line 141

It fails because cards can't be dragged in the PopupView for some reason. Fix that, and the test should pass.

Fonts/Labels

  • Text and labels in CardFront.gd need to be fixed. (Basically all text on cards doesn't fit)
  • The project (in the project.godot) is currently named "(new)Card Game Framework". It should be renamed to "Card Game Framework", but when this happens the whole framework slows down and a bunch of errors start popping up. Most of them are in CardFront.gd and are because a node can't get_tree() to wait for a process frame when it's not in the scene tree yet. But even without those errors, the whole framework slows to a crawl when that happens and almost every tween stops working. I'm pretty sure it's related to a lack of awaits in CardFront.gd or similar - but I did not track down why a name change triggers it.
  • The focus dupes are a little weird still. The card in the focus dupe is 1.5x the size, but the surrounding control is another 1.5x larger, so you get a 1.5x focus dupe with a 2.25x box around it. It's caused because the control's original size is saved AFTER the card is resized to current size * 1.5 scale. But resizing the card also resizes the control, so later when the control is scaled to size * 1.5 scale, it gets doubled.
  • Tags in a focus dupe don't line break
  • Text on the back of of cards extends past the card edge.

Demo scenes

Basically everything works

  • The box where you can pick Scaling Focus etc is never populated.
  • In the Main Menu the Tests/GUT option should be removed
  • CardLibrary and DeckBuilder are functional, but the scenes don't show up correctly - I haven't looked into why.

CI

  • The mouse doesn't work well in github CI, so more tests fail. Probably moving from mouse movement to functions like move_to will work better, but there are times where that can't happen.
  • The junit output reader I added to the CI doesn't seem to work well with the gut output, so it should probably be dropped

Basically everything works and because it works in 4.2.2, it should work in versions all through 4.4.1 (but I haven't extensively tested it).

Everything else I would do is a major refactor, so if I continue it it will be as a separate fork.

markp3rry and others added 19 commits February 18, 2024 12:01
Made some edits based on experience of following this tutorial in v3.5.1 of Godot. I was able to complete the tutorial from start to finish, and end up with a working version of the sandbox with a deck containing the two custom cards that I could draw from.
Small change to say updated for 3.5.3 rather than 3.5.1 as originally stated.
not yet 100%. see pull request for details
fix from godot-tester issue 36
Not using any custom settings. Just the defaults.

I'm doing this on Godot 4.3. Not sure if that matters.
Fix a ton of gut errors:

scene\resources\resource_format_text.cpp|453| res://addons/gut/gui/RunAtCursor.tscn:4 - ext_resource, invalid UID: uid://cr6tvdv0ve6cv - using text path instead: res://addons/gut/gui/play.png
scene\resources\resource_format_text.cpp|453| res://addons/gut/gui/RunAtCursor.tscn:5 - ext_resource, invalid UID: uid://6wra5rxmfsrl - using text path instead: res://addons/gut/gui/arrow.png
scene\resources\resource_format_text.cpp|453| res://addons/gut/gui/GutBottomPanel.tscn:6 - ext_resource, invalid UID: uid://cr6tvdv0ve6cv - using text path instead: res://addons/gut/gui/play.png
scene\resources\resource_format_text.cpp|453| res://addons/gut/gui/GutBottomPanel.tscn:7 - ext_resource, invalid UID: uid://4gyyn12um08h - using text path instead: res://addons/gut/gui/RunResults.tscn
||   Cannot open file 'res://addons/gut/gui/RunResults.tscn'.
||   Failed loading resource: res://addons/gut/gui/RunResults.tscn. Make sure resources have been imported by opening the project in the editor at least once.
res://addons/gut/gut_plugin.gd|8| Attempt to call function 'create_temp_directory' in base 'null instance' on a null instance.
res://addons/gut/gut.gd|1| Parse Error: Could not resolve super class path "res://addons/gut/gut_to_move.gd".
res://addons/gut/gui/BottomPanelShortcuts.gd|5| Invalid access to property or key 'editor_shortcuts_path' on a base object of type 'null instance'.
res://addons/gut/gui/GutBottomPanel.gd|21| Invalid call. Nonexistent function 'get_rich_text_edit' in base 'MissingNode'.
res://addons/gut/gui/GutBottomPanel.gd|52| Attempt to call function 'create_temp_directory' in base 'null instance' on a null instance.
res://addons/gut/gui/GutBottomPanel.gd|317| Invalid access to property or key 'run_results' on a base object of type 'Nil'.
res://addons/gut/gui/GutBottomPanel.gd|99| Invalid access to property or key 'shortcut_dialog' on a base object of type 'Nil'.

Checked out gut tag v9.3.0 and replaced our addons/gut/ folder with
their addons/gut/ folder. When running, gut tells us it's copying our
config to use as a template, but I don't think we want to delete the
template because all repo devs should use it:

|| GUT Info:  Copying [res://.gut_editor_config.json] to [user://gut_temp_directory/gut_editor_config.json]
|| GUT Warning:  File [res://.gut_editor_config.json] has been moved to [user://gut_temp_directory/gut_editor_config.json].
||     You can delete res://.gut_editor_config.json
|| GUT Info:  Copying [res://.gut_editor_shortcuts.cfg] to [user://gut_temp_directory/gut_editor_shortcuts.cfg]
|| GUT Warning:  File [res://.gut_editor_shortcuts.cfg] has been moved to [user://gut_temp_directory/gut_editor_shortcuts.cfg].
||     You can delete res://.gut_editor_shortcuts.cfg
|| GUT got some new images that are not imported yet.  Please restart Godot.

The Gut editor panel seems to work and I can run tests (they don't all
pass).
Upgrade gut to v9.3.0, include `.import` files, update .gitignore
CardTemplate's _tween is a WeakRef and not a Tween.
Also resets the project.godot to the compat renderer
@db0
Copy link
Owner

db0 commented Jun 23, 2025

Thanks for doing this. If you're still working on this, why not keep it as draft?

@menaechmi menaechmi marked this pull request as draft June 23, 2025 18:30
menaechmi added 28 commits July 15, 2025 16:58
Not sure about manipulation_bottons, but only 29 failing remain
(Likely fixed when ScEng_common.gd was edited)
It doesn't work in the 3.x version, so it works the same amount here
This one fails in 3.x, it fails less in 4.2 now though
Fix tween logic, fix set/get
CardTemplate fix whitespace
Pile change some tween awaits
Another one that doesn't work in 3.x but works in 4 now :)
delete old TODO/FIXME comments, fix a quick tween error
Also deletes the cli test scene, as it's no longer used
@menaechmi menaechmi changed the title Mostly complete conversion to 4.2.1 Mostly complete conversion to 4.2.2 Jul 18, 2025
@menaechmi menaechmi marked this pull request as ready for review July 18, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants