Page 1 of 1

User Interface - Display unit portrait using a custom camera

Posted: 12 Jan 2012, 04:20
by super_g
I am attempting to display a portrait of the currently selected units in a widget. I would to use a camera in front of the selected unit and display the resulting image from the camera on the user interface. This would allow me to reuse passive animations and not have to create portrait images.
If anyone knows if this is possible and if so how that would be great, thanks.

Re: User Interface - Display unit portrait using a custom camera

Posted: 12 Jan 2012, 04:29
by knorke
welcome :-)
There are Lua functions to draw unit models.
This widget is somewhat similiar:
http://code.google.com/p/xta-springrts/ ... _1_xta.lua
When you put units into groups, it draws a rotating 3d view things of the units on a button.
(if you want to test it, mind this bug: http://springrts.com/phpbb/viewtopic.php?f=11&t=27358)

I guess the unit could be made to move its pieces but not sure if you actually use existing unit scripts. (probally not)

Re: User Interface - Display unit portrait using a custom camera

Posted: 13 Jan 2012, 15:46
by AF
super_g wrote:I am attempting to display a portrait of the currently selected units in a widget. I would to use a camera in front of the selected unit and display the resulting image from the camera on the user interface. This would allow me to reuse passive animations and not have to create portrait images.
If anyone knows if this is possible and if so how that would be great, thanks.

How do you intend to deal with the selection of two types of units?

Re: User Interface - Display unit portrait using a custom camera

Posted: 14 Jan 2012, 18:08
by MidKnight
AF wrote:
super_g wrote:I am attempting to display a portrait of the currently selected units in a widget. I would to use a camera in front of the selected unit and display the resulting image from the camera on the user interface. This would allow me to reuse passive animations and not have to create portrait images.
If anyone knows if this is possible and if so how that would be great, thanks.

How do you intend to deal with the selection of two types of units?
He could do it the same way *Craft does.
(Then the question becomes, what does *Craft do?)

Re: User Interface - Display unit portrait using a custom camera

Posted: 14 Jan 2012, 18:42
by smoth
most spring games have WAAAAAAAAAY more units than starcraft.

Re: User Interface - Display unit portrait using a custom camera

Posted: 15 Jan 2012, 03:31
by Forboding Angel
smoth wrote:most spring games have WAAAAAAAAAY more units than starcraft.
^^ This. The entire protoss tech tree (including units) is only 29 units.

Me and kaiser could have 2 factions easily by now if we followed starcrap.

Re: User Interface - Display unit portrait using a custom camera

Posted: 16 Jan 2012, 16:29
by super_g
AF wrote:
super_g wrote:I am attempting to display a portrait of the currently selected units in a widget. I would to use a camera in front of the selected unit and display the resulting image from the camera on the user interface. This would allow me to reuse passive animations and not have to create portrait images.
If anyone knows if this is possible and if so how that would be great, thanks.

How do you intend to deal with the selection of two types of units?
I am planning to display a portrait of each type of unit selected and a list of attributes/stats for that unit type.

I am having trouble displaying the information on the same plane as the built in mini-map.

Re: User Interface - Display unit portrait using a custom camera

Posted: 16 Jan 2012, 16:33
by knorke
do you so far have any code to show?
or do you need an idea how to start?
with so few informations its hard to help..

Re: User Interface - Display unit portrait using a custom camera

Posted: 16 Jan 2012, 17:27
by luckywaldo7
MidKnight wrote:
AF wrote:
super_g wrote:I am attempting to display a portrait of the currently selected units in a widget. I would to use a camera in front of the selected unit and display the resulting image from the camera on the user interface. This would allow me to reuse passive animations and not have to create portrait images.
If anyone knows if this is possible and if so how that would be great, thanks.

How do you intend to deal with the selection of two types of units?
He could do it the same way *Craft does.
(Then the question becomes, what does *Craft do?)
Image

There is a unit list that shows all individual units (colored according to hp level, with some addition blue square things for protoss shields). If there are too many units to fit on one page, they overflow onto additional 'pages' that you can flip through.

Additionally there is a unit portrait, that is 90% decoration. There is only enough space on the action menu to show special actions for 1 type of unit at a time, the unit that gets shown in the portrait. In this case, the portrait is showing a sentry, and the special sentry spells of force field, sentry shield, and hallucination.

You can use tab to flip through unit types to show their special actions. Suppose you also had some high templar selected, you could press tab and the portrait would switch to a high templar, and the special unit actions would switch to feedback and storm.

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Jan 2012, 17:13
by gajop
Forboding Angel wrote:
smoth wrote:most spring games have WAAAAAAAAAY more units than starcraft.
^^ This. The entire protoss tech tree (including units) is only 29 units.

Me and kaiser could have 2 factions easily by now if we followed starcrap.
And in my oppinion, maybe you should've done that.
Can't comment on evo, but I find zero-k a bit intimidating due to a lot of early build options and a relatively short tech tree, in contrast to starcraft 1, where you can build only 1 attack unit when you build your first 'factory'.

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Jan 2012, 17:40
by smoth
Starcraft is a smaller scale etc this has already been discussed slamming one set of features from one game type into another is not always going to end well. Good day.

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Jan 2012, 21:59
by Forboding Angel
gajop wrote:
Forboding Angel wrote:
smoth wrote:most spring games have WAAAAAAAAAY more units than starcraft.
^^ This. The entire protoss tech tree (including units) is only 29 units.

Me and kaiser could have 2 factions easily by now if we followed starcrap.
And in my oppinion, maybe you should've done that.
Can't comment on evo, but I find zero-k a bit intimidating due to a lot of early build options and a relatively short tech tree, in contrast to starcraft 1, where you can build only 1 attack unit when you build your first 'factory'.
Nah, I don't agree. The only thing that keeps sc2 from being a snoozefest is the fact that you have to micro EVERYTHING.

For example, the pages of units are done that way deliberately so that unit numbers are hard to count. Then the fact that you have to cycle through them with tab in order to use abilities. In Evo, you have a mass of units selected, it shows you how many and of what type, and all of their special abilities can be triggered without cycling. This is FAR superior. Evo has a total of 55 units for Outer Colonies iirc.

In evo you have these distinctions of units built in the factories labeled as such: All-Terrain, Hovers, Amphibious, Aircraft.

If you build an aircraft factory, it's a decent bet that you'll end up with aircraft, likewise, if you build an All-Terrain factory, it stands to reason that units built from that factory will probably be able to go anywhere.

ZK is a bit confusing at first, I completely agree. But they are trying to (in certain ways) mimic TA's style of tech tree (sort of, not really the tree so much as the interactions), which with TA+CC had like 350+ units in it. So it stands to reason that you're probably going to need to spend quite a few games getting comfortable with it and learning the units. It's not like any of us knew everything there was to know about TA within a day. In the few times I've played ZK, I was hopelessly lost. That isn't the ZK guys' fault. It's mine for not learning the game.


The main point is, there is no RTS game that you will be able to just pick up and run with. I started playing Nuclear Dawn about 2 weeks or so ago. Even I with all my RTS experience had to spend a little time getting used to the Commanding part (Actually, the power setup is REALLY similar to how Evo's resourcing works). I don't understand where people around Spring get this idea that you should be able to pick up any new RTS game and completely understand it within 30 minutes. That's ridiculous!

Sorry for the derail.

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Feb 2012, 14:59
by KingRaptor
Is there a (hopefully not too hard way) to fulfill the original request? Specifically, I'm looking to do a PiP for a certain flight sim.

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Feb 2012, 16:26
by Beherith
If I recall correctly, VBS did a widget that allowed a full map view in PIP

Re: User Interface - Display unit portrait using a custom camera

Posted: 21 Feb 2012, 19:25
by knorke