# Defold 1.8.1 BETA

**URL:** <https://forum.defold.com/t/defold-1-8-1-beta/76917>\
**Category:** Release notes\
**Created:** [May 13, 2024, 10:10am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917 "2024-05-13T10:10:51Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 13, 2024, 10:10am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/1 "2024-05-13T10:10:51Z")

</div>

# Defold 1.8.1 BETA

The latest beta is now released, and we invite those interested in beta testing the new features in the editor and engine to join now.  
The beta period will be 2 weeks and the next planned stable release is two weeks from now.

We hope this new workflow will highlight any issues earlier, and also get valuable feedback from our users. And please comment if you come up with ideas on improving on this new workflow.

Please report any engine issues in this thread or in [issues](https://github.com/defold/defold/issues) using Help → Report Issue

Thx for helping out!

## 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 [http://d.defold.com/beta/](http://d.defold.com/beta/)

## Overview

Defold 1.8.1 Beta includes new engine features like error handling for file writes, options for disabling LiveUpdate auto-mounting, and support for Lua transpilers, new and improved camera component and API, as well as numerous bug fixes related to meshes, sprites, fonts, HTTP requests, and editor UI issues.

We’d like to highlight the **initial support for Lua transpilers** in the build pipeline (both editor and bob). The first language that can be used to try the transpiler feature is [**Teal**](https://github.com/teal-language/tl) — a typed dialect of Lua. You will need to add [teal extension](https://github.com/defold/extension-teal) to the dependencies to try it out. The support is currently limited to transpilation only and excludes automatic extern generation for Defold’s Lua APIs. This means it is more useful for writing type-safe standalone logic than interacting with Defold runtime, though teal allows writing necessary externs yourself.

The first iteration of an improved camera component has been added in this version of Defold. The camera API is now available in all scripts (including render scripts and gui scripts) via the `camera` namespace, and contain new functionality to bind a camera to the renderer instead of passing explicit view and projection matrices to it.

## Summary

- **NEW** : ([#8870](https://github.com/defold/defold/pull/8870)) Add error reason for fwrite in sys.save
- **NEW** : ([#8857](https://github.com/defold/defold/pull/8857)) Add a new option in `game.project`: `liveupdate.mount_on_start`, which disables auto-mounts at the start of the game.
- **NEW** : ([#8868](https://github.com/defold/defold/pull/8868)) Camera component refactor + improved camera module
- **NEW** : ([#8284](https://github.com/defold/defold/issues/8284)) Use Teal as a typed Lua alternative
- **NEW** : ([#8843](https://github.com/defold/defold/pull/8843)) Add ogg validation in the editor
- **FIX** : ([#8882](https://github.com/defold/defold/pull/8882)) Support building a mesh without any samplers assigned
- **FIX** : ([#8845](https://github.com/defold/defold/pull/8845)) Reset buttons state when focus lost.
- **FIX** : ([#8819](https://github.com/defold/defold/pull/8819)) Make sure go.get\_world\_position() returns the correct value when called from the init() function.
- **FIX** : ([#8844](https://github.com/defold/defold/pull/8844)) Fixed canvas flickering in the HTML5 bundle when the window is being resized.
- **FIX** : ([#8853](https://github.com/defold/defold/pull/8853)) Support using no color when writing custom vertex attribute for sprites
- **FIX** : ([#8864](https://github.com/defold/defold/pull/8864)) Added missing lua\_source\_ddf.proto to dmSDK
- **FIX** : ([#8880](https://github.com/defold/defold/pull/8880)) Fixed crash when sprite material uses N samplers but shaders uses less than N samplers.
- **FIX** : ([#8886](https://github.com/defold/defold/pull/8886)) Fixed an issue where font metrics were incorrect for monospaced fonts.
- **FIX** : ([#8893](https://github.com/defold/defold/pull/8893)) Engine crashes when producing secondary uv sets
- **FIX** : ([#8906](https://github.com/defold/defold/pull/8906)) Handle ‘path’ option in http.request for html5 implementation.
- **FIX** : ([#8879](https://github.com/defold/defold/pull/8879)) [Web] Fix sound play while AudioContext is suspended
- **FIX** : ([#8837](https://github.com/defold/defold/pull/8837)) Allow setting Image property when multi-selecting
- **FIX** : ([#8839](https://github.com/defold/defold/pull/8839)) Limit the number of rendered errors
- **FIX** : ([#8883](https://github.com/defold/defold/pull/8883)) Changing from a material with an overridden vertex attribute causes an assert

## Engine

**NEW** : ([#8870](https://github.com/defold/defold/pull/8870)) **Add error reason for fwrite in sys.save**  
Fixed an issue where sys.save doesn’t output the reason why it couldn’t write to a file.

**NEW** : ([#8857](https://github.com/defold/defold/pull/8857)) **Add a new option in `game.project`: `liveupdate.mount_on_start`, which disables auto-mounts at the start of the game.**  
In some cases, it might be useful to fully control from the code what exactly needs to be mounted instead of using auto-mount at the start of the application. Now, this is possible to do using the `liveupdate.mount_on_start` checkbox in `game.project`.

**NEW** : ([#8868](https://github.com/defold/defold/pull/8868)) **Camera component refactor + improved camera module**  
The camera script module and the camera component has been updated:

- The camera component will automatically acquire focus when it is created. There is no more need to send the “acquire\_camera\_focus” message to the component. To disable the camera, use go.set(“#camera”, “disable”) instead.

`NOTE: This is a subtle change in behaviour. Previously you had to send a "acquire_camera_focus" message to the component for a camera to be updated. With the new code path, all cameras will be enabled and updated automatically until you actively send an "unacquire_camera_focus" message. Since the old behaviour was so cumbersome to work with, we **do not consider this as a breaking change** - instead we consider it to be a bugfix or simply as a workflow improvement.`

- All scripts can now access the `camera` namespace. There are new functions in the module that can now be used:

```lua
-- returns a list of all currently available cameras. each entry in the table is a camera URL (see msg.url)
local all_cameras = camera.get_cameras()
-- get/set properties. note that not all properties can be set
camera.get_projection(camera_url) -- read-only
camera.get_view(camera_url)-- read-only
camera.get_aspect_ratio(camera_url)
camera.set_aspect_ratio(camera_url)
camera.get_fov(camera_url)
camera.set_fov(camera_url)
camera.get_near_z(camera_url)
camera.set_near_z(camera_url)
camera.get_far_z(camera_url)
camera.set_far_z(camera_url)
camera.get_orthographic_zoom(camera_url)
camera.set_orthographic_zoom(camera_url)

```

- The render API has a new function `render.set_camera(camera_url, [options])` - this can be used in a render script to automatically use the view and projection matrices from the camera in the next draw call:

```lua
-- a typical camera based render loop can now look like this
for k,v in pairs(camera.get_cameras()) do
    -- note that the view and projection matrices previously set up
    -- using render.set_view and render.set_projection will be wiped by this call
    -- the 'use_frustum' option will use the cameras view projection matrix for frustum culling
    -- this will take precedence over any frustum passed in to the render.draw function
    render.set_camera(v, { use_frustum = true })
    -- set other drawing states
    render.draw(pred_scene)
end
-- unbind the camera for custom rendering
render.set_camera()
render.set_view(...)
render.set_projection(...)
render.draw(pred_gui)

```

The next iteration of improving the camera component involves:

- adding a viewport property to the camera that will automatically be set when calling render.set\_camera
- adding coordinate system conversion functions (screen-\>world, world-\>screen, project/unproject and so on)

**FIX** : ([#8882](https://github.com/defold/defold/pull/8882)) **Support building a mesh without any samplers assigned**  
Bob can now bundle projects with meshes that have no textures specified.

**FIX** : ([#8845](https://github.com/defold/defold/pull/8845)) **Reset buttons state when focus lost.**

**FIX** : ([#8819](https://github.com/defold/defold/pull/8819)) **Make sure go.get\_world\_position() returns the correct value when called from the init() function.**  
Fixed an issue where objects in deep hierarchies returned the wrong value for `go.get_world_position()` when called from `init()`.

**FIX** : ([#8844](https://github.com/defold/defold/pull/8844)) **Fixed canvas flickering in the HTML5 bundle when the window is being resized.**  
Fixed an issue where the game’s canvas flickers black (a background color) when resizing the browser window.

**FIX** : ([#8853](https://github.com/defold/defold/pull/8853)) **Support using no color when writing custom vertex attribute for sprites**  
Fixed an issue where a sprite was using a material with a “color” semantic type that didn’t get written to the vertex buffer.

**FIX** : ([#8864](https://github.com/defold/defold/pull/8864)) **Added missing lua\_source\_ddf.proto to dmSDK**

**FIX** : ([#8880](https://github.com/defold/defold/pull/8880)) **Fixed crash when sprite material uses N samplers but shaders uses less than N samplers.**

**FIX** : ([#8886](https://github.com/defold/defold/pull/8886)) **Fixed an issue where font metrics were incorrect for monospaced fonts.**  
Monospaced fonts should always use the fixed Advance Width for each symbol as its width, instead of the glyph’s real width.

**FIX** : ([#8893](https://github.com/defold/defold/pull/8893)) **Engine crashes when producing secondary uv sets**

**FIX** : ([#8906](https://github.com/defold/defold/pull/8906)) **Handle ‘path’ option in http.request for html5 implementation.**  
Add ‘path’ parameter handling for html5 implementation in `http.request` function.

**FIX** : ([#8879](https://github.com/defold/defold/pull/8879)) **[Web] Fix sound play while AudioContext is suspended**

## Editor

**NEW** : ([#8284](https://github.com/defold/defold/issues/8284)) **Use Teal as a typed Lua alternative**  
Follow-up prototyping task to [Investigation: any options of using type system with Lua (strictly typed or gradually typed Lua) · Issue #6398 · defold/defold · GitHub](https://github.com/defold/defold/issues/6398)

**NEW** : ([#8843](https://github.com/defold/defold/pull/8843)) **Add ogg validation in the editor**

**FIX** : ([#8837](https://github.com/defold/defold/pull/8837)) **Allow setting Image property when multi-selecting**

**FIX** : ([#8839](https://github.com/defold/defold/pull/8839)) **Limit the number of rendered errors**

**FIX** : ([#8883](https://github.com/defold/defold/pull/8883)) **Changing from a material with an overridden vertex attribute causes an assert**  
Fixed an issue where a component has an overridden vertex attribute and the user changes the material where the attribute doesn’t exist. In this case the editor triggers an assert which leaves the editor in a bad state.

---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 13, 2024, 10:11am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/2 "2024-05-13T10:11:53Z")

</div>



---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 13, 2024, 1:38pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/3 "2024-05-13T13:38:48Z")

</div>



---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [May 13, 2024, 1:51pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/4 "2024-05-13T13:51:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 14, 2024, 9:10am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/5 "2024-05-14T09:10:11Z")

</div>

Updated with information about the changes in the camera component (that somehow got missed in the release notes).

---

<div class="post-metadata">

**Author:** ![gianmichele](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gianmichele/32/24028_2.png) [@gianmichele](https://forum.defold.com/u/gianmichele)\
**Post date:** [May 14, 2024, 9:19am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/6 "2024-05-14T09:19:56Z")

</div>

Lovely!

Looking forward to the next iteration. It took me a while to get familiar with the render script and the coordinate system so I know how other users might feel in that area.

---

<div class="post-metadata">

**Author:** ![SalavatR](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/salavatr/32/43217_2.png) [@SalavatR](https://forum.defold.com/u/SalavatR)\
**Post date:** [May 15, 2024, 7:20am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/7 "2024-05-15T07:20:19Z")

</div>

Hi!  
try to migrate from 1.6.4, and got this [Editor crashes on startup with particular spine file · Issue #165 · defold/extension-spine · GitHub](https://github.com/defold/extension-spine/issues/165#issuecomment-2111625171) , same problem on 1.8.0

---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 15, 2024, 1:12pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/8 "2024-05-15T13:12:43Z")

</div>

This has been fixed (in the Spine repository).

---

<div class="post-metadata">

**Author:** ![aglitchman](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aglitchman/32/19432_2.png) [@aglitchman](https://forum.defold.com/u/aglitchman)\
**Post date:** [May 15, 2024, 5:00pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/9 "2024-05-15T17:00:48Z")

</div>

> [@jhonny.goransson](#):
>
> **NEW** : ([#8284](https://github.com/defold/defold/issues/8284)) **Use Teal as a typed Lua alternative**  
> Follow-up prototyping task to [Investigation: any options of using type system with Lua (strictly typed or gradually typed Lua) · Issue #6398 · defold/defold · GitHub](https://github.com/defold/defold/issues/6398)

A fantastic addition! Btw I don’t see any syntax highlighting for .tl files. Is it not implemented yet?

---

<div class="post-metadata">

**Author:** ![vlaaad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/vlaaad/32/10538_2.png) [@vlaaad](https://forum.defold.com/u/vlaaad)\
**Post date:** [May 15, 2024, 5:23pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/10 "2024-05-15T17:23:19Z")

</div>

Yes, not implemented.

---

<div class="post-metadata">

**Author:** ![schlista](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/schlista/32/33758_2.png) [@schlista](https://forum.defold.com/u/schlista)\
**Post date:** [May 15, 2024, 10:06pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/11 "2024-05-15T22:06:27Z")

</div>

I can’t wait to check out the new camera improvements. Not making us acquire camera is a great move… Especially for beginners.

---

<div class="post-metadata">

**Author:** ![AarrrBee](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aarrrbee/32/24978_2.png) [@AarrrBee](https://forum.defold.com/u/AarrrBee)\
**Post date:** [May 16, 2024, 9:15am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/12 "2024-05-16T09:15:00Z")

</div>

It’s necessary to manually select the staging build server in this beta as reported [here](https://github.com/defold/defold/issues/8936) and confirmed by me (if I don’t enter the URL, I don’t get a build)  
I thought I didn’t have to do that now because of [Select the default build server based on channel by vlaaad · Pull Request #8318 · defold/defold · GitHub](https://github.com/defold/defold/pull/8318) ?

---

<div class="post-metadata">

**Author:** ![vlaaad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/vlaaad/32/10538_2.png) [@vlaaad](https://forum.defold.com/u/vlaaad)\
**Post date:** [May 16, 2024, 9:24am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/13 "2024-05-16T09:24:14Z")

</div>

Hmm. So, was your build server url set to empty string?

---

<div class="post-metadata">

**Author:** ![AarrrBee](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aarrrbee/32/24978_2.png) [@AarrrBee](https://forum.defold.com/u/AarrrBee)\
**Post date:** [May 16, 2024, 9:33am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/14 "2024-05-16T09:33:02Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![bob\_dev](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@bob\_dev](https://forum.defold.com/u/bob_dev)\
**Post date:** [May 17, 2024, 12:20pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/15 "2024-05-17T12:20:05Z")

</div>

Have not tested yet but:

Typed Lua is the most wholesome best addition you probably could make for human error reduction. Very interested.

I’m not sure about your plans for it. Does it mean we can write code inside defold editor but have proper checks if a variable is mispelled, or a typo is made?

I am currentl also using Rendy. The only actual reason I use rendy is because I am using a perspective camera and need reliable world to screen and screen to world. The existing surces from defold or other places really didn’t work well with perspective transforms, distorting the coordinates at the edges. Something that rendy for some reason avoids.

Just contextual feedback. Great work.

---

<div class="post-metadata">

**Author:** ![jhonny.goransson](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jhonny.goransson/32/3864_2.png) [@jhonny.goransson](https://forum.defold.com/u/jhonny.goransson)\
**Post date:** [May 17, 2024, 12:48pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/16 "2024-05-17T12:48:30Z")

</div>

> [@bob\_dev](#):
>
> The only actual reason I use rendy is because I am using a perspective camera and need reliable world to screen and screen to world.

Yes, we plan to add coordinate conversion into the camera API as first-class functions, so you should be able to use them without installing additional extensions.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [May 18, 2024, 10:12am UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/17 "2024-05-18T10:12:16Z")

</div>

> [@bob\_dev](#):
>
> I’m not sure about your plans for it. Does it mean we can write code inside defold editor but have proper checks if a variable is mispelled, or a typo is made?

Yes, you will get build errors if you write Teal code which uses the wrong type. Also, with the integration of a Lua Language Server in the next Defold release you’ll also get a lot of checking while typing code even if you don’t use Teal.

---

<div class="post-metadata">

**Author:** ![bob\_dev](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@bob\_dev](https://forum.defold.com/u/bob_dev)\
**Post date:** [May 18, 2024, 1:23pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/18 "2024-05-18T13:23:21Z")

</div>

Very impressed!

---

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [May 20, 2024, 6:11pm UTC](https://forum.defold.com/t/defold-1-8-1-beta/76917/19 "2024-05-20T18:11:21Z")

</div>

> [@jhonny.goransson](#):
>
> **FIX** : ([#8844](https://github.com/defold/defold/pull/8844)) **Fixed canvas flickering in the HTML5 bundle when the window is being resized.**  
> Fixed an issue where the game’s canvas flickers black (a background color) when resizing the browser window.

If you use custom resize logic, do not forget to fix it. Or you will get low fps  
CUSTOM\_PARAMETERS[‘resize\_window\_callback’] = resize\_game\_canvas;
