Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
24. July 2018


Most scripting languages, GDScript included, are type-less.  Instead of explicitly declaring variable types in script, it is inferred by the compiler or interpreter.   This can make code easier to write but can also make it harder to maintain, especially as complexity increases.  This is why you see solutions like TypeScript for JavaScript, this adds a type layer on top of a type-less language.  If you were hoping to see type support added to GDScript, well great news, that’s exactly what just happened!

In the upcoming release of Godot 3.1, a completely optionial type system has been added to Godot 3.1.

From the Godot news page, details of how the new type system can help:

It is quite common to use a variable only with values of the same type. With the dynamic nature of GDScript, you can inadvertently overwrite a variable with a different type and break your code logic in a way that might be hard to realize.

For instance, if your function expects a number, but you missed an input validation somewhere and is passing a string to it instead, you only will see an error at runtime (and only if you reach that point). In a larger code base, it's quite easy to miss things like that.

With type hints, Godot can know beforehand that you are passing the wrong type and show an error while you are editing the related code, even if you never run it.

You can learn a great deal more about the new type system in Godot 3.1 here.  To see the syntax in action, check out the video below.

GameDev News


15. July 2018


In Godot 2, there was a visual editor for creating shaders, Visual Shader Editor.  It was removed in Godot 3 because low level shader code changes basically broke it.  Now it’s been fixed and Visual Shaders are now back in the current development branch.  In addition to actually running again, there are also some changes between the 2.x and 3.x versions, as announced on the Godot website:

  • New full PBR output nodes
  • No more Vec3 <-> Scalar adapter nodes, conversion is automatic
  • Easier input nodes for more organized graph.
  • Extending it via scripting (creating custom nodes) is possible.
  • Port previews (see blow)

You can see the newly re-enabled visual shader in the following video:

GameDev News


11. June 2018


Just finished adding another tutorial to the ongoing Godot 3 tutorial series, Sound Fx and Music.  This tutorial covers a ton of topics around audio:

  • Playing audio using AudioStreamPlayer
  • Positional audio using AudioStreamPlayer2D
  • Importing and loading audio files, WAV and Ogg
  • Using the Audio Bus
  • Creating special effects such as panning, reverb and chorus
  • Managing volume
  • Using sound with Area2D


The series homepage is available here.

Programming


8. June 2018


Recently Google started rejecting APK files generated by the Godot Game Engine.  APK is the file format for bundled Android applications for deployment to the app store, so this is obviously a pretty serious problem for Godot developers with games on Android.  Thankfully a Godot user created a tool that fixes APK files, making them compatible once again.


Details of using the new tool:

The things you will need are:

  • Your original APK
  • A valid android keystore
  • Jarsigner

The tool takes several command-line options:

  • -j /path/to/jarsigner
  • -k /path/to/keystore
  • -p keystore password
  • -a key alias
  • /path/to/apk

You should be able to recover these settings from the Android export settings of the original game project from the Godot editor.

An example run of the program looks like this:

./godotapkfixer -k ~/tmp/and/debug.keystore -p android -a androiddebugkey GOLTORUS.apk

This is assuming that 'jarsigner' exists in $PATH, or on Windows if the Android studio is installed. If this is not the case the tool can be ran like this:

godotapkfixer.exe -j "C:\Program Files\Java\jdk1.8.0_171\bin\jarsigner.exe" -k "debug store.keystore" -p android -a androiddebugkey GOLTORUS.apk

When using jarsigner from the JDK for instance.

After the program has finished you will find an apkname_fixed.apk in the same directory as the original APK. This APK should now be good to upload back onto the Play store.


The tool is available for download here and the source code is available here.  You can read more about this release here on the Godot website.

GameDev News


23. May 2018


I just realized that even though I have been developing a Godot 3 tutorial series and book for the last several months, I haven’t actually posted it here on the front page of GameFromScratch.  Each tutorial is published as pages instead of posts so it doesn’t appear on the front page or in the GameFromScratch.com timeline!  Ooops…SeriesIntroduction


So anyways… I’m working on both a new tutorial series covering the recently released Godot 3.  If you followed my Godot 1/2 tutorial series you should have a good idea what to expect.  In this case the series is primarily video passed, but don’t worry if you prefer text I am publishing all code samples and assets here on GameFromScratch.  Additionally I am writing a book that parallels the videos published in the series.  While it is not available for purchase yet, I am making WIP chapters available to GFS Patreons as I finish them.


Currently the series covers the following topics:

  • Introduction
  • Getting Started
  • Nodes, Scenes and Trees
  • GDScript Programming 101
  • 2D Graphics, Sprites and Animation
  • Keyboard, Mouse and Joystick Input
  • User Interface Development


The series will expand to cover all aspects of Godot 3 development, including 3D, VR and Mobile development topics.  Expect a chapter on Godot 3 audio to be up shortly.


You can access the homepage to the tutorial series here which in addition to video links, also includes all of the code samples and assets used.  If you prefer to just watch the videos, you can find the YouTube playlist here.

Programming


See More Tutorials on DevGa.me!

Month List