Object templates #70

Closed
zamp opened this Issue Sep 6, 2011 · 14 comments

Comments

9 participants
@zamp

zamp commented Sep 6, 2011

Would be nice if you could set up object templates so when you create new objects you could just pick one from a list and drag n drop it on the map.
Maybe double click on list to edit a template.
The templates should have the object type and properties with default values.
http://juvo.se/tbb3.jpg here's a mashup of what it could look like.

@stefanbeller

This comment has been minimized.

Show comment
Hide comment
@stefanbeller

stefanbeller Sep 17, 2011

Contributor

#78 was a duplicate of this and was closed therefore.

Contributor

stefanbeller commented Sep 17, 2011

#78 was a duplicate of this and was closed therefore.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Sep 17, 2011

Owner

This is similar to #24 but I prefer this solution to introducing additional buttons on the tool bar.

Owner

bjorn commented Sep 17, 2011

This is similar to #24 but I prefer this solution to introducing additional buttons on the tool bar.

@laughsuggestion

This comment has been minimized.

Show comment
Hide comment
@laughsuggestion

laughsuggestion Jan 16, 2012

I am definitely looking forward to this feature. Object types are nice but those don't have associated properties. A palette for easily creating these objects is definitely something that would help.

I am definitely looking forward to this feature. Object types are nice but those don't have associated properties. A palette for easily creating these objects is definitely something that would help.

@NinjaFighter

This comment has been minimized.

Show comment
Hide comment
@NinjaFighter

NinjaFighter Feb 13, 2012

I was about to suggest something similar, but this could be a much better idea =D
Could be a good way to define a "Type", using left click on an previously created object (with all sets of properties that we want), and selecting "Define Prototipe" or "Add To Library" (or something like that), so... this is similar to "Copy" an object, but in this case, can be done a lot of times, and through various projects.

I was about to suggest something similar, but this could be a much better idea =D
Could be a good way to define a "Type", using left click on an previously created object (with all sets of properties that we want), and selecting "Define Prototipe" or "Add To Library" (or something like that), so... this is similar to "Copy" an object, but in this case, can be done a lot of times, and through various projects.

@AbelToy

This comment has been minimized.

Show comment
Hide comment
@AbelToy

AbelToy Mar 25, 2012

Any news on this?

AbelToy commented Mar 25, 2012

Any news on this?

@laughsuggestion

This comment has been minimized.

Show comment
Hide comment
@laughsuggestion

laughsuggestion Mar 25, 2012

Nope. Hasn't happened.

Sent from my iPhone

On Mar 25, 2012, at 2:09 PM, "Abel Toy i Díez"
reply@reply.github.com
wrote:

Any news on this?


Reply to this email directly or view it on GitHub:
#70 (comment)

Nope. Hasn't happened.

Sent from my iPhone

On Mar 25, 2012, at 2:09 PM, "Abel Toy i Díez"
reply@reply.github.com
wrote:

Any news on this?


Reply to this email directly or view it on GitHub:
#70 (comment)

@shackra

This comment has been minimized.

Show comment
Hide comment
@shackra

shackra Mar 6, 2013

This feature screams to be implemented xd.
Is very tough to make one object (i.e: a tree) from several objects (i.e: the different parts of the tree image), just see what I'm talking about:

Captura de pantalla de 2013-03-07 20:58:18

what a mess! xd. For sure this feature should group (or something alike) the tiles involved on making the actual object so you can access them easily and not dealing with separate objects, meanwhile I'll try to polish my "algorithm" or trying another approximation to solve my issue.

PS: This is the actual look of my test from the default development branch:

Captura de pantalla de 2013-03-07 20:59:36

yup, every object is a sprite in the test game, doing a mess with the correct draw order :'|

shackra commented Mar 6, 2013

This feature screams to be implemented xd.
Is very tough to make one object (i.e: a tree) from several objects (i.e: the different parts of the tree image), just see what I'm talking about:

Captura de pantalla de 2013-03-07 20:58:18

what a mess! xd. For sure this feature should group (or something alike) the tiles involved on making the actual object so you can access them easily and not dealing with separate objects, meanwhile I'll try to polish my "algorithm" or trying another approximation to solve my issue.

PS: This is the actual look of my test from the default development branch:

Captura de pantalla de 2013-03-07 20:59:36

yup, every object is a sprite in the test game, doing a mess with the correct draw order :'|

@downstroy

This comment has been minimized.

Show comment
Hide comment
@downstroy

downstroy Jan 21, 2015

Damn I would love to see this feature implemented!

Imagine you define an object (eg: a platform), you give it some basic properties (like minX, minY, maxX, maxY) to what you want it to do.

