Defold 1.9.8 BETA

Defold 1.9.8 BETA

Disclaimer

This is a BETA release, and it might have issues that could potentially be disruptive for you and your teams workflow. Use with caution. Use of source control for your projects is strongly recommended.

Access to the beta

Download the editor or bob.jar from GitHub: Release v1.9.8 - beta · defold/defold · GitHub

Defold 1.9.8

Among a long list of improvements, we’ve now also added a documentation page for our newly added sound streaming support: Read the manual here: Sound Streaming in Defold

Summary

  • NEW: (#10087) Add physics event checkbox to collison component (by JCash)
  • NEW: (#10127) Remove unused luajit-32 and luac-32 executable from bundler (by AGulev)
  • NEW: (#10190) Add support for Android devices with 16 KB memory page sizes (by AGulev)
  • NEW: (#9971) Prefer 48khz audio devices, and fallback to 44.1khz (by JCash)
  • NEW: (#10230) Add http module to editor scripts (by vlaaad)
  • NEW: (#10045) Add confirmation dialog for Rebuild options (by AGulev)
  • NEW: (#10055) Enable wheel zoom and add related keyboard shortcuts in code view (by sprocketc)
  • NEW: (#10073) Allow editing markdown files (by sprocketc)
  • NEW: (#10096) Allow editing html files (by sprocketc)
  • NEW: (#10099) Disable change tracking for initial project load transactions (by matgis)
  • NEW: (#10098) Default to $XDG_STATE_HOME/Defold instead of $HOME/.Defold for Linux logs (by menaechmi)
  • NEW: (#10032) Introduce pivot point controller in atlas view (by sprocketc)
  • NEW: (#10141) Added arm64-linux to LinuxBundler (by JCash)
  • NEW: (#10173) Add pprint to editor scripts (by vlaaad)
  • NEW: (#10133) Introduce visibility toggle on the outline panel (by sprocketc)
  • NEW: (#10218) Add a new preference to prevent the browser from opening after Build HTML5 (by AGulev)
  • FIX: (#10097) Combined shader resource (by Jhonnyg)
  • FIX: (#10046) Throw a Lua error if nil passed into go.exists() function (by AGulev)
  • FIX: (#10100) Directx12 initial work (by Jhonnyg)
  • FIX: (#10109) Migrate builtin shaders to the new shader pipeline (by Jhonnyg)
  • FIX: (#10229) Remap linux gamepad inputs according to old glfw (by Jhonnyg)
  • FIX: (#10187) Moved http script module to an extension (by JCash)
  • FIX: (#10189) Added http cache support for partial requests in http.request() (by JCash)
  • FIX: (#10198) Fixed an issue where the sys.open_url() function did not work (by AGulev)
  • FIX: (#10210) Added range information to http.request callback (by JCash)
  • FIX: (#10224) Use shader version 330 as default for desktop platforms (by Jhonnyg)
  • FIX: (#10052) Bundling from the editor no longer invalidates build information (by AGulev)
  • FIX: (#10089) Add alternative completions shortcut on macOS (by vlaaad)
  • FIX: (#10108) Activate tabs on right click (by sprocketc)
  • FIX: (#10112) Fix arrow key movement of GUI elements on non default layouts (by sprocketc)
  • FIX: (#10136) Fix debugger on mobile devices (by AGulev)
  • FIX: (#10149) Fix exception when pasting named resources inside Gui scenes (by matgis)
  • FIX: (#10183) Visibility fixes and enhancements (by sprocketc)
  • FIX: (#10200) Zoom at pointer position on mouse wheel (by sprocketc)
  • FIX: (#10170) Add context menu to scene view (by sprocketc)
  • FIX: (#10150) Minor toolbar enhancements (by sprocketc)
  • FIX: (#10216) Fixed an issue where texture compression checkbox was not taken into account when using Build HTML5 from the editor (by AGulev)
  • FIX: (#10207) Add 2d mode toolbar button (by sprocketc)

Engine

NEW: (#10087) ‘Add physics event checkbox to collison component’ by JCash
The collision component now has 3 checkboxes, allowing you to disable the object generating redundant events.
When two collision objects interact, we check if we should send a message to the user, given these checkboxes.
This helps to greatly reduce number of physics events passed to from the engine to the Lua scripting.

E.g. given the “Generate Contact Events” checkboxes:

When using physics.set_listener():

Component A Component B Send Message
:white_check_mark: :white_check_mark: Yes
:x: :white_check_mark: Yes
:white_check_mark: :x: Yes
:x: :x: No

When using the default message handler:

Component A Component B Send Message(s)
:white_check_mark: :white_check_mark: Yes (A,B) + (B,A)
:x: :white_check_mark: Yes (B,A)
:white_check_mark: :x: Yes (A,B)
:x: :x: No

NEW: (#10127) ‘Remove unused luajit-32 and luac-32 executable from bundler’ by AGulev

NEW: (#10190) ‘Add support for Android devices with 16 KB memory page sizes’ by AGulev
Support for 16 KB memory pages will soon be a requirement for the Google Play Store.

The engine now includes an extra flag to ensure compatibility with 16 KB page sizes while remaining fully compatible with 4 KB page size Android devices.

More information is available here:
Support 16 KB page sizes

NEW: (#9971) ‘Prefer 48khz audio devices, and fallback to 44.1khz’ by JCash
We now use the preferred sample rate of the audio devices. It usually means getting 48khz. We also try to fallback to the old 44.1khz setup if the 48khz if not available.

Internally, we also adjust the number of sample frames we process for each audio frame.
if the audio device doesn’t recommend a setting, we will use these defaults:

  • 48000hz → 1024 frames
  • 44100hz → 768 frames
  • -unknown- → we calculate a best guess (see dmSound::GetDefaultFrameCount() )

If the driver doesn’t recommend the frame count, you can set it using sound.sample_frame_count (default = 0)

FIX: (#10097) ‘Combined shader resource’ by Jhonnyg
Refactored shader resources used in engine:
There are no more vertex/fragment/compute resources. Instead there is just a single shader resource that contains shaders for all supported shader stages. This means that two materials that use the same set of vertex and fragment shaders will share the same shader program, instead of instantiating individual programs per material. This will reduce memory as well as open up for fixing multiple issues on non-opengl graphics adapters.

FIX: (#10046) ‘Throw a Lua error if nil passed into go.exists() function’ by AGulev
:warning: Passing nil to go.exists() results in a Lua error, as this aligns with expected behavior and helps catch logical issues in the code.

FIX: (#10100) ‘Directx12 initial work’ by Jhonnyg
This adds a work-in-progress implementation of a Directx12 graphics adapter that can be used for xbox.

FIX: (#10109) ‘Migrate builtin shaders to the new shader pipeline’ by Jhonnyg
The builtin shaders are now written in #version 140 glsl, which means that they will now be compiled to the target shader language with the new shader compile pipeline. To read more about the new pipeline and how to migrate existing shaders, head over to Shader programs in Defold

FIX: (#10229) ‘Remap linux gamepad inputs according to old glfw’ by Jhonnyg
Since the GLFW update to 3.4, gamepad mappings behaves differently on linux. This should now be fixed.

FIX: (#10187) ‘Moved http script module to an extension’ by JCash
This allows us to both exclude it via an app manifest but also allows it to use the extension system to access global contexts like the http cache. To remove the symbol, In the app manifest, add the ScriptHttp to the excluded symbols.

FIX: (#10189) ‘Added http cache support for partial requests in http.request()’ by JCash
This allows the user to do a partial http request, and also to have it cached on disc.

local headers = {}
headers['Range'] = string.format("bytes=%d-%d", 0, 16384-1)
http.request(url, "GET", http_result_fn, headers)

FIX: (#10198) ‘Fixed an issue where the sys.open_url() function did not work’ by AGulev
Fixed an issue on iOS where a deprecated function was used for URL opening, causing it to not work on iOS and iPadOS.

FIX: (#10210) ‘Added range information to http.request callback’ by JCash
We added the following variables for a http request callback:

  • range_start - Start byte offset into the file
  • range_end - End byte offset into the file (invlusive)
  • document_size - The full size of the document (in bytes)

These are always available unless it’s a progress type callback.

local function http_result(self, _id, response)
	if response.status == 200 or response.status == 206 or response.status == 304 then
		print("start", response.range_start)
                print("end", response.range_end)
                print("file size", response.document_size)
		...

FIX: (#10224) ‘Use shader version 330 as default for desktop platforms’ by Jhonnyg
Desktop platforms now crosscompile to GLSL version 330 instead of 140 for Linux and Windows when using the OpenGL backend. Since the OpenGL context is created with version 3.3 as the lowest supported version, this change should have no impact, except to fix a few issues on linux together with AMD GPUs.

Editor

NEW: (#10230) ‘Add http module to editor scripts’ by vlaaad
Editor scripts can now make HTTP requests using the http module, e.g.:

pprint(http.request("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY", {as = "json"}))
-- Output:
-- { --[[0x4de6c2e]]
--   status = 200,
--   headers = { --[[0xa1982c5]]
--     ["content-length"] = "1102",
--     age = "0",
--     vary = { --[[0xe26075e]]
--       "Accept-Encoding",
--       "Accept-Encoding"
--     },
--     ...
--   },
--   body = { --[[0x4b2488fe]]
--     media_type = "image",
--     title = "SpaceX Rocket Launch Plume over California",
--     copyright = "\nMartin LaMontagne\n",
--     date = "2025-02-17",
--     url = "https://apod.nasa.gov/apod/image/2502/FishPlume_LaMontagne_960.jpg",
--     hdurl = "https://apod.nasa.gov/apod/image/2502/FishPlume_LaMontagne_2272.jpg",
--     service_version = "v1",
--     explanation = "What's happened to the sky? Last Monday, the photogenic launch plume from a SpaceX rocket launch created quite a spectacle over parts of southern California and Arizona.  Looking at times like a giant space fish, the impressive rocket launch from Vandenberg Air Force Base near Lompoc, California, was so bright because it was backlit by the setting Sun. The Falcon 9 rocket successfully delivered to low Earth orbit 23 Starlink communications satellites.  The plume from the first stage is seen on the right, while the soaring upper stage rocket is seen at the apex of the plume toward the left. Venus appears at the top of the frame, while a bright streetlight shines on the far right.  The featured image was captured toward the west after sunset from near Phoenix, Arizona."
--   }
-- }

NEW: (#10045) ‘Add confirmation dialog for Rebuild options’ by AGulev
A confirmation dialog has been added for the Rebuild options to prevent accidental rebuilds, which can take a lot of time in large projects.

NEW: (#10055) ‘Enable wheel zoom and add related keyboard shortcuts in code view’ by sprocketc
Some users experience keyboard-layout specific issues with zoom shortcuts in code view. This aims to make code zoom easier by enabling wheel zoom, and by adding the following defaults

  • Ctrl or Meta + Add → zoom in
  • Ctrl or Meta + Subtract → zoom out
  • Ctrl or Meta + 0 → reset zoom

NEW: (#10073) ‘Allow editing markdown files’ by sprocketc
Allow editing markdown files on text view. The web view should be updated accordingly.

NEW: (#10096) ‘Allow editing html files’ by sprocketc
Allow editing html files. The web view should be updated accordingly.

NEW: (#10099) ‘Disable change tracking for initial project load transactions’ by matgis
Improved project load time and peak memory usage when loading large projects in the editor.

NEW: (#10098) ‘Default to $XDG_STATE_HOME/Defold instead of $HOME/.Defold for Linux logs’ by menaechmi
On Linux, the .Defold folder was hardcoded to the $HOME folder. It now follows the XDG spec and uses $XDG_STATE_HOME or $HOME/.local/state/Defold.

NEW: (#10032) ‘Introduce pivot point controller in atlas view’ by sprocketc
Introduced a pivot point controller in atlas view. Snapping while moving the pivot point is enabled on Shift down.

pivot-point

NEW: (#10141) ‘Added arm64-linux to LinuxBundler’ by JCash
You can now add arm64-linux as a platform to Bob.jar.

NEW: (#10173) ‘Add pprint to editor scripts’ by vlaaad
This changeset adds pprint editor script function:

local t = {1, 2, a = 3, b = 4}
t.self = t
pprint(t)

-- Output:
-- { -- [[0x7f8b1b0]]
--   1,
--   2,
--   a = 3,
--   b = 4,
--   self = <table: 0x7f8b1b0>
-- }

NEW: (#10133) ‘Introduce visibility toggle on the outline panel’ by sprocketc
Introduced a visibility toggle to the outline tree. The toggle will be visible on mouse over, or when the node is hidden.

visibility-toggle

NEW: (#10218) ‘Add a new preference to prevent the browser from opening after Build HTML5 by AGulev
Some browsers always create a new tab when opening the same URL.
In such cases, it may be useful to rebuild the HTML5 build without reopening the browser and instead manually update the page.
This is now possible with a new checkbox in Preferences.

FIX: (#10052) ‘Bundling from the editor no longer invalidates build information’ by AGulev
Bundling from the editor no longer overrides the build folder, which means that the building process (Ctrl+B) after the bundling process will not take extra time.

FIX: (#10089) ‘Add alternative completions shortcut on macOS’ by vlaaad
This change adds an alternative completions shortcut on macOS: Alt+Space.

FIX: (#10108) ‘Activate tabs on right click’ by sprocketc
Activate tabs on right click, to fix the context of the displayed menu.

FIX: (#10112) ‘Fix arrow key movement of GUI elements on non default layouts’ by sprocketc
Moving gui elements using arrow keys on non default layouts now works as intended.

FIX: (#10136) ‘Fix debugger on mobile devices’ by AGulev
Fixed issues with debugger on mobile devices and contentless bundles.

FIX: (#10149) ‘Fix exception when pasting named resources inside Gui scenes’ by matgis
Fixed an issue where pasting a named resource inside a Gui scene would throw an exception.

FIX: (#10183) ‘Visibility fixes and enhancements’ by sprocketc
Hide children of invisible nodes without toggling their visibility state, fix hiding models and double clicking on the visibility toggle.

FIX: (#10200) ‘Zoom at pointer position on mouse wheel’ by sprocketc
When 2d-mode is enabled, zooming will now take the pointer position into account, so that the focus point remains the same on scroll. We can use the mouse position to target the point that we want to zoom into, and avoid panning as a separate navigation step. Holding ALT will activate the previous behavior. On 3d-mode the opposite is applied. We maintain a fixed camera target on mouse wheel (as we used to), and pan to the pointed position on ALT down.

zoom-at-pointer-position

FIX: (#10170) ‘Add context menu to scene view’ by sprocketc
Introduce a context menu to scene view.

context-menu

FIX: (#10150) ‘Minor toolbar enhancements’ by sprocketc
Add tooltips to toolbar and separate tool activation buttons from the rest.

Screenshot From 2025-02-03 17-11-24

FIX: (#10216) ‘Fixed an issue where texture compression checkbox was not taken into account when using Build HTML5 from the editor’ by AGulev

FIX: (#10207) ‘Add 2d mode toolbar button’ by sprocketc
Introduced a 2d-mode button that toggles the state of the scene camera. realign-camera now also toggles this state, instead of just switching to 2d. The 3d camera is cached, so we can switch to the previous 3d view.

23 Likes

Amazing release wit a lot of QoL features!

Wow! :heart: Do you have any information/plan if it will be also possible to use this context for Editor Scripts?

3 Likes

No plan, but please add a feature request!

2 Likes
6 Likes

What an absolutely wonderful release!

4 Likes

And a huge thank you to sprocketc (not sure if there’s an handle on the forum) for the amount of features in the editor in this release!

10 Likes

Brill stuff. Not that this is a thing that I know I want yet, however bundling Arm64 did not work for me.

From Ubuntu 22.04.5, running 1.9.8 beta I tried: project->bundle->linux-application->platform-Arm64
And I get:

‘Bundle Failed’.
Build errors: Invalid bob option supplied, see console for details.

Console:
ERROR! arm64-linux is not a supported architecture for arm64-linux platform.
Available architectures: x86_64-linux
ERROR:EXT: Bundling ‘Linux Application…’ failed: prelude.lua:359 Bob invocation failed

(I don’t get an error if I bundle to Windows).

4 Likes

Some significant features for the editor, excellent work, thanks! :blush:

1 Like

Hi @iotaHum , if you update the editor again, is should now be fixed.

1 Like

My editor crashes when I build.

Version 36a63db66b67da8a85ac4478a7b3acd2472b855e

Editor log (I don’t see anything relevant here I think?):

2025-02-19 18:04:41.075 291  [JavaFX-Launcher] WARN  javafx - Unsupported JavaFX configuration: classes were loaded from 'unnamed module @3e998923'
2025-02-19 18:04:42.895 2111 [Thread-4] INFO  com.defold.libs.ResourceUnpacker - deleting old unpack dirs from C:\Users\Alex-desktop\AppData\Local\Defold\unpack
2025-02-19 18:04:42.935 2151 [Thread-4] INFO  com.defold.libs.ResourceUnpacker - Already unpacked for the editor version 36a63db66b67da8a85ac4478a7b3acd2472b855e
2025-02-19 18:04:42.943 2159 [Thread-4] INFO  com.defold.libs.ResourceUnpacker - defold.unpack.path=C:\Users\Alex-desktop\AppData\Local\Defold\unpack\36a63db66b67da8a85ac4478a7b3acd2472b855e
2025-02-19 18:04:50.736 9952 [Timer-0] INFO  editor.updater - {:line 303, :message "Checking for updates", :url "https://d.defold.com/editor2/channels/beta/update-v4.json"}
2025-02-19 18:04:51.084 10300 [Timer-0] INFO  editor.updater - {:line 310, :message "No update found"}
2025-02-19 18:04:58.625 17841 [clojure-agent-send-off-pool-15] INFO  editor.boot - {:line 75, :message "Finished loading editor namespaces.", :namespace-counter 1917}
2025-02-19 18:04:58.706 17922 [clojure-agent-send-off-pool-15] INFO  internal.low-memory - {:line 55, :message "Adding post-gc low-memory notification listener to tenured generation pool.", :threshold-megabytes 11016}
2025-02-19 18:05:05.292 24508 [clojure-agent-send-off-pool-15] INFO  editor.defold-project - {:line nil, :message "Initial resource sync completed in 1.79 s"}
2025-02-19 18:05:18.739 37955 [clojure-agent-send-off-pool-15] INFO  editor.defold-project - {:line 345, :message "Cached loaded save data in system cache.", :total 732, :retained 732, :unretained 0, :limit 20000}
2025-02-19 18:05:18.745 37961 [clojure-agent-send-off-pool-15] INFO  editor.defold-project - {:line nil, :message "Project loading completed in 13.23 s"}
2025-02-19 18:05:19.102 38318 [clojure-agent-send-off-pool-15] INFO  editor.defold-project - {:line nil, :message "Project loaded", :allocated "174.37 MB"}
2025-02-19 18:05:20.179 39395 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - readpipe [git, --version],C:\Program Files\Git\cmd
2025-02-19 18:05:20.259 39475 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - readpipe may return 'git version 2.27.0.windows.1'
2025-02-19 18:05:20.259 39475 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - remaining output:

2025-02-19 18:05:20.265 39481 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - readpipe [git, config, --system, --edit],C:\Program Files\Git\cmd
2025-02-19 18:05:20.348 39564 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - readpipe may return 'C:/Program Files/Git/etc/gitconfig'
2025-02-19 18:05:20.348 39564 [JavaFX Application Thread] DEBUG org.eclipse.jgit.util.FS - remaining output:

2025-02-19 18:05:21.224 40440 [JavaFX Application Thread] INFO  util.http-server - {:line 103, :msg "Http server running", :local-url "http://localhost:55197"}
2025-02-19 18:05:21.329 40545 [clojure-agent-send-off-pool-15] INFO  editor.boot-open-project - {:line 368, :message "project loaded"}

The editor crashes about 70% through building and as far as I can tell no log is generated in the build folder.

May or may not be related, but there was an error when building daabbcc with 1.9.8. I released a new version(3.0.3) two days ago. It wasn’t crashing, though; it was just giving a build error, but it might be worth checking.

1 Like

Thanks for the heads up, will check tomorrow and report back either way!

Crashes as in the editor closes?

Yep!

If the editor crashed, there should be a file named something like hs_err_pid1234.log (numbers would be different) somewhere, probably in a folder where the defold editor app is located, can you find it?

2 Likes

Simpledata extension is not buildable on the beta, the build server is https://build-stage.defold.com:

/defold-simpledata/commonsrc/simpledata_ddf.proto
	Line 3: Import ddf/ddf_extensions.proto is unused.
	Line 5: Import script/ddf_script.proto is unused.
Traceback (most recent call last):
  File "/var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk//bin/ddfc.py", line 29, in <module>
    import dlib
  File "/var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk/lib/python/dlib/__init__.py", line 46, in <module>
    dlib = ctypes.cdll.LoadLibrary(os.path.join(os.environ['DYNAMO_HOME'], libdir, libname))
  File "/usr/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
	Line 5: OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk/lib/x86_64-linux/libdlib_shared.so)
	Line 5: --ddf_out: protoc-gen-ddf: Plugin failed with status code 1.
	Line 5: com.defold.extender.ExtenderException: java.io.IOException: /var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk//ext/bin/x86_64-linux/protoc --plugin=protoc-gen-ddf=/var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk//bin/ddfc_cxx --ddf_out=/tmp/job7363885552552605026/build/defold-simpledata -Ibuild/defold-simpledata/ -Iupload/  -I/var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk//share/proto -I/var/extender/sdk/36a63db66b67da8a85ac4478a7b3acd2472b855e/defoldsdk//ext/include  upload/defold-simpledata/commonsrc/simpledata_ddf.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:645] No syntax specified for the proto file: defold-simpledata/commonsrc/simpledata_ddf.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
2 Likes

Spine also. And every extension that has their own proto files. Working on it.

1 Like

We investigated this issue further on the Discord and it culminated with vlaaad opening this issue:

So it was unrelated to DAABBCC @selimanac , but I have updated anyway for the future :slight_smile:

3 Likes