Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report on Godot 4.0 breaking changes that impact Popochiu 1.x #12

Closed
3 tasks
stickgrinder opened this issue Dec 4, 2022 · 7 comments
Closed
3 tasks
Assignees
Labels
epic This issue is huge and will be split into smaller issues poc Technical test which output is knowledge or more issues
Milestone

Comments

@stickgrinder
Copy link
Collaborator

We need a precise list of changes for Popochiu to work on Godot 4.0.

To achieve this we may want to:

Should this issue be solvable in a single pass, it's easier to just commit the upgrades on it. If more work is required is better to open new issues under the same milestone.

@stickgrinder stickgrinder added poc Technical test which output is knowledge or more issues epic This issue is huge and will be split into smaller issues labels Dec 4, 2022
@mapedorr
Copy link
Collaborator

mapedorr commented Dec 6, 2022

New in Godot 4 and GDScript 2

  • export is now @export
  • onready is now @onready
  • tool is now @tool
  • File is now FileAccess
  • Directory is now DirAccess
  • YSort node removed, functionality moved to Node2D (just when I changed PopochiuRoom to extend from YSort instead of Node2D....). I don't know how this works, so we'll need to make tests. **Answer: ** Now this is setup in the CanvasItems' Ordering category.
  • Position2D is now Marker2D.
  • Connecting and emiting signals has changed: signals basics.
  • No more yield, now use await
  • Some properties in Control nodes have changed (i.e. how text is aligned in Label). So probably we'll need to open the scenes for creating the Popochiu Dock in order to fix those things.
  • add_icon_override is now add_theme_icon_override.
  • Now setting a class icon to show in the Editor is done with @icon(path_to_icon).
  • Defining setters and getters for properties has changed: now it is done this way.
  • SceneTree idle_frame signal is now process_frame.
  • Control.get_stylebox is not Control.get_theme_stylebox.
  • AcceptDialog now inherits from Window, not from Popup.
  • ResourceSaver.save signature changed. 3.x -> 4.x
  • ⭐We can't use yield() anymore... so E.run() will not work as it used to work on 3.x
  • Engine.editor_hint is now Engine.is_editor_hint().
  • Node.name property now is a StringName instead of a String.
  • _unhandled_key_input signature changed, now it has an InputEvent parameter, instead of an InputEventKey.
  • @GDScript.funcref() (FuncRef) is now Callable.
  • At the moment of writing, I don't know how we can await for the signal name received as parameter is E.runnable(). For now I will not invest more time in this as we do not know if the E.runnable function will be maintained.
  • ⭐ Calling methods in the parent class now is done with super.method(), not .method().
  • Tween node dissappeared, now tweens are created only by code.
  • ⭐ Import flags for pixelart images is no longer part of the Import dock. Now it is setup in the CanvasItem's Texture category: Texture > Filter > Nearest.

This file might be useful to know about methods and properties renames.
Here one can find useful info about the new functions in GDScript 2.

Things to improve or change

  • In E.runnable(), the yield_signal: String parameter now can be "completed" when devs want to wait for the function to complete.
  • We could change connections to Area2D.area_entered / CollisionObject2D.mouse_entered/etc. to the new Area2D.area_shape_entered / CollisionObject2D.mouse_shape_entered in order to allow PopochiuClickable and other objects to have more than one collision shape. This could be useful for defining different behaviors in the same object depending on the shape that triggers the action.
  • ⭐ Now that making a texture to be pixelart-like is not defined by the flags used when importing the image, the setting that makes the game to be pixelart should be stored in the PopochiuSettings resource and it is something we'll have to evaluate for certain nodes (Sprite2D, TextureRect...) to set their CanvasItem.texture_filter to TEXTURE_FILTER_NEAREST.

@mapedorr
Copy link
Collaborator

mapedorr commented Dec 6, 2022

Maybe we should start by fixing the addon first, instead of trying to fix things in popochiu-dev. In the end, the game is created using the plugin classes and scripts, so fixing the plugin should allow us to create the development game from it.

@stickgrinder
Copy link
Collaborator Author

@mapedorr not sure what's the difference in working on the dev repo. Nothing against this, just asking,

@mapedorr
Copy link
Collaborator

mapedorr commented Dec 6, 2022

That there will be less things to fix as we will not have to fix bugs that are part of the demo itself @stickgrinder . But maybe I'm wrong, as importing the dev project directly in Godot 4 will run the script the Godot team created to migrate projects from 3.x to 4.x.

@mapedorr
Copy link
Collaborator

mapedorr commented Dec 22, 2022

Things to test before the first beta release

Now that most of the plugin is working, there are some things we need to test in order to fix bugs and make sure all v1.x functionalities are ready.

Editor

  • Installation.
  • Create room.
  • Create prop.
  • Create hotspot.
  • Create walkable area.
  • Create region.
  • Create character.
  • Create inventory item.
  • Create dialog.
  • Make sure the plugin does something if it is marked as Pixel, or 2D: This is something we have to control at node level now that Godot 4 moved that from the import flags to the CanvasItem.texture_filter property.
  • Delete room.
  • Delete character.
  • Delete prop.
  • Delete hotspot.
  • Delete walkable area.
  • Delete region.
  • Delete inventory item.
  • Delete dialog.

In-game

  • Save/Load (now PanelContainer becuase Window fucks everything:
    • Save working
    • Load working
    • The popup font looks blurry
    • The cursor dissapears when it enters the window
    • Closing the popup does not make it dissapear completely, looks like its panel container keeps visible, and that blocks interactions.
  • Show in-line dialog.
  • Remove inventory items.
  • Play custom character animations.
  • Change playable character.

@stickgrinder
Copy link
Collaborator Author

That there will be less things to fix as we will not have to fix bugs that are part of the demo itself @stickgrinder . But maybe I'm wrong, as importing the dev project directly in Godot 4 will run the script the Godot team created to migrate projects from 3.x to 4.x.

Ah I see! Well, I guess you are right.
The absence of a dependency manager for Godot is making this more painful that it needs to be :P But I guess you're right!

Sorry for taking so long to reply. I guess we can coordinate to address the list items in the next days, so we can speed the process up maybe?

@mapedorr mapedorr self-assigned this Feb 24, 2023
@mapedorr
Copy link
Collaborator

I'm gonna close this issue because of the release of v2.0-alpha1. I'll create another issue just to keep track of the pending things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic This issue is huge and will be split into smaller issues poc Technical test which output is knowledge or more issues
Projects
None yet
Development

No branches or pull requests

2 participants