Now imagine you are doing a platformer, you will probably use dozen if not hundred of those objects.

And after using lots of them, you have the idea of adding custom collision to your platform (like it should collide from above but not from under. You will have to cycle through all your platform object and edit them all to add the collision : top / collision : bottom / collision : both custom property. What a hassle to maintain!

Of course you could just do it in your code, checking the id of the object and adding the behaviour, but it would really be a mess and not faster.

I think having template of object (aka prefab (cf unity3D)) would really be a neat feature for any "medium to big" sized project.

Damn I would love to see this feature implemented!

Imagine you define an object (eg: a platform), you give it some basic properties (like minX, minY, maxX, maxY) to what you want it to do.

Now imagine you are doing a platformer, you will probably use dozen if not hundred of those objects.

And after using lots of them, you have the idea of adding custom collision to your platform (like it should collide from above but not from under. You will have to cycle through all your platform object and edit them all to add the collision : top / collision : bottom / collision : both custom property. What a hassle to maintain!

Of course you could just do it in your code, checking the id of the object and adding the behaviour, but it would really be a mess and not faster.

I think having template of object (aka prefab (cf unity3D)) would really be a neat feature for any "medium to big" sized project.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 21, 2017

Owner

@zamp Is there any chance you would be able to restore the mashup you linked to in your original request? I think it could be very helpful for anybody who could be interested to work on this feature (which could be this summer, as a Google Summer of Code project).

Owner

bjorn commented Mar 21, 2017

@zamp Is there any chance you would be able to restore the mashup you linked to in your original request? I think it could be very helpful for anybody who could be interested to work on this feature (which could be this summer, as a Google Summer of Code project).

@bjorn bjorn referenced this issue Mar 21, 2017

Closed

Object Library #1326

@i-ka

This comment has been minimized.

Show comment
Hide comment
@i-ka

i-ka Mar 25, 2017

Contributor

In Unity, unchanged instance properties synchronizes with prefab properties. I think tracking prefab property changes will good feature. In addition it can reduce file size a little bit, by saving only changed properties.

For now have no good idea how to implement object from several tiles. May be the library object editor window should provide like map editor interface (with grid for tiles)

Contributor

i-ka commented Mar 25, 2017

In Unity, unchanged instance properties synchronizes with prefab properties. I think tracking prefab property changes will good feature. In addition it can reduce file size a little bit, by saving only changed properties.

For now have no good idea how to implement object from several tiles. May be the library object editor window should provide like map editor interface (with grid for tiles)

@zamp

This comment has been minimized.

Show comment
Hide comment
@zamp

zamp Mar 30, 2017

@bjorn sorry. I don't have the file anymore nor can I recall what it looked like.

zamp commented Mar 30, 2017

@bjorn sorry. I don't have the file anymore nor can I recall what it looked like.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 30, 2017

Owner

@zamp Alright, no problem. Thanks for letting us know!

Owner

bjorn commented Mar 30, 2017

@zamp Alright, no problem. Thanks for letting us know!

@bjorn bjorn added this to Tiled 1.1 in Roadmap Jun 8, 2017

@bjorn bjorn moved this from Tiled 1.1 to In Progress in Roadmap Jun 12, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Sep 6, 2017

Owner

I'm closing this issue since the feature is now implemented, thanks to @thabetx's Google Summer of Code project! Check out the documentation and be sure to try it out by using a development snapshot (available at itch.io).

Any feedback would be very welcome as we will now be working towards the Tiled 1.1 release.

Owner

bjorn commented Sep 6, 2017

I'm closing this issue since the feature is now implemented, thanks to @thabetx's Google Summer of Code project! Check out the documentation and be sure to try it out by using a development snapshot (available at itch.io).

Any feedback would be very welcome as we will now be working towards the Tiled 1.1 release.

@bjorn bjorn closed this Sep 6, 2017

@bjorn bjorn moved this from In Progress to Recently Completed in Roadmap Sep 6, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Sep 6, 2017

Owner

For reference, here are the issues I've already opened covering remaining tasks:

  • Allow replacing existing objects with template instances #1722
  • Allow deleting object templates from a template group #1723
  • Allow unloading a template group #1724
  • Allow resetting overridden properties individually for template instances #1725
  • Allow locking template properties #1726
Owner

bjorn commented Sep 6, 2017

For reference, here are the issues I've already opened covering remaining tasks:

  • Allow replacing existing objects with template instances #1722
  • Allow deleting object templates from a template group #1723
  • Allow unloading a template group #1724
  • Allow resetting overridden properties individually for template instances #1725
  • Allow locking template properties #1726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment