Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object GROUP templates #1860

Open
witlock opened this issue Jan 18, 2018 · 4 comments
Open

Object GROUP templates #1860

witlock opened this issue Jan 18, 2018 · 4 comments
Labels
feature It's a feature, not a bug.

Comments

@witlock
Copy link

witlock commented Jan 18, 2018

When I first heard about templates on Patreon I was hoping we could create templates of object layers/groups, but it seems like it's just for objects. For example a tree in my game is created from 5 - 6 objects and each tree has it's own layer (colliders, trunk image, top image etc.). Right now I'm duplicating the layers and it works, but loading them from templates would be pretty nice. Is this something we could see in the future or is this something only I am doing?

@bjorn
Copy link
Member

bjorn commented Jan 18, 2018

While I can see the use-case, I think the solution is going in the wrong direction. This is because as it is now, it will only add complexity. I'd much rather re-think the data structures such that we can simplify things while adding the needed functionality for compound objects, like your trees.

Of course it's not unusual for an object to consist of several parts. In most game engines today, we don't talk about objects but about entities. And entities can have multiple components. Your tree entity could have several image components and a collider component. This is the direction I'd prefer to go into, but it could become quite a big change.

@bjorn bjorn added the feature It's a feature, not a bug. label Jan 18, 2018
@phil123456
Copy link

phil123456 commented Mar 27, 2018

I agree, templates imply talking about group of objects, no matter you call them templates or entities

actually if it was my editor project, I'd clearly not hesitate and I would also make possible the entity having parts drawned on different layers, it would be a killer feature :-)

and indeed it would be a group of objects that end up creating an entity, it would also define the physical (collision) properties the entity...

ex:

  • a tree has 2 parts (ground and on top of everything layer) + collision circle for instance

  • I am writing a game mockup that has maps like in ultima VIII (but not isometric, just top down) and oh yeah, beeing able to draw a whole house with like 2 or 3 levels.. (even have the dimensions of the the houses beeing parameters and drawn on the map at first)

of course it depends on your game needs but killer features make great interesting rich possibilities

@bjorn
Copy link
Member

bjorn commented Mar 27, 2018

I agree, templates imply talking about group of objects, no matter you call them templates or entities

I think first you need to support compound objects, and then you can support templates of them. As it is, if objects could be compound, the template system will almost automatically support that as well. Supporting templates that instantiate groups of objects is something else entirely, though also interesting to consider.

actually if it was my editor project, I'd clearly not hesitate and I would also make possible the entity having parts drawned on different layers, it would be a killer feature :-)

Tiled being free software, please don't think you need to convince me about such a change first. I'm hesitant because I think it needs careful consideration and because it will be a major effort to get it done in a clean way. But Tiled is yours to change around as you see fit and I'd love to see what you'll do with it.

@X-Ray-Jin
Copy link

I think this really would be a big thing.
Speaking of entities:
For our project I am actually kind of working on a LibGDX - Tiled entity system and an interface that extends the basic loader and makes using Tiled in LibGDX more intuitive. For now it is not standalone. However while making the game I already started splitting everything nice so my plan is at some point to separate it completely.

I am actually doing it quite similar as mentioned above with an entity class and components which at the moment we call logics for some reason. Anyways I am glad that you plan to go that direction. We are using special tilesets to define components at the moment to keep them reasonable separate and maintain a good overview. (@bjorn related to the other discussion #1930 not having just one loading thing)

I really would like to stay informed about your plans on this so I can adept to it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

4 participants