Graphics 2.0/Export templates?

Hello, a couple of questions for you:

* Are you planning on supporting the new Graphics 2.0 anchor points?  

* Also, sprites are deprecated, any chance you will update the default export to use imagesheets?

* Do you have GUI examples? I was thinking about building an export template for basic gui functions, but if it’s already done, I don’t want to reinvent the wheel.

Okay, I guess that’s more than a couple.

Hi,

Supporting some of the Graphics 2.0 features is definitely high on my list, I just to need to become a little more familiar with it first.

I don’t really support the default export anymore as it is very difficult to manage hence why I added the template export method which allows the Corona side of things to be managed by the external modules (which do support imagesheets and complex bodies).

No, currently there are no GUI examples, what kind of example did you have in mind?

Just to let you know that I started work on the Graphics 2.0 anchor points today…

Got it. Understand the move to export templates. Maybe if you made the default export a template export it would have made more sense. Just a suggestion :slight_smile:  

On the GUI example side, I was thinking of a button class that would make generate an event when touched–or even a toggle class for on and off buttons. Maybe I’ll whip one up and share it out.

While you are in the code, you may want to support ShoeBox as a texture packer…

http://renderhjs.net/shoebox/

I added the code to export the Texture Atlas as an corona imagesheet, so it’s in lua already. Also, it has an XML export to that’s really close to TP’s format. (It uses name="" width="", etc. vs n="" w="")

All in all, I’m very impressed with the tool. I wish I would have tried it sooner. There are a few little things that could really help workflow though…

* Ctrl + MouseWheel - Zoom in/out 

* Middle Click or space bar - Hold to reposition view

* Align objects at center point/top/bottom/etc.

Anyway, good stuff.

Hi, great suggestions, just changed it so the default export method is ‘Template Export’  :slight_smile:

ShoeBox looks great, I did not know that existed, I will definitely take a closer look.

Using the mousewheel should zoom in/out already but it doesn’t work if another control (like property grid) has captured the mouse so I’ll see if I can approve on that.

The re-position view and align ideas are already on my list so hopefully I will get to them soon.

With regards to GUI controls, on my todo list is the ability to add buttons but I put it on hold when Corona reworked the widgets but if you could come up with an example that might give me ideas on how best to implement it within LD.

Thanks.

Hi,

I’ve uploaded a beta version of Level Director v2.4 for you to download and try;

http://bit.ly/1gcOdIn

The idea of this release is not so much new features (although the pan view feature is in there) but to work with the new Graphics 2.0 Corona builds.

I’ve included the current release notes here for reference;         

  • Fix: Resolved issue with PhysicsEditor imported items for European regions where dots and commas are swapped, it would cause the physics editor window to crash.
  • New: Graphics2.0 - Default AnchorX and Y properties added to tools->options and associated to each project.
  • New: Graphics2.0 – AnchorX and Y added to Assets and defaulted from project defaults (above).
  • New: Graphics2.0 – AnchorX and Y added to objects and defaults to assoicated asset values (above).
  • New: Graphics2.0 – Flag added to tools->options to specify if a project is Graphics2.0 enabled.  If set then coordinates are calculated based on the anchor values
  • New: LD_HelperG2.lua, LD_LoaderG2.lua and Corona_templateG2.lua files created to work with Graphics2.0 projects only.
  • New: G2Test example project added to test the new modules (above) work with the Graphics2.0 builds of Corona.
  • New: Click scroll wheel and move mouse (not drag) to scroll canvas in that direction. 

Your feedback is always appreciated,

Thanks

Cool. I will take a look.

I missed these items from the release notes which correspond to the export template…

  • New: %LEVEL%.AnchorX and Y added to export the default anchor values.
  • New: %ASSET%.AnchorX and Y added to export anchor values for an asset.
  • New: %OBJECT%.AnchorX and Y added to export anchor values for an object.

FYI - Also in the Graphics2.0 pipeline is to allow ‘Texture’ fills and a new ‘Polygon’ shape object.

Hi,

Supporting some of the Graphics 2.0 features is definitely high on my list, I just to need to become a little more familiar with it first.

I don’t really support the default export anymore as it is very difficult to manage hence why I added the template export method which allows the Corona side of things to be managed by the external modules (which do support imagesheets and complex bodies).

No, currently there are no GUI examples, what kind of example did you have in mind?

Just to let you know that I started work on the Graphics 2.0 anchor points today…

Got it. Understand the move to export templates. Maybe if you made the default export a template export it would have made more sense. Just a suggestion :slight_smile:  

On the GUI example side, I was thinking of a button class that would make generate an event when touched–or even a toggle class for on and off buttons. Maybe I’ll whip one up and share it out.

While you are in the code, you may want to support ShoeBox as a texture packer…

http://renderhjs.net/shoebox/

I added the code to export the Texture Atlas as an corona imagesheet, so it’s in lua already. Also, it has an XML export to that’s really close to TP’s format. (It uses name="" width="", etc. vs n="" w="")

All in all, I’m very impressed with the tool. I wish I would have tried it sooner. There are a few little things that could really help workflow though…

* Ctrl + MouseWheel - Zoom in/out 

* Middle Click or space bar - Hold to reposition view

* Align objects at center point/top/bottom/etc.

Anyway, good stuff.

