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

Sprite Auto Size (simple square/rectangle sprites) - Feature #1970

Closed
Haddicus opened this issue Jul 4, 2018 · 3 comments
Closed

Sprite Auto Size (simple square/rectangle sprites) - Feature #1970

Haddicus opened this issue Jul 4, 2018 · 3 comments

Comments

@Haddicus
Copy link

Haddicus commented Jul 4, 2018

I've been enjoying Tiled for the past week or so, and have been trying to get the collision editor to work for me, but it's a bit clumsy. My request is to simplify the rectangle insert feature, to match the size/outline of the currently selected sprite square. I've searched and I didn't see a feature request for this, but maybe I missed it?

For example, I have a straightforward 16x16 map of a bunch of tiles, and I would like to add simple square collisions to most of the items. I understand the complexity of mapping out each pixel for a complex shape, but on simple square shapes, or even outside of the shape itself, it could be helpful to most users, to automatically fill the rectangle to the outline of the selected tile.

Example:

image
All of the above tiles are simple squares, I want to fill them all with rectangle collisions. if I select a tile, and add a rectangle to it (click within the shape), it adds a pre-sized rectangle that doesn't fill my tile properly. Having hundreds of tiles to insert collides on, can be pretty tedious, when you go in and manually edit each collider to fit the selected tile:
image

Instead of something like this:

image

This would be achievable by taking the size of the currently selected tile, and applying a rectangle to that area at 0,0.

It's been a while since I've written any C++, so if someone has some ideas on how this might be implemented, I may be able to play around with a solution myself, with a little direction on where this feature should live, etc. A secondary feature would be to be able to select multiple tiles, and add a single collider across them all.

Anyways, thanks for reading, taking the time to consider such a feature!

-Haddy

@bjorn
Copy link
Member

bjorn commented Jul 4, 2018

My request is to simplify the rectangle insert feature, to match the size/outline of the currently selected sprite square. I've searched and I didn't see a feature request for this, but maybe I missed it?

I think you kind-of missed it. While there is no direct way to insert a rectangle matching the tile's size, you can enable snap-to-grid in View > Snapping, which makes it very easy to do this.

A secondary feature would be to be able to select multiple tiles, and add a single collider across them all.

This feature is missing, but I'd like to add it soon. It is covered by issue #1322 and a possible implementation is waiting for review at #1960.

@bjorn
Copy link
Member

bjorn commented Jul 4, 2018

Closing this issue since I think it's covered by my previous comment.

It's been a while since I've written any C++, so if someone has some ideas on how this might be implemented, I may be able to play around with a solution myself, with a little direction on where this feature should live, etc.

I'll gladly help you with any particular questions you may have while making improvements to Tiled!

@bjorn bjorn closed this as completed Jul 4, 2018
@Haddicus
Copy link
Author

Haddicus commented Jul 4, 2018

@bjorn Thank you very much for taking a look at the issue - the snapping feature definitely does help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants