TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
355 stars 18 forks source link

Initial conversion to 4.2 stable #142

Closed nonunknown777 closed 10 months ago

nonunknown777 commented 10 months ago

Did all necessary conversion to 4.2 stable, most errors as possible I got!

things I couldnt find a solution i typed: print_debug("TODO:....

I hope this can help you get this working on 4.x soon, this plugin is awesome!!!

PS: I've cloned the main branch, updated to 4.2 then switched to godot4 branch and removed all files and placed the updated main.

TheDuckCow commented 10 months ago

Wow, a really incredible contribution! I'll be checking it out shortly and seeing how it's functioning.

You actually beat me to doing this, as I had started refreshing the godot 4 branch we had from awhile back. I've created a parallel branch here which are changes made to make the auto conversion work more successfully, in the event we sign ourselves up for dual 4.x and 3.x support (so far hasn't been the plan, but indeed our feature completion version is still a little ways out). Maybe you have some ideas of other things we could port to that 3.5 compatible PR that you encountered? Either that, or we'll have to make parallel changes to both the 3.5 and 4.x branches, I'm not sure which is better at this stage.

TheDuckCow commented 10 months ago

Ok having checked out the branch, seems there's a little ways to go still - question, can you share a screen recording of how it's working for you in its current state on your branch? Could you also share roughly how much of this is just auto conversion, and how much is hand fixing? For reference, this is what I'm currently seeing, mostly just want to know if it's matching your side so we're on the same page.

https://youtu.be/V-tse9np5xc

What is working as-is on this branch from my end:

What doesn't seem to be working

nonunknown777 commented 10 months ago

Hmm, gdscript 2.0 is very different from 1.0(3.x) so keeping the two updated will be a lot of double work! I think you should only do bug/minor fixes in the 3.x version and improve the 4.x only since marjority of godot users tends to use the latest version!

what I mostly did was fixing the get_configuration_warnings which in 3.x was String but in 4.x is PackedStringArray. Then also signal connections. The harderst part was for undo_redo which you got from EngineInterface, so I did a little trick to get undo_redo for the road tool class! and lastly @icon statements and NodePath comparisions

TheDuckCow commented 10 months ago

Thanks for the info. Just for your awareness, what I'm probably going to do is merge this as-is into the godot4 branch we currently have, but as work continues it might be a force overwrite in the future (just so you are aware, but still get teh contribution credit).

On supporting 3x and 4x at the same time: Oh yes the syntax is too different for sure, the only way it would work is like so (and how I've approach the godot4 branch so far):

Still, indeed would be a lot of work and is a bit complicated. Really depends on how large that git patch has to be, which is the reason for this PR trying to make the auto conversion work better so the post patch can be smaller. For Wheel Steal, we do need to at least get the intersection support in order before fully adopting godot 4.0, but I'm dedicating myself to make sure we get get that before mid Jan so we can indeed fully adopt 4.0. We're also not that far off, since I'm assuming the first version of intersection support necessitates hand-crafted geo (not ideal, but still at least workable) with a good-enough workflow showing how people can create their own.

nonunknown777 commented 10 months ago

oh ok then, I'm not a git expert, but this git patch seems interesting, just dont know how if its going to make easier or harder in practice! good luck! focus on your game first xD

dev-bre commented 9 months ago

I tried this branch but it keeps failing on adding the RoadContainer and RoadPoints.