Hi, great suggestions, just changed it so the default export method is ‘Template Export’  :slight_smile:

ShoeBox looks great, I did not know that existed, I will definitely take a closer look.

Using the mousewheel should zoom in/out already but it doesn’t work if another control (like property grid) has captured the mouse so I’ll see if I can approve on that.

The re-position view and align ideas are already on my list so hopefully I will get to them soon.

With regards to GUI controls, on my todo list is the ability to add buttons but I put it on hold when Corona reworked the widgets but if you could come up with an example that might give me ideas on how best to implement it within LD.

Thanks.

FYI - Level Director v2.4 has now been released;

http://forums.coronalabs.com/topic/25531-level-director-level-creation-tool-for-windows/page-5

Hi,

I’ve uploaded a beta version of Level Director v2.4 for you to download and try;

http://bit.ly/1gcOdIn

The idea of this release is not so much new features (although the pan view feature is in there) but to work with the new Graphics 2.0 Corona builds.

I’ve included the current release notes here for reference;         

  • Fix: Resolved issue with PhysicsEditor imported items for European regions where dots and commas are swapped, it would cause the physics editor window to crash.
  • New: Graphics2.0 - Default AnchorX and Y properties added to tools->options and associated to each project.
  • New: Graphics2.0 – AnchorX and Y added to Assets and defaulted from project defaults (above).
  • New: Graphics2.0 – AnchorX and Y added to objects and defaults to assoicated asset values (above).
  • New: Graphics2.0 – Flag added to tools->options to specify if a project is Graphics2.0 enabled.  If set then coordinates are calculated based on the anchor values
  • New: LD_HelperG2.lua, LD_LoaderG2.lua and Corona_templateG2.lua files created to work with Graphics2.0 projects only.
  • New: G2Test example project added to test the new modules (above) work with the Graphics2.0 builds of Corona.
  • New: Click scroll wheel and move mouse (not drag) to scroll canvas in that direction. 

Your feedback is always appreciated,

Thanks

Cool. I will take a look.

I missed these items from the release notes which correspond to the export template…

  • New: %LEVEL%.AnchorX and Y added to export the default anchor values.
  • New: %ASSET%.AnchorX and Y added to export anchor values for an asset.
  • New: %OBJECT%.AnchorX and Y added to export anchor values for an object.

FYI - Also in the Graphics2.0 pipeline is to allow ‘Texture’ fills and a new ‘Polygon’ shape object.

FYI - Level Director v2.4 has now been released;

http://forums.coronalabs.com/topic/25531-level-director-level-creation-tool-for-windows/page-5

I’ve had a lot of interest in the new texture fill features in Level Director but wanted to clear some things up.

Level Director now supports Graphics2.0 texture fills for Rectangle, Circles and Polygons where you can simply select one of your imported asset/images as the texture and the export will take care of the rest, but due to a bug in Corona there are some limitations…

If you select an asset that is not part of a sprite sheet then it works fine, but selecting a frame from a sprite sheet only works for rectangle objects, for Circles and Polygons it just uses the whole sprite sheet image, yuk!

I have reported this bug but it still has not been resolved (http://forums.coronalabs.com/topic/41215-fixed-fill-with-imagesheets/).

Hopefully they will fix this soon as it is a really nice feature.

On the subject of texture fills, Level Director now has a Button object that you can simply add to your layer and specify the default and over images by selecting one of your existing assets.

The library code (LD_HelperG2.lua) that generates the buttons actually uses a rectangle display object with texture fill which makes it very flexible, so you can specify rounded corners, borders, fill color, text and optionally images.

In your code you simply need to tie a function to one of the button events e.g.

myButton = myLevel:getObject('button1') myButton.onPress = buttonPressed myButton.onRelease = buttonReleased  

I started to implement this using the widget button but decided I wanted a little more control and integration with how Level Director dealt with assets and also to avoid adding another dependency.

Download Level Director and check out the G2Test example project.

I’ve had a lot of interest in the new texture fill features in Level Director but wanted to clear some things up.

Level Director now supports Graphics2.0 texture fills for Rectangle, Circles and Polygons where you can simply select one of your imported asset/images as the texture and the export will take care of the rest, but due to a bug in Corona there are some limitations…

If you select an asset that is not part of a sprite sheet then it works fine, but selecting a frame from a sprite sheet only works for rectangle objects, for Circles and Polygons it just uses the whole sprite sheet image, yuk!

I have reported this bug but it still has not been resolved (http://forums.coronalabs.com/topic/41215-fixed-fill-with-imagesheets/).

Hopefully they will fix this soon as it is a really nice feature.

On the subject of texture fills, Level Director now has a Button object that you can simply add to your layer and specify the default and over images by selecting one of your existing assets.

The library code (LD_HelperG2.lua) that generates the buttons actually uses a rectangle display object with texture fill which makes it very flexible, so you can specify rounded corners, borders, fill color, text and optionally images.

In your code you simply need to tie a function to one of the button events e.g.

myButton = myLevel:getObject('button1') myButton.onPress = buttonPressed myButton.onRelease = buttonReleased  

I started to implement this using the widget button but decided I wanted a little more control and integration with how Level Director dealt with assets and also to avoid adding another dependency.

Download Level Director and check out the G2Test example project.