#1163 closed enhancement (fixed)
[PATCH][ATLAS] Object placement constraints
Reported by: | historic_bruno | Owned by: | trompetin17 |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 18 |
Component: | Atlas editor | Keywords: | |
Cc: | Patch: |
Description
I think this would be a good addition to Atlas, to prevent problems like #656, where entities can be placed on the very fringe of the map circle, but because of pathfinder passability they get stuck. Of course it should still be possible to place objects anywhere on the map for unusual circumstances, but as an option, we can add placement constraints. For instance boats shouldn't be built on land, most buildings shouldn't be built in water. I think this can all be done by adding some logic to the create object handler to make it check pathfinding classes, similar to what building restrictions and unit spawning already do in-game. Though that wouldn't work for gaia objects like trees unless we assign them some default passability, maybe there's a better way to handle it.
As a visual indicator, we can apply some shading to the entity preview if it's hovering an invalid location, like we do for building previews.
Attachments (9)
Change History (26)
by , 9 years ago
comment:1 by , 9 years ago
Keywords: | review patch added; simple removed |
---|---|
Milestone: | Backlog → Alpha 18 |
Owner: | set to |
Status: | new → assigned |
Summary: | [ATLAS] Object placement constraints → [PATCH][ATLAS] Object placement constraints |
comment:2 by , 9 years ago
by , 9 years ago
Attachment: | Captura de pantalla 2015-01-04 a las 8.55.40 p.m..png added |
---|
follow-up: 5 comment:4 by , 9 years ago
Does this also occur when placing actors? I often let actors overlap to make them look better.
comment:5 by , 9 years ago
niektb actually actor doesn´t have constraint component, Im not sure how is going to affect pathfinder and collision if i will add constraint component to actors. Replying to niektb:
Does this also occur when placing actors? I often let actors overlap to make them look better.
comment:7 by , 9 years ago
ok them :), everything works like i said in my test, you can overlap only objects without constraint component(that's mean actors) Replying to niektb:
You shouldn't add. Your patch shouldn't affect actors.
by , 9 years ago
Attachment: | 1163.2.diff added |
---|
by , 9 years ago
Attachment: | 1163.3.diff added |
---|
follow-up: 10 comment:8 by , 9 years ago
Keywords: | review removed |
---|
The patch works fine but the user will need a way to force placing of entities anywhere, regardless of obstruction. Using a hotkey like Shift would be intuitive, I don't know if it is already used for anything else though.
by , 9 years ago
Attachment: | 1163.4.diff added |
---|
comment:10 by , 9 years ago
over IRC talked a little more about it. Now this patch is only a visual helper for map makers.
Replying to Itms:
The patch works fine but the user will need a way to force placing of entities anywhere, regardless of obstruction. Using a hotkey like Shift would be intuitive, I don't know if it is already used for anything else though.
by , 9 years ago
Attachment: | 1163.5.diff added |
---|
by , 9 years ago
Attachment: | 1163.6.diff added |
---|
by , 9 years ago
Attachment: | 1163.7.diff added |
---|
by , 9 years ago
Attachment: | 1163.8.diff added |
---|
comment:12 by , 9 years ago
No idea if it could be useful, but what about having a sign of overlapped objects even after they are placed? So one can notice possible issues even after having placed them. Maybe having them red-colored even after placed.
comment:13 by , 9 years ago
May-be not permanently, but having a hotkey or a button which (when pressed) would display such issues would be fine.
comment:14 by , 9 years ago
Indeed not permanent. (I said through IRC that it should only be in preview) That would f.e. turn all walls into red.
I personally think that it is fine as it is right now (in trompetin's latest patch) and doesn't need any additions.
follow-up: 17 comment:15 by , 9 years ago
Sounds like a separate feature request to me, perhaps a tool to find invalid placed objects on the map (even long after it's designed) and highlight them, or select or delete them.
comment:17 by , 9 years ago
Keywords: | patch removed |
---|
Thanks for the patch! :)
Replying to historic_bruno:
Sounds like a separate feature request to me, perhaps a tool to find invalid placed objects on the map (even long after it's designed) and highlight them, or select or delete them.
See #2829.
Atlas now use Constraint Component for every object if it already has one.
Tested with: