Here’s a look at the issues I faced when I moved over to the lovely Godot 3.0.
Edit: Rémi Verschelde was kind enough to take a look and offer advice and solutions. I’ve included what he said within the context of the origional post.
This was the first problem I had to tackle because the previous fonts were no longer supported and the game wouldn’t run. Fonts have changed quite a bit so I had to instead create a Dynamic Font and set the custom_font property again to a fair few scenes! This took a while. The Your First Game tutorial in the Godot docs has information on importing Dynamic Fonts.
Nice post, that should help many with typically issues.— Rémi Verschelde (@Akien) January 10, 2018
- Fonts: I've had this issue too, while in theory Fonts from 2.1.4 should still be supported (as BitmapFonts). I found that resaving the Font resource in 2.1.4 via the Inspector fixed it for me.
After this, I could at least run the first scene.
Next up was an error I wasn’t expecting! It asked me to change the argument name to something other than the function name. So I guess the editor can tell I don’t really know to code well. “Fair enough,” I thought and moved on.
- Property shadowing: The issue is not that you had a `zoom(zoom)` method, but that the `zoom` parameter shadows the `zoom` property of the Camera2D class: https://t.co/lIivQeYT1N (since you can now do `zoom = 0.5` directly, so we don't let you create local `zoom` variables.— Rémi Verschelde (@Akien) January 10, 2018
get_pos() and set_pos()
I used a lot of
set_pos() with all the different units moving about and such. Without the inclusion of a global search and replace, I looked over my scripts and replaced the functions with just
- set_pos/get_pos: There is an experimental option in the Godot 3 exporter that will convert those automatically for you (but as it's experimental it's unchecked by default). Otherwise a command line tool like `sed` or an IDE can help replace those faster.— Rémi Verschelde (@Akien) January 10, 2018
FPS and OS -> Engine
Frames per second is important information and this has changed from
- FPS OS -> Engine: There are quite a few other methods that were moved from OS to the new Engine singleton. I'd advise people to review its docs if they miss an OS method: https://t.co/XhkOJCviLS— Rémi Verschelde (@Akien) January 10, 2018
The above changes were enough to get the main Battle Scene working! But as you can see, there are many issues to fix! The most pressing are:
- Fix remaining
- Re-write the shader to allow for team colours once again
- Several of my scenes don’t seem to be hiding or showing themselves correctly when asked to
Stay tuned for part two!