Page 1 of 2

Lobby mod tags and icons standard

Posted: 01 Jul 2007, 03:11
by AF
There's been a few things going around in the past about mod icons and the lobby however I think nows the time to push forward with it.

When I hollow and betalord discussed it, there was a big hoohaa over using the bitmap format for tasclient and the other lobbies following suite. This doesnt factor in exactly where would the mod icon go in tasclient?

So, in the present we have 2 lobby other projects AFLobby and SpringLobby, both windows and linux compatible, both making fast progress, and both able to render more conventional formats such as png gif and jpeg.

As the only person in a position to implement this within the next week, and the one who made the original proposal, I shall take the lead. So I propose the following setup:

Mod icons and tags

These will take both 32x32 form and 256x256 form. Either GIF PNG or jpeg acceptable. These will be referenced in modinfo.tdf. A tag will also show the abbrieviated version of the mod name to be shown in the battle listings, e.g. AA versus Absolute annihilation, BA vs Balanced Annihilation etc...... This will be referenced in the modinfo.tdf too.

Here is an example:

Code: Select all

[MOD]
{
	name=Balanced Annihilation V5.4;
	shortname=BA 5.4;
	description=Moooooo!;
	modtype=1;
	numdependencies=3;
	depend0=springcontent.sdz;
	depend1=otacontent.sdz;
	depend2=tatextures.sdz;
	[NTAI]
	{
		tdfpath=BA;
	}
	[LOBBYIMAGES]
	{
		image32=BA32.png;
		image256=BA256.png;
	}
}
Considering the status of the lobbies I believe now is the time to discuss this and start using a standard rather than imagining one for the far future. Its my intention that this standard I propose and any modifications people reach a consensus on in this thread will be a part of the next versions of the major mods.

Posted: 01 Jul 2007, 04:35
by FoeOfTheBee
SVG is worth looking at. A vector format would make resolution relatively unimportant.

Posted: 01 Jul 2007, 05:46
by AF
If java supports it which I dont know then yes I would, but those are the formats I know all lobbies can open relatively easily.

Posted: 01 Jul 2007, 05:58
by FoeOfTheBee

Posted: 01 Jul 2007, 12:35
by Tobi
Since png and jpeg are much easier to implement in most frameworks, I think SVG should be optional, and png/jpeg provided as fallback.

Code: Select all

   [LOBBYIMAGES]
   {
      image=BA.svg;
      image32=BA32.png;
      image256=BA256.png;
   }
(It is like this in KDE too, I think: SVG file for programs that support it and png fallbacks in different resolutions for programs that don't support SVG)

For the rest this sounds like a good standard.

Wrt png, remember to check that the library/framework you use supports transparency, since that seems pretty important given different background colors / themes lobbies may have.

Posted: 01 Jul 2007, 13:06
by tombom
So what would this actually do? I'm a bit confused. If it just displays an icon of a mod, I don't really see the point.

Posted: 01 Jul 2007, 16:14
by FoeOfTheBee
Including SVG would allow a lobby program to display an icon at any resolution without losing quality, so icon dimensions will have no arbitrary limits.

Posted: 01 Jul 2007, 16:52
by TradeMark
Do we really need this... it just makes more useless crap at the battle list, name tells it better which mod it is :|
That short name would be good idea though.

Posted: 01 Jul 2007, 16:57
by KDR_11k
FoeOfTheBee wrote:Including SVG would allow a lobby program to display an icon at any resolution without losing quality, so icon dimensions will have no arbitrary limits.
Yeah but you'll want a more simple icon for smaller sizes anyway as a big icon scaled down like that would be just a mess of random pixels.

I'm not sure about the icon, where would that be displayed? If it's for the hosting list, shouldn't this be more like 80x16 or so, i.e. vertically small but horizontally larger?

Posted: 01 Jul 2007, 23:30
by AF
TradeMark wrote:Do we really need this... it just makes more useless crap at the battle list, name tells it better which mod it is :|
That short name would be good idea though.
I doubt this would ever be used in tasclient. So dont think of it using tasclient. Remember, we have other lobbies, that intend to chaneg the UI greatly from tasclient.

For example, what if instead of a battle list there was sets of thumbnails with the n# open battles next to them which acted as drawers that opened up to show the battles?

What about lists of icons for a mod picker in a fancy host tab? Easier recognition in a battle window? Popups for notices saying "New BA game opened"? Filtering replays? Mod icons in channel topics and icons on tabs? Mouse overs of battles in lists? Who says battles would even be in a tasclient style table at all?

Spring lobby and AFLobby both have transparency support. I already use transparency on rank and tab icons and spring lobby has it on the menu images.

And I agree about svg being useful but I think that at the bare minimum the 2 other image tags should be the minimum requirement but with the image=*.svg; tag being the optional implementation (you dont have to provide an svg but you must provide the other 2 as fllbacks minimum).

Posted: 02 Jul 2007, 01:18
by BrainDamage
uhmmm, may i suggest to split:

Code: Select all

name=Balanced Annihilation V5.4; 
shortname=BA 5.4;
to:

Code: Select all

name=Balanced Annihilation; 
shortname=BA;
version=5.4;
that way, it could be possible in the future to implement an automatic version check/update

Posted: 02 Jul 2007, 02:14
by AF
I disagree, for several reasons.


A) This would mean tasclient users couldnt differentiate anymore between versions.

B) There are other proposals for autoupdating.

Posted: 02 Jul 2007, 11:18
by Boirunner
I think jpg is a very poor choice of image format for a 32x32 icon. Use png or bmp instead.

Posted: 02 Jul 2007, 11:46
by AF
bmp is too large and cumbersome, it doesnt even have display support in some browsers, such as internet explorer.

Posted: 02 Jul 2007, 14:24
by TradeMark
BMP too large for 32x32 image? omg... it takes exactly 3kB no less or more. PNG takes 2.9kB, so its almost same. And why you are talking about browsers? This is a lobby client thing?

Use PNG instead then... JPG sucks.

I dont like that vector graphics thing either, rarely anyone uses it, or supports.

Though, who the hell even said anything about JPG than Boirunner? :-)
Well, i dont care, i said my opinion.

Posted: 02 Jul 2007, 14:28
by Snipawolf
JPG is smaller even if it is full quality than any other image type...

So, transparency, PNG, anything else, JPG...

Posted: 02 Jul 2007, 14:29
by TradeMark
No, JPG makes images look worser, even when its "full quality", it fucks up the colors with pixel graphics.

PNG is good because it supports paletting too, and it compresses images losslessly, its basically zipped BMP with transparency support...

Posted: 02 Jul 2007, 16:44
by KDR_11k
JPEG uses a discrete cosine transform on the image. While that works well with photos since noone's going to miss some sharpness in the small details it'll wreak havoc upon icons. JPEG is meant for large areas with almost but not entirely the same color (e.g. a real wall, that has light and shadow on it but mostly the same color), if you have many pixel-sized strong color differences the algorithm causes a lot of quality degradation because it can't deal with sudden changes very well (try something like encoding a square wave into a fourier series for a comparison).

PNG was designed to deal with computer generated images that have very hard color edges and such. Use PNG or GIF for images of that size. Hell, even if BMP is too big, many mods have their textures in TGA which is just as large so one icon won't do much to the mod size.

Posted: 02 Jul 2007, 18:52
by smoth
I'll not get into this debate but af, when you decide on what you need be sure to let me know and I will add it accordingly.

Posted: 02 Jul 2007, 20:36
by rattle
PNG all the way.