# Defold 1.9.5 BETA

**URL:** <https://forum.defold.com/t/defold-1-9-5-beta/78759>\
**Category:** Release notes\
**Created:** [November 4, 2024, 2:09pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759 "2024-11-04T14:09:49Z")\
**Posts on this page:** 18\
**Page:** 1

<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:** [November 4, 2024, 2:09pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/1 "2024-11-04T14:09:49Z")

</div>

# Defold 1.9.5 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.5 - beta · defold/defold · GitHub](https://github.com/defold/defold/releases/tag/1.9.5-beta)

## Summary

- **NEW** : ([#9636](https://github.com/defold/defold/pull/9636)) Remove unused world constant from tile\_map in builtins (by FlexYourBrain)
- **NEW** : ([#9644](https://github.com/defold/defold/pull/9644)) Automatically calculate the maximum number of game objects required for a runtime collection (by AGulev)
- **NEW** : ([#9649](https://github.com/defold/defold/pull/9649)) Add the `engine-setup` script tag to the HTML5 template (by aglitchman)
- **NEW** : ([#9659](https://github.com/defold/defold/pull/9659)) Misc platform fixes for extensions (by Jhonnyg)
- **NEW** : ([#9562](https://github.com/defold/defold/pull/9562)) Add a read-only property for the Current Node in the GUI. (by AGulev)
- **NEW** : ([#9475](https://github.com/defold/defold/pull/9475)) Http cache improvements (by Jhonnyg)
- **NEW** : ([#9610](https://github.com/defold/defold/pull/9610)) Add support for pivot points for atlases (by JCash)
- **FIX** : ([#9671](https://github.com/defold/defold/pull/9671)) Added new property in `game.project` to specify minimum log level `project.minimum_log_level` (by AGulev)
- **FIX** : ([#9566](https://github.com/defold/defold/pull/9566)) Add alpha blending before rendering profiler (by Jhonnyg)
- **FIX** : ([#9499](https://github.com/defold/defold/pull/9499)) Added Switch Pro Controller for Windows (by wistpotion)
- **FIX** : ([#9550](https://github.com/defold/defold/pull/9550)) Fix multi-materials in one skinning model (by jixingcn)
- **FIX** : ([#9563](https://github.com/defold/defold/pull/9563)) Only split combined samplers when needed (by Jhonnyg)
- **FIX** : ([#9643](https://github.com/defold/defold/pull/9643)) Fix crash when MaxDynamicTextures == 0. (by ekharkunov)
- **FIX** : ([#9559](https://github.com/defold/defold/pull/9559)) Fixed issue where the horizontal scroll bar was covering the last line in the console or the code editor (by AGulev)
- **FIX** : ([#9637](https://github.com/defold/defold/pull/9637)) Proper engine shutdown (by AGulev)

## Engine

**NEW** : ([#9636](https://github.com/defold/defold/pull/9636)) **‘Remove unused world constant from tile\_map in builtins’** by FlexYourBrain  
The unused `world` constant has been removed from the `tile_map` material from builtins.

**NEW** : ([#9644](https://github.com/defold/defold/pull/9644)) **‘Automatically calculate the maximum number of game objects required for a runtime collection’** by AGulev  
Bob calculates how many game objects are used by each collection. If the collection has no `factory` or `collectionfactory` component, this value is used to allocate the exact number of GameObjects for the world (collection proxy). Otherwise, `collection.max_instances` is used.

This helps save memory, especially in cases where the game has a world that requires a large `max_instances` value for the main game scene, but smaller and static extra scenes (such as popups, menus, etc.).

**NEW** : ([#9649](https://github.com/defold/defold/pull/9649)) **‘Add the `engine-setup` script tag to the HTML5 template’** by aglitchman  
This change brings back the `engine-setup` section to the HTML5 template. Developers can use it and native extensions can inject code here to add game startup parameters via the `CUSTOM_PARAMETERS` object, setup loading progress listeners, override the `dmloader.js` functions.

**NEW** : ([#9659](https://github.com/defold/defold/pull/9659)) **‘Misc platform fixes for extensions’** by Jhonnyg  
A new DMSDK function has been added that can get the OpenGL id from a rendertarget: `OpenGLGetRenderTargetId`. Also, Vulkan support for iOS is working correctly again after recent GLFW changes.

**FIX** : ([#9671](https://github.com/defold/defold/pull/9671)) **‘Added new property in `game.project` to specify minimum log level `project.minimum_log_level`’** by AGulev  
Using the new `game.project` property `project.minimum_log_level`, it is possible to specify the minimum log level for the logging system. Only logs at the minimum level or higher will be shown.

**FIX** : ([#9566](https://github.com/defold/defold/pull/9566)) **‘Add alpha blending before rendering profiler’** by Jhonnyg  
Forced the in-game profiler to always be rendered with alpha blending.

**FIX** : ([#9499](https://github.com/defold/defold/pull/9499)) **‘Added Switch Pro Controller for Windows’** by wistpotion  
Added Switch Pro Controller for Windows.

**FIX** : ([#9550](https://github.com/defold/defold/pull/9550)) **‘Fix multi-materials in one skinning model’** by jixingcn  
Fixed an issue where custom vertex attributes are applied only from the first material in a situation where the same material is used across multiple material slots in a model file, but where each sub-material has overridden attributes.

In the .model file, the order of materials must be the same as in the original model file(.glb). (Notice: the defold editor will reorder all materials by name when you edit and save the model.)

**FIX** : ([#9563](https://github.com/defold/defold/pull/9563)) **‘Only split combined samplers when needed’** by Jhonnyg  
Partial fix for #9533, the issue will still persist when building with WebGPU.

**FIX** : ([#9643](https://github.com/defold/defold/pull/9643)) **‘Fix crash when MaxDynamicTextures == 0.’** by ekharkunov  
Setting dynamic textures to zero in GUIs no longer crashes the engine when running.

## Editor

**NEW** : ([#9562](https://github.com/defold/defold/pull/9562)) **‘Add a read-only property for the Current Node in the GUI.’** by AGulev  
Added a new read-only property `Current Nodes` for `GUI` to display the number of nodes currently being used in the GUI.

**NEW** : ([#9475](https://github.com/defold/defold/pull/9475)) **‘Http cache improvements’** by Jhonnyg  
Several improvements to the HTTP support in the engine has been made:

- Restarting a project from the editor should be significantly faster for large projects
- HTTP requests via the `http.request` function for large files should also be significantly faster
- HEAD requests in the engine should be working correctly now - you can use a HEAD request to get the size of a remote file

**NEW** : ([#9610](https://github.com/defold/defold/pull/9610)) **‘Add support for pivot points for atlases’** by JCash  
The images in an atlas now have support for a setting pivot point.  
The pivot is defined in units, where (0,0) is top left corner of the image, and (1,1) is bottom right of the image.  
The pivot is allowed to be outside of the [0, 1] range.  
Default is (0.5, 0.5), which is the middle of the image.

**FIX** : ([#9559](https://github.com/defold/defold/pull/9559)) **‘Fixed issue where the horizontal scroll bar was covering the last line in the console or the code editor’** by AGulev  
Fixed an issue where the horizontal scrollbar made it impossible to interact with the last line in the console or the code editor.

**FIX** : ([#9637](https://github.com/defold/defold/pull/9637)) **‘Proper engine shutdown’** by AGulev  
Engine side fix for [Setting the game object max count too high causes a crash · Issue #9606 · defold/defold · GitHub](https://github.com/defold/defold/issues/9606)

The engine shouldn’t crash on De-init if error happened during initialization

---

<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:** [November 4, 2024, 7:24pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/2 "2024-11-04T19:24:51Z")

</div>



---

<div class="post-metadata">

**Author:** ![Alex\_8BitSkull](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/alex_8bitskull/32/5424_2.png) [@Alex\_8BitSkull](https://forum.defold.com/u/Alex_8BitSkull)\
**Post date:** [November 4, 2024, 10:21pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/3 "2024-11-04T22:21:35Z")

</div>

Great release! Love seeing the contributors listed.

I seem to have an issue in that prints (DEBUG:SCRIPT: specifically) aren’t displaying in the console anymore in 1.9.5.

---

<div class="post-metadata">

**Author:** ![ThinkNathan](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/thinknathan/32/32599_2.png) [@ThinkNathan](https://forum.defold.com/u/ThinkNathan)\
**Post date:** [November 4, 2024, 11:50pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/4 "2024-11-04T23:50:25Z")

</div>

The [default minimum log level appears to be 2](https://github.com/defold/defold/pull/9671/files). Debug message levels are 0 and 1, so they are hidden by default.

Have you tried setting `minimum_log_level` to 0 or 1? Apologies if you’ve already tried and I missed it.

---

<div class="post-metadata">

**Author:** ![Alex\_8BitSkull](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/alex_8bitskull/32/5424_2.png) [@Alex\_8BitSkull](https://forum.defold.com/u/Alex_8BitSkull)\
**Post date:** [November 5, 2024, 9:21am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/5 "2024-11-05T09:21:55Z")

</div>

That was precisely the issue, thank you!

I wonder if this default is appropriate? It adds a relatively obscure step to “Hello world!”, and I foresee us having to coach newbies on this frequently.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [November 5, 2024, 9:56am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/6 "2024-11-05T09:56:20Z")

</div>

Thanks, I’ll take a look

---

<div class="post-metadata">

**Author:** ![Dragosha](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dragosha/32/5103_2.png) [@Dragosha](https://forum.defold.com/u/Dragosha)\
**Post date:** [November 5, 2024, 10:10am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/7 "2024-11-05T10:10:20Z")

</div>

> [@britzl](#):
>
> Add support for pivot points for atlases (by JCash)

Super! And it works.  
The only issue I found was a small bug in displaying the bounding box frame in the editor when the pivot of the sprite is shifted. I.e. frames are still shown as if the pivot remained in the centre of the sprite. Clicking on sprites and selecting objects works correctly.

 ![2024-11-05_14-49-44](https://forum-defold-uploads.b-cdn.net/original/3X/0/4/040d00f06c443a3f495b8011be395ed51928379c.jpeg)

And also a bit frustrating to set the pivot in case the sprite in the atlas was rotated when packing. I think visual marker will solve this situation.

 ![2024-11-05_15-01-59](https://forum-defold-uploads.b-cdn.net/original/3X/5/0/50e4e72cc9ebf609efd53c8d131e2a7556393c9b.jpeg)

How it works :

> [@Teaser Fridays and Roadmap talks](https://forum.defold.com/t/teaser-fridays-and-roadmap-talks/2803/238):
>
> Yay! Tried new beta 1.9.5 The video shows how the same scene works with the new sprite pivot points. Just set the Y to 1, meaning the pivot point is at the bottom of the sprite. And now sorting the character with pivot in feet and sprites works the same way.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [November 5, 2024, 5:51pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/8 "2024-11-05T17:51:58Z")

</div>

Could you please open issues for these? Thanks!

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [November 5, 2024, 6:03pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/9 "2024-11-05T18:03:32Z")

</div>

> [@Alex\_8BitSkull](#):
>
> That was precisely the issue, thank you!
> 
> I wonder if this default is appropriate? It adds a relatively obscure step to “Hello world!”, and I foresee us having to coach newbies on this frequently.

Default value should be `USER DEBUG = 1`, I’ll fix it in beta tomorrow

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [November 5, 2024, 8:24pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/10 "2024-11-05T20:24:13Z")

</div>

> [@britzl](#):
>
> **FIX** : ([#9559](https://github.com/defold/defold/pull/9559)) **‘Fixed issue where the horizontal scroll bar was covering the last line in the console or the code editor’** by AGulev

Thank you @AGulev for this fix! 😃

---

<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:** [November 7, 2024, 7:26am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/11 "2024-11-07T07:26:48Z")

</div>

Testing the latest beta with the rive extension.  
Just downloaded the project from github and tried to build. I’m getting this error:

 ![Screenshot 2024-11-07 at 07.25.36](https://forum-defold-uploads.b-cdn.net/original/3X/3/1/31e6c66eeae4d3730c9721e4bda75cb6d5d79563.png)

---

<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:** [November 7, 2024, 8:22am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/12 "2024-11-07T08:22:00Z")

</div>

Thanks. I updated the description. Please try again.

---

<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:** [November 7, 2024, 10:05pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/13 "2024-11-07T22:05:38Z")

</div>

All working, and it’s awesome!

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [November 8, 2024, 3:49pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/14 "2024-11-08T15:49:46Z")

</div>

> [@Dragosha](#):
>
> The only issue I found was a small bug in displaying the bounding box frame in the editor when the pivot of the sprite is shifted. I.e. frames are still shown as if the pivot remained in the centre of the sprite. Clicking on sprites and selecting objects works correctly.

This issue fixed (with a couple more related issues) and merged into beta. It will be available in ~1h

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [November 15, 2024, 12:13pm UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/15 "2024-11-15T12:13:58Z")

</div>

Just a reminder that this version still in beta, please test your projects with it to make sure everything works fine. Thank you!

---

<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:** [November 16, 2024, 5:40am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/16 "2024-11-16T05:40:15Z")

</div>

Something wrong with pivots and resource.set\_atlas(self.atlas\_empty, atlas)

In my game i use liveupdate for skins.atlas. I have empty atlas in main collectuibn then i replaced it with liveupdate version.

1.9.4

 ![2024-11-16_10-24-46](https://forum-defold-uploads.b-cdn.net/original/3X/b/1/b16a85b5b2f1455507a2cc167841e0315342e3b5.jpeg)  
1.9.5 (8625c758fac8ce21fdadedaf394baf7651cf2bb2)  
 ![2024-11-16_10-23-32](https://forum-defold-uploads.b-cdn.net/original/3X/2/6/261ecf08df70aa00004884a2dd4c59bd14c190c5.jpeg)

```lua
local atlas = resource.get_atlas(self.atlas)
		for idx, geometry in ipairs(atlas.geometries) do
			local anim = atlas.animations[idx]
			local data = {
				id = anim.id,
			}
			COMMON.skins_atlas.animations[anim.id] = data
			COMMON.skins_atlas.animations[hash(anim.id)] = data
			--hotfix for rotated images
			if geometry.uvs[1] ~= geometry.uvs[3] then
				data.need_rotate = true
				local tc = geometry.vertices
				--add rotation to geometry
				local new_vertices = {
					tc[3], tc[4],
					tc[5], tc[6],
					tc[7], tc[8],
					tc[1], tc[2],
				}

				geometry.vertices = new_vertices--]]
				--now rotate uv and vertices to by 90
			end
		end
		resource.set_atlas(self.atlas_empty, atlas)

```

Pivot is on left top corner not in center by default.

1)i don’t set width and height for geometry. get\_atlas not give me that value:(  
[https://github.com/defold/defold/blob/6f27dcd273f65e2db7025fcae024ce1e4da7e6f3/engine/gamesys/src/gamesys/scripts/script\_resource.cpp#L1920C11-L1936C14](https://github.com/defold/defold/blob/6f27dcd273f65e2db7025fcae024ce1e4da7e6f3/engine/gamesys/src/gamesys/scripts/script_resource.cpp#L1920C11-L1936C14)  
You calculate pivot but width and height is 0

when i add width and height it fixed

```lua
	local w,h = 0,0
			for vi =1,#geometry.vertices, 2 do
				w = math.max(w, geometry.vertices[vi]);
				h = math.max(h, geometry.vertices[vi+1]);
			end
			geometry.width = w
			geometry.height = h

```

 ![2024-11-16_10-55-07](https://forum-defold-uploads.b-cdn.net/original/3X/b/6/b6bc231ff587db3598510f5c7be3965e03e053f7.jpeg)

---

<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:** [November 16, 2024, 6:01am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/17 "2024-11-16T06:01:21Z")

</div>

1. I think you need to add pivot\_x, pivot\_y, width, height in geometry in resource.get\_atlas.

```lua
DEBUG:SCRIPT: 
{ --[[00000280536F3B10]]
  uvs = { --[[0000028054068220]]
    1 = 785,
    2 = 2,
    3 = 913,
    4 = 2,
    5 = 913,
    6 = 99,
    7 = 785,
    8 = 99
  },
  vertices = { --[[00000280536F3B60]]
    1 = 0,
    2 = 128,
    3 = 0,
    4 = 0,
    5 = 97,
    6 = 0,
    7 = 97,
    8 = 128
  },
  indices = { --[[00000280540682C0]]
    1 = 0,
    2 = 1,
    3 = 2,
    4 = 0,
    5 = 2,
    6 = 3
  }
}

```

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [November 17, 2024, 11:25am UTC](https://forum.defold.com/t/defold-1-9-5-beta/78759/18 "2024-11-17T11:25:37Z")

</div>

I have a PR up for review now: [Changed resource.create\_atlas() pivot to unit space (from texels), to simplfy calculations by JCash · Pull Request #9775 · defold/defold · GitHub](https://github.com/defold/defold/pull/9775)  
The big difference here is that you’ll now specify the pivot in image unit space (0,0), (1,1), as opposed to image texel space. THis way there is no need to have the width/height available.

I also added the pivot + size to the output from get\_atlas().
