Do you have a library request?

If there is some kind of library or tool you often use in other game development tools where a Defold version doesn’t yet exist please post here.

1 Like

Personally I use PhysicsEditor for making vertexs of complex physics objects.

2 Likes

STL…

sorry, running a fever here… :slight_smile:

1 Like

The Defold polygon editor should help with this: https://www.defold.com/community/projects/58981/

BTW Can the Physics Editor export to a custom format? Ie can we write an exporter to our .shape files?

1 Like

Defold polygon editor not allow to create polygon with internal angles.

imagine that I need to add the complex physics object like hydrocycle:

the first, in Physic Editor I do vertices:
part1

then save in format for PhaserJS, look like:

    "boat6": [
        {
            "shape": [ 108,44, 45,98, 8,66, 28,51, 107,3, 128,18 ]
        },
        {
            "shape": [ 206,107, 189,69, 211,52, 228,52, 243,74 ]
        },
        {
            "shape": [ 137,69, 45,98, 108,44 ]
        },
        {
            "shape": [ 137,69, 189,69, 206,107, 45,98 ]
        }
    ]

second, I wrote the script to convert this data to needed format:
(need a flip Y coordinates top down)

shape_type: TYPE_HULL
data: 108
data: 63
data: 0.0
data: 128
data: 89
data: 0.0
data: 107
data: 104
data: 0.0
data: 28
data: 56
data: 0.0
data: 8
data: 41
data: 0.0
data: 45
data: 9
data: 0.0

(the first polygon, for example)

and save it as part1.convexshape and add it as collision shape.

Ah, I see. Well, you should be able to create your own exporter (https://www.codeandweb.com/physicseditor/tutorials/customize_physicseditor_exporter) so you don’t have to do a manual extra step.

4 Likes

oops really! didn’t know about this, thanks!

4 Likes

@BunBunBun How are you dealing with multiple-polygon objects in Defold? Just using many collision components on the same object?

In hindsight, I probably should have spent my time making one of these exporters instead of building my own polygon editor . . . :smiley: ([Edit:] Oh, nevermind, it’s not free, hmm . . . )

5 Likes

Since it’s commercial software you could contact the maintainer and ask them to add official support too.

1 Like

You could add automatic concave mesh support for generating multiple convex collision shapes. Also could do binary releases on github so people don’t have to build to use.

1 Like

Yes. I have had a fairly long to-do list for the polygon editor for a while now, including this feature. It’s just never been a high priority. I’ve been trying to spend my time actually making games lately, hah!

2 Likes

@ross.grams yes, just using many collision components. yes, I bought the license of this program.

@Pkeod yes, I thought about it, but it was faster to write own script, don’t like waiting :smiley: okay, I will contact him.