Level Director X Released for Mac and Windows

Fantastic solution. I was so worry about this issue, and, exactly… it is Sierra restrictions with GateKeeper.

Disable it and all perfect again !!

Thanks a lot,

Level Director X V1.1.0 Released (use the free version to download the update)

* Feature - Preferences, added option to avoid sub pixel positions.

* Feature - Duplicated levels now appear as ‘untitled’ to prompt saveAs with the project folder as the default.

* Feature - The ‘Export Name’ is now defaulted to the file name for duplicated levels.

* Feature - Margin now only updates when preference dialog is closed rather than dynamically.

* Feature - User Properties defined at Asset level are now exported down to associated object instances.

* Bug - Fix spritesheet load for when frames change.

* Bug - Guide line is now shown on top of all objects when drawing polygon type objects.

* Bug - Asset size is reloaded in case it has changed.

* Bug - Fixed ‘button’ export to specify correct frame for ‘down’ fill image.

* Bug - Objects moved to different layer retain their original name.

* Bug - Fixed bug in setLayerVisible function in LD_LoaderX for objects with no view.

* Bug - Fix bug in LD_HelperX button disable function.

* Bug - When showing physics bodies, multi-body polygons would not render in the correct position if the object was flipped.

* Bug - Fixed crash when removing a Layer

Hi there, 

I bought Level Director X a week or so ago. It looks great and will save me a lot of time.

I have just started experimenting with it and I came across an issue when I set enableDrag = true.

I can drag any of the objects around, but dragging an object over another object may cause an issue. The non-dragging object may move, or it may get selected.  This does not happen on all objects though. 

I did the following:

  1. Created a level background.

  2. Imported 6 objects into the project (I didn’t add them to the level)

  3. Exported the project.

  4. Added objects programmatically in main.lua using createObject(“market-scene-layer”,objProps)

Any advise would be great.

Simon

EDIT: I fixed it by changing the obj.view:touch code in LD_HelperX.lua

 -- add a drag event if (objProps.enableDrag or false) == true then function obj.view:touch( event ) --print ("assetName: "..objProps.assetName) if event.phase == "began" then obj.markX = obj.view.x -- store x location of object obj.markY = obj.view.y -- store y location of object display.getCurrentStage():setFocus( self, event.id ) self.isFocus = true elseif self.isFocus then print (obj.name, obj.markX, obj.markY) if event.phase == "moved" then local dx = (event.x - event.xStart) local dy = (event.y - event.yStart) obj.view.x = obj.markX + dx obj.view.y = obj.markY + dy -- move object based on calculations above print (obj.name,dx,dy) elseif event.phase == "ended" or event.phase == "cancelled" then -- we end the movement by removing the focus from the object display.getCurrentStage():setFocus( self, nil ) self.isFocus = false end end return true end ------------------------------------------------ obj.view:addEventListener("touch", obj.view) end

I set the focus on the object and then added self.isFocus boolean.

Hi Simon,

To be honest, enableDrag was a convenience option to allow objects to be moved around for testing purposes, but it rarely got used, so it remained very basic.

It most instances, you will need more control over movement, for example preventing the object going off screen, so I recommend applying your movement code inside your own lua module, rather than modifying the LDX library code.

For example (this could in main.lua or a scene);

local obj = myLevel:getLayerObject("Layer1","Player").view function obj:touch( event ) ... end obj:addEventListener("touch", obj)

Now you are in total control, and could even use a variation of the LDX library code as a basis, but make it specific to your project requirements.

@retrofitProductions,

Thanks for that.  Of course you are correct.  I’m just experimenting at the moment.

Cheers

Simon

Hi,

I updated to version 1.1.0 but if I create a new project, the folder that contains it is empty, nothing main, lib et.

The window where to create the new project does not display the template

Also, if I try to export a level, it is an empty file.

I work on Mac and Mac Os Sierra 10.12.5 and I’m a licensed user.

Thank you

Hi, this is a known issue with Sierra, please refer to an earlier post in this thread for more info.

Thank you. It works

I finally got the time to test out Level Director X, but when I create a new project I can’t choose a project template or export template. Both of them are blank. Im using iMac with Sierra.

This is unfortunately caused by some new security features added to Sierra, which affects applications not purchased from the app store, where it scrambles folder locations.

Until I figure this out, there are some workarounds;

FYI - https://www.tekrevue.com/tip/gatekeeper-macos-sierra/

Fantastic solution. I was so worry about this issue, and, exactly… it is Sierra restrictions with GateKeeper.

Disable it and all perfect again !!

Thanks a lot,

Hi there, 

I bought Level Director X a week or so ago. It looks great and will save me a lot of time.

I have just started experimenting with it and I came across an issue when I set enableDrag = true.

I can drag any of the objects around, but dragging an object over another object may cause an issue. The non-dragging object may move, or it may get selected.  This does not happen on all objects though. 

I did the following:

  1. Created a level background.

  2. Imported 6 objects into the project (I didn’t add them to the level)

  3. Exported the project.

  4. Added objects programmatically in main.lua using createObject(“market-scene-layer”,objProps)

Any advise would be great.

Simon

EDIT: I fixed it by changing the obj.view:touch code in LD_HelperX.lua

 -- add a drag event if (objProps.enableDrag or false) == true then function obj.view:touch( event ) --print ("assetName: "..objProps.assetName) if event.phase == "began" then obj.markX = obj.view.x -- store x location of object obj.markY = obj.view.y -- store y location of object display.getCurrentStage():setFocus( self, event.id ) self.isFocus = true elseif self.isFocus then print (obj.name, obj.markX, obj.markY) if event.phase == "moved" then local dx = (event.x - event.xStart) local dy = (event.y - event.yStart) obj.view.x = obj.markX + dx obj.view.y = obj.markY + dy -- move object based on calculations above print (obj.name,dx,dy) elseif event.phase == "ended" or event.phase == "cancelled" then -- we end the movement by removing the focus from the object display.getCurrentStage():setFocus( self, nil ) self.isFocus = false end end return true end ------------------------------------------------ obj.view:addEventListener("touch", obj.view) end

I set the focus on the object and then added self.isFocus boolean.

Hi Simon,

To be honest, enableDrag was a convenience option to allow objects to be moved around for testing purposes, but it rarely got used, so it remained very basic.

It most instances, you will need more control over movement, for example preventing the object going off screen, so I recommend applying your movement code inside your own lua module, rather than modifying the LDX library code.

For example (this could in main.lua or a scene);

local obj = myLevel:getLayerObject("Layer1","Player").view function obj:touch( event ) ... end obj:addEventListener("touch", obj)

Now you are in total control, and could even use a variation of the LDX library code as a basis, but make it specific to your project requirements.

@retrofitProductions,

Thanks for that.  Of course you are correct.  I’m just experimenting at the moment.

Cheers

Simon

Hi,

I updated to version 1.1.0 but if I create a new project, the folder that contains it is empty, nothing main, lib et.

The window where to create the new project does not display the template

Also, if I try to export a level, it is an empty file.

I work on Mac and Mac Os Sierra 10.12.5 and I’m a licensed user.

Thank you

Hi, this is a known issue with Sierra, please refer to an earlier post in this thread for more info.

Thank you. It works