Motivation is a hell of a thing. Without the time I can plan all the things in the world. Once I have time available, it just slips through and nothing gets accomplished.
But how do you eat an elephant made out of ice cream? One spoonful at a time.
Break it down into smaller tasks and just focus on the smaller pieces. Don't miss the forest for the trees, but avoid paralysis by analysis.
All right, I think that busts the day's idiom quota.
Today's task will be going through Accessible Sudoku, which was being developed in Godot 3, to continue the migration into Godot 4.
Why?
Why convert to Godot 4? Why not just keep going with Godot 3.x and release the game?
In part I want to understand what's involved with moving a large (for me) project between major revisions of its framework. To gain a deeper understanding of the work involved with major changes.
Another part is that the Sudoku project has been a learning experience for me. In a number of places I've forced that round peg into the square hole.
So the conversion gives me experience with Godot 4 while forcing me to go through all of the code with a fine-toothed debugger to ensure things are working well.
What's been changed so far?
Well ... Motivation is a hell of a thing. According to `git log
` I last worked on this conversion back at the end of April.
Main menu finally loads
* Commented out a bunch of font and theme code since the manner in which it's handled has changed.
Ok, so it's been a while and last state was the main menu loading. Good start. Let's see what I changed in the scripts, after Godot's project upgrade tool was done with the import, with `git diff 3.x 4.0.2 -- Scripts/*
` (coupled with the Godot guide *).
onready
changed to@onready
annotation *- BaseButton signals changed
- 3.5:
if self.my_unique_button.pressed:
- 4.0:
if self.my_unique_button.is_pressed():
- 3.5:
- Signal connections changed
- 3.5:
self.save_dialog.get_ok().connect("pressed", self, "show_location_dialog")
- 4.0:
self.save_dialog.get_ok_button().connect("pressed", Callable(self, "show_location_dialog"))
- 3.5:
- Thread handling changed
- Timer handling changed
- Theme and font handling (WIP)
What's next?
The main menu is loading but the system is unstable. The first goal should be to start a new game, save, reload, and finish for the basic play loop. Beyond that will be validating the data layer and expanding the generator.
As I go through to whack-a-bug, issues will be tracked in the git repo and a kanban board. This will allow me to offload the work (without losing track) to future-me, so present-me can focus on the higher priority task.
Whack-a-bug
Mostly it's handling connection changes and minor name changes so far. Little things like InputEventMouseButton changing doubleclick
to double_click
or a button's pressed
attribute being changed to a signal and requiring a covertion to is_pressed()
. These changes make perfect sense once they're laid out, but first you have to find them.
Versions
- Godot: 4.0.2
* References
- Godot guide: Upgrading from Godot 3 to Godot 4
- Godot GDScript reference: @onready annotation
Comments