godot-console icon indicating copy to clipboard operation
godot-console copied to clipboard

Godot 4 port

Open DavidMag opened this issue 2 years ago • 18 comments

Don't know If this is of any kind of interest yet but made a quick port, unfortunately gut has yet not been ported.

Most changes is:

  • Changing Reference to RefCounted (https://github.com/godotengine/godot/pull/49312)
  • Updating setget syntax
  • Updating calls to super init to new syntax

This could potentially still need some more work.

DavidMag avatar May 18 '22 12:05 DavidMag

Ping @quentincaffeino

DavidMag avatar May 18 '22 12:05 DavidMag

Sorry for taking so long to respond. I will try to review this pr soon.

One thing I see right away is new syntax. Is it mandatory to use new setget syntax with godot 4? Reason I'm asking is because I'm trying to support older versions of godot in this project. Hence why such complicated solution for callbacks was implemented, callbacks weren't possible before.

If old syntax is deprecated and deleted from godot then I might think of having two branches for some time, since godot 4 will take some time to be widely adopted.

If old syntax is still available I'd ask you to revert those changes related to syntax.

quentincaffeino avatar Jun 09 '22 08:06 quentincaffeino

Sorry for taking so long to respond. I will try to review this pr soon.

One thing I see right away is new syntax. Is it mandatory to use new setget syntax with godot 4? Reason I'm asking is because I'm trying to support older versions of godot in this project. Hence why such complicated solution for callbacks was implemented, callbacks weren't possible before.

If old syntax is deprecated and deleted from godot then I might think of having two branches for some time, since godot 4 will take some time to be widely adopted.

If old syntax is still available I'd ask you to revert those changes related to syntax.

No problem, we all got a life outside github right? 😅

But regarding the the setget syntax to my understanding to old syntax is deprecated, but I could have misinterpreted.

There is info about it here: https://github.com/godotengine/godot-proposals/issues/844

Perhaps 2 branches would be nice, and just to clarify I'm wouldn't be confident to say that this I ready to merge. First of all I have only used this repo lightly so I might have missed stuff and also gut isn't ready so that sure is something that holds it back as well.

DavidMag avatar Jun 11 '22 15:06 DavidMag

Beta 1 Error;

res://addons/quentincaffeino/console/src/Type/Vector2Type.gd:29 - Parse Error: Function "str2var()" not found in base self.

Kind regards

lukiono avatar Sep 22 '22 08:09 lukiono

Beta 1 Error;

res://addons/quentincaffeino/console/src/Type/Vector2Type.gd:29 - Parse Error: Function "str2var()" not found in base self.

Kind regards

This could be a bug in godot but nothing prevents us from doing explicit conversion by doing something like float(point[0])

quentincaffeino avatar Sep 22 '22 16:09 quentincaffeino

Beta 1 Error; res://addons/quentincaffeino/console/src/Type/Vector2Type.gd:29 - Parse Error: Function "str2var()" not found in base self. Kind regards

This could be a bug in godot but nothing prevents us from doing explicit conversion by doing something like float(point[0])

It's not a bug, var2str and str2var has been renamed to var_to_str and str_to_var. Should probably redo this pr since it's been quite some changes, might have time this weekend or next week.

DavidMag avatar Sep 23 '22 07:09 DavidMag

It's not a bug, var2str and str2var has been renamed to var_to_str and str_to_var. Should probably redo this pr since it's been quite some changes, might have time this weekend or next week.

You're right, however using var.to_float() would be better than str_to_var imo

quentincaffeino avatar Sep 23 '22 20:09 quentincaffeino

Should be some-what working now, haven't tested everything yet

quentincaffeino avatar Sep 28 '22 11:09 quentincaffeino

What current situation? I don't know if this would be part of the thread, but wouldn't it be of interest to also put the godot4 branch in the asset library?

scriptsengineer avatar Nov 26 '22 11:11 scriptsengineer

I plan to put it on asset lib after godot 4 is released

quentincaffeino avatar Nov 26 '22 11:11 quentincaffeino

Another question would be that this pr is not with the wrong target branch?

scriptsengineer avatar Nov 26 '22 11:11 scriptsengineer

Totally possible, I haven't yet thought through how I'll manage development for multiple versions. Probably godot 4 will go in dev and I'll keep a separate branch for godot 3 to simplify dropping it when godot 3 becomes too old or something like that.

Also I will prob drop dev branch and everything will go directly to master. Dev is kinda useless in this project case.

quentincaffeino avatar Nov 26 '22 11:11 quentincaffeino

@scriptsengineer right now if you are willing to try out godot 4 version I'd be glad if you will report any bugs you find :)

quentincaffeino avatar Nov 26 '22 11:11 quentincaffeino

Also working on ability to use package manager like npm (or hopefully any npm-compatible) because asset lib is pretty vanilla

quentincaffeino avatar Nov 26 '22 11:11 quentincaffeino

So I came from Unity and I agree, it lacks some kind of management, looking forward to some kind of response in the proposals made here https://github.com/godotengine/godot-proposals/issues/2262 https://github.com/godotengine/godot-proposals/issues/2263

scriptsengineer avatar Nov 26 '22 12:11 scriptsengineer

About godot4 update I think it is extremely necessary since there is a lot of demand in this version. I will work on this, currently investigating the godot3 to godot4 update script, for some reason the godot4 branch has some corrupted scenes that still keep old version of godot3 ids

scriptsengineer avatar Nov 26 '22 12:11 scriptsengineer

Update: The mentioned corrupted scene godot issue #69177 is due to a bug with godot 4 beta 6 that has now been fixed. Testing with godot 4 beta 5 version everything works normally. This pull request can be sent to a master, if the idea is to keep the godot 3 version on a separate branch.

scriptsengineer avatar Nov 27 '22 19:11 scriptsengineer

What's the status on this? I'd suggest making the develop branch compatible with Godot 4 and create a 3.x branch from the current develop branch.

Calinou avatar Jul 19 '23 15:07 Calinou