Release: Picture-in-Picture - Page 2

Release: Picture-in-Picture

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Release: Picture-in-Picture

Post 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! :-)
Last edited by hoijui on 09 Nov 2010, 11:46, edited 1 time in total.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Release: Picture-in-Picture

Post by manolo_ »

thx, i wanted that since ages, cant wait to test it out today
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Release: Picture-in-Picture

Post 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.
TheEpicMang
Posts: 11
Joined: 05 Nov 2010, 20:07

Re: Release: Picture-in-Picture

Post 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
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Release: Picture-in-Picture

Post by Neddie »

I think this might be very useful for us over at the 1944 bunker.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Release: Picture-in-Picture

Post 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)
UAF
Posts: 96
Joined: 02 Jan 2008, 19:25

Re: Release: Picture-in-Picture

Post 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)
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Release: Picture-in-Picture

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Release: Picture-in-Picture

Post 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?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Release: Picture-in-Picture

Post 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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Release: Picture-in-Picture

Post 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?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Release: Picture-in-Picture

Post 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.
Last edited by Niobium on 10 Nov 2010, 11:15, edited 1 time in total.
UAF
Posts: 96
Joined: 02 Jan 2008, 19:25

Re: Release: Picture-in-Picture

Post 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. :)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Release: Picture-in-Picture

Post 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. :-)
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Release: Picture-in-Picture

Post 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.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Release: Picture-in-Picture

Post 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?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Release: Picture-in-Picture

Post 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.
Post Reply

Return to “Lua Scripts”