Tab-zoom/supcom view

Tab-zoom/supcom view

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Tab-zoom/supcom view

Post by Das Bruce »

What we really need now is the ability to replace units with little icons, and there was something else I but I forgot, anyway. Agree?
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

Agree! Squares for buildings, circles for land units, lines for air units, triangles for navel units and empty squares for navel buildings.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Zoombie wrote:Agree! Squares for buildings, circles for land units, lines for air units, triangles for navel units and empty squares for navel buildings.
NO NO NO NO NO. MOD DEFINED!
User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Post by FireCrack »

Zoombie wrote:Agree! Squares for buildings, circles for land units, lines for air units, triangles for navel units and empty squares for navel buildings.
You dont need diferentiation between land and navy, you can tell the diference by virtue of it being on the sea or not...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

some minimaps are deceiving.
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

Zoombie, quiet. Leave it to people who know what they're talking about. mod-defined ftw, it shouldn't need to be any more complicated than "MapIcon=whatever.bmp;" in the unit file.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

FizWizz wrote:Zoombie, quiet. Leave it to people who know what they're talking about. mod-defined ftw, it shouldn't need to be any more complicated than "MapIcon=whatever.bmp;" in the unit file.
Actually it'd probably be alot easier to stick in / change if it was in its own file. And TGA not BMP, we'll probably need transparencies.
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

Indeed, and let the modder decide at what zoom level to switch to the icon. That way small units can be made to switch to icons sooner than large units.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

TGA < DDS

And it should hopefully be defined in some manner that doesn't involve going through 380 unit files and giving them a pic definition.

There should be a way to define it based on a unit's category. Maybe in a gamedata\uniticons.tdf:

notair=landunit.dds;
vtol=airunit.dds;
notland=waterunit.dds;
commander=commander.dds;

...and so on. Would be much easier to do and would integrate nicely with all existing mods. Also, since JC has a vendetta against new unit tags, this would mean there wouldn't have to be any.
Lord JoNil
Posts: 47
Joined: 28 Dec 2005, 03:20

Post by Lord JoNil »

But shouldn├óÔé¼Ôäót certain units like the krogoth have their own image?
Theotherguy
Posts: 79
Joined: 11 Jul 2005, 02:01

Post by Theotherguy »

yes. You could do it like homeworld 2, where extremely big units are always visible with a square around them or something and everything else becomes icons.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It should work based on a set of rules, that use a set of 4 or 5 symbols, for which they cna be overriden, and then you cna ahve unit specific tags for exceptions to those rules
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Caydr wrote:(...) Maybe in a gamedata\uniticons.tdf:

notair=landunit.dds;
vtol=airunit.dds;
notland=waterunit.dds;
commander=commander.dds;

...and so on. (...)
It could be done like that, but it wouldn't be very flexible. For gamedata\uniticons.tdf: I'm thinking more in the direction of something like

Code: Select all

[UNITICONS]
{
	RelativeBitmapPath=../icons/;
	NumCategories=6;

	[DEFAULT]
	{
		Bitmap=default.dds;
		AdjustToFootprint=0;
		Rotate=1;
	}

	[COMMANDER]
	{
		Bitmap=commander.dds;
		AdjustToFootprint=0;
		Rotate=0;
	}

	[BUILDINGS]
	{
		Bitmap=buildings.dds;
		AdjustToFootprint=1;
		Rotate=0;
	}


	[LAND]
	{
		Bitmap=land.dds;
		AdjustToFootprint=1;
		Rotate=0;
	}

	[AIR]
	{
		Bitmap=air.dds;
		AdjustToFootprint=0;
		Rotate=1;
	}

	[SEA]
	{
		Bitmap=sea.dds;
		AdjustToFootprint=0;
		Rotate=0;
	}

}
AdjustToFootprint would adjust the icon size to the size of the footprint (but perhaps something like AdjustToUnitRadius would be better). Rotate would indicate whether or not the icons should be rotated in the direction of the unit (which is usefull if you have e.g. triangles for airplanes).

You would then need to add a new unit tag to every unit if you don't want it to have the default icon.

But perhaps there are better ways to indicate the icon type for every unit, e.g. via the classes in moveinfo.tdf.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Yeah, I was planning to make it, but my job has cought me again :-( Not enough time right now..
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Caydr wrote:TGA < DDS

And it should hopefully be defined in some manner that doesn't involve going through 380 unit files and giving them a pic definition.

There should be a way to define it based on a unit's category. Maybe in a gamedata\uniticons.tdf:

notair=landunit.dds;
vtol=airunit.dds;
notland=waterunit.dds;
commander=commander.dds;

...and so on. Would be much easier to do and would integrate nicely with all existing mods. Also, since JC has a vendetta against new unit tags, this would mean there wouldn't have to be any.
Really, that needs to be generalized for EVERYTHING. Personally, I think an import/header macro language or something would be ideal. Any tag should be able to be applied to a category or a group of units instead of defined per-tdf file. A c-style #include directive would make doing group-wide changes simple.

My point is: everything should go by per-unit tags, and then include a structure for making per-unit tags easily applied to groups of units. Otherwise you get silly distinctions where you want somethings to be applied to units and others to be applied to groups, when the distinction is artificial.
User avatar
kujeger
Posts: 91
Joined: 07 Oct 2004, 14:46

Post by kujeger »

Having the icon determined by type, overrided by subtype, overrided by subsubtype and so on, with the final autohrity being the unit itself sounds like a good way to do it.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

bruce 32 bit bmp files have an alpha channel.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Are we trying to rip off supcom in any way possible? If we keep building parralel to what its doing, people will leave spring when supcom comes out, because it will be just like it but worse. Lets try and get some original ideas eh folks? Not like we arent getting original ideas already but well...lets stay clear of the cheap ripoffs.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

He right! We should move away from SupCom entirely! SupCom is an RTS! We can't be an RTS! That would be copying! Oh noes!

If it's a good idea you're putting yourself at a deliberate disadvantage by not using it yourself.

Exemples:

Ancient Man: hmm. They seem to be rubbing two sticks together to make heat with which to cook their meat. That is a good idea. However, I will not do the same because that would be copying!

Ancient Man later dies from a bacteria in his raw meat that wouldn't have been present if said meat had been cooked
User avatar
Drone_Fragger
Posts: 1341
Joined: 04 Dec 2005, 15:49

Post by Drone_Fragger »

Guessmyname wrote:He right! We should move away from SupCom entirely! SupCom is an RTS! We can't be an RTS! That would be copying! Oh noes!

If it's a good idea you're putting yourself at a deliberate disadvantage by not using it yourself.

Exemples:

Ancient Man: hmm. They seem to be rubbing two sticks together to make heat with which to cook their meat. That is a good idea. However, I will not do the same because that would be copying!

Ancient Man later dies from a bacteria in his raw meat that wouldn't have been present if said meat had been cooked
You phail. That was awful. In reality they'd kill eachother, then steal the fire and claim they invented it. It happens all the time in life. Albert einstien, Thomas Edison, the list goes on.
Post Reply

Return to “Engine”