Page 2 of 2

Re: Release: Picture-in-Picture

Posted: 07 Nov 2010, 21:45
by hoijui
i would like it if it cached the icons/models state between saves.
is it possible for Lua to get unit icons, to display them instead of only points?

nice work btw! :-)

Re: Release: Picture-in-Picture

Posted: 08 Nov 2010, 09:00
by manolo_
thx, i wanted that since ages, cant wait to test it out today

Re: Release: Picture-in-Picture

Posted: 08 Nov 2010, 12:36
by thesleepless
can i have lots of them???

it can be like transport tycoon!

also, mousewheel zoom would be nice.

i really like it though, ideally it'd just be a perfect viewport into the same scene as the rest of the game though, not sure how feasible that is.

Re: Release: Picture-in-Picture

Posted: 08 Nov 2010, 18:52
by TheEpicMang
aegis wrote:
KaiserJ wrote:i can't help but think the ability to bind the PIP window to a unit (scout for instance) might be useful
you can, one of the buttons starts tracking whichever unit is currently selected
oh that is cool, I still would like aa bind to turn it off and on tho

how to make

Re: Release: Picture-in-Picture

Posted: 08 Nov 2010, 20:11
by Neddie
I think this might be very useful for us over at the 1944 bunker.

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 03:56
by Niobium
Version 1.3 released !
- Added text commands for button actions (e.g. '/pip_switch') for bindings (e.g. 'bind shift+t pip_track') and widgets
- Added mousewheel zooming
- Initial position now follows start position
- Most options are now saved (simplecolors, dot-mode, etc)
- Extra copies are included for those who want to run multiple pip windows (Default disabled, enable via widget list)

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 14:43
by UAF
Wicked! I'll try it when I get home.

Is there a way to turn it on/off with a hotkey?

Perhaps have a feature to automatically open a pip window showing a unit in a group when pressing the group number with another key?
(For example, Alt+1 will open a window around one of the units of group #1)

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 15:34
by Niobium
UAF wrote:Wicked! I'll try it when I get home.

Is there a way to turn it on/off with a hotkey?

Perhaps have a feature to automatically open a pip window showing a unit in a group when pressing the group number with another key?
(For example, Alt+1 will open a window around one of the units of group #1)
Currently no, not easily anyway, in the next update I'll have hotkey support for minimizing/maximizing it which I forgot to put in the last version.

As for the feature request it is a little too complex for this widget, so I won't be coding it, but of course I'm more than happy to add features that others have written.

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 18:40
by Forboding Angel
Unfortunately, without it supporting box selection or custom formations it's usefulness to me is rather limited. Is there any way to add support for those two features?

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 20:00
by hoijui
nice :-)

when it is minimized, and i want to scroll with the mouse-wheel in the area of the screen where it would be if non-minimized, nothing happens. or more simple: it keeps handling the mouse-wheel events even if minimized.

Re: Release: Picture-in-Picture

Posted: 09 Nov 2010, 22:48
by knorke
cool, works now :)
nice and seems quite polished with the buttons.
but it needs to show weapons and explosions to be of any real use other than techdemo?

Re: Release: Picture-in-Picture

Posted: 10 Nov 2010, 02:30
by Niobium
Forboding Angel wrote:Unfortunately, without it supporting box selection or custom formations it's usefulness to me is rather limited. Is there any way to add support for those two features?
Selection box: Yes, I guess panning would move to middle mouse
Custom formations: Possible, but too messy/complicated to do imo, control+move gives one way of moving units in a line.
hoijui wrote:when it is minimized, and i want to scroll with the mouse-wheel in the area of the screen where it would be if non-minimized, nothing happens. or more simple: it keeps handling the mouse-wheel events even if minimized.
Fault of a typo :oops:
knorke wrote:it needs to show weapons and explosions to be of any real use other than techdemo?
Unlikely to happen, firstly because I don't think it is even possible to get the projectile types/positions/models, and secondly because this is not the focus of the widget.

---

The focus of this widget is not to perfectly replicate spring in a tiny 200x200 window; it would never do it right graphically and it would never be close functionally due to the window size, also writing a large fraction of the spring engine in a lua widget is pretty daunting.

Originally I wrote this widget just for myself, but the focus remains the same; providing a way for a player to be at the front managing units and having fun 100% of the time by removing the need to pan back to base just to carry out a few clicks like telling a con to build a nano or advanced solar.

Re: Release: Picture-in-Picture

Posted: 10 Nov 2010, 10:18
by UAF
I would actually prefer to focus on my base and use the PIP window to see the front line, but as it was said without it being a full Spring window it'll never really allow that.
And besides, maybe this tendency of mine is why I'm not a good player...

Kudos for the widget anyhow, it's really cool.
I already found it useful in watching replays (didn't have time to play with it yet, but it helped comparing build orders).

Maybe I'll ask in the feature forum about an engine intigrated solution. :)

Re: Release: Picture-in-Picture

Posted: 10 Nov 2010, 11:36
by hoijui
i totally agree that it makes no sense to replicate spring perfectly in a small window. leave that to the engine. no need for feature request btw, it will come if spring is ready for it, and that will happen some-when, with everything that is already in devs minds/planned.
I see this as a kind of lightweight alternative, kind of an enhanced mini-map thing. what is missing for me, is use of icons, and maybe disabling drawing of features or something. is already useful as it is though. :-)

Re: Release: Picture-in-Picture

Posted: 10 Nov 2010, 12:36
by Niobium
hoijui wrote:what is missing for me, is use of icons, and maybe disabling drawing of features or something. is already useful as it is though. :-)
I've looked into doing proper icons, but it currently isn't possible as while widgets can get the icon name, they can't get the actual texture bound to that name, or any of the other information. You do some engine dev work don't you? Spring.GetIconParameters(iconName) would be fantastic.

Could put in disabling features very easily, but is it worth another button? If other people think so then I'll put it in. Maybe if enough rare button ideas come in there could be some 'advanced buttons' toggle that would show them.

Re: Release: Picture-in-Picture

Posted: 10 Nov 2010, 17:22
by hoijui
if it can easily be disabled in the widget (code), then that is enough for me. :-)

yeah i do engine deving, but i know little about gfx and lua and all that. what would that function have to return?

Re: Release: Picture-in-Picture

Posted: 11 Nov 2010, 00:54
by Niobium
hoijui wrote:if it can easily be disabled in the widget (code), then that is enough for me. :-)

yeah i do engine deving, but i know little about gfx and lua and all that. what would that function have to return?

Code: Select all

1) pipFeatures = spGetFeaturesInRectangle(wl - 50, wt - 50, wr + 50, wb + 50)
2) pipFeatures = {}
Find line 1, replace with line 2. Done.

As for what it would need to return: Texture (file or ID), size, radiusAdjust. Currently it isn't possible to get any of those, which is weird given there are functions to add/change unit icons. I don't think it is too necessary though so I'm not going to put in an official feature request.