Custom unit icons - Page 4

Custom unit icons

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

Moderator: Moderators

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

Post by Das Bruce »

mongus wrote:hm.. you will be able to see where your enemy's commander is?
No. Why the hell would you even bother asking that? :?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Um, I've tested the current dev release of 0.73b1, and I know you've done some fixes since then, but I wanted to make you aware of some concerns I have:

1. In the version I saw, the game engine was clearly drawing the unit's geometry underneath the icon. This kind've defeats the purpose, no offense. People are going to want this feature so that they can command-and-control huge battles, and if it keeps drawing all of those polygons and consuming fillrate... eh... what's the point? Ok, so now I have a colorful icon, instead of a blur of tiny pixels... erm, but if my FPS drops to 5, it's totally worthless. What we need is for the units to quit getting drawn every render cycle, so that we can zoom out and see hundreds of units-as-icons at a smooth framerate, just like we can zoom in and see a relative handful of units at a smooth framerate. Just my two cents.

2. In the dev. release, my custom icon plain doesn't work. Based on your screens, though, it may just be the bugs that were in that release... I'll await the next release and re-visit this.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Argh wrote:1. In the version I saw, the game engine was clearly drawing the unit's geometry underneath the icon. This kind've defeats the purpose, no offense. People are going to want this feature so that they can command-and-control huge battles, and if it keeps drawing all of those polygons and consuming fillrate... eh... what's the point? Ok, so now I have a colorful icon, instead of a blur of tiny pixels... erm, but if my FPS drops to 5, it's totally worthless. What we need is for the units to quit getting drawn every render cycle, so that we can zoom out and see hundreds of units-as-icons at a smooth framerate, just like we can zoom in and see a relative handful of units at a smooth framerate. Just my two cents.
Firstly, as I saw it the icon thing was not to cut down on rendering at uber zoom levels but to make units more visible at said levels, the cut down in stuff to render is coincidental but convenient.
Secondly I've heard that animations can take up alot of cpu time? Might pay to take a leaf from the RTW book which has an option that allows you to turn of desynced animations, as in all or large groups of one particular unit only use the one animation and are translated. Might look a little funny but its an idea.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Animations eat CPU, but unless we have a whole mess of new engine things to control this, we are required by synch to have the animations run in full, in large part because of aiming code. Anyhow, it's not CPU I'm worried about, but GPU. Using icons without drawing the models during that step would just leave us with sim code, pathfinding, map deformation and projectiles... it'd really cut out a lot of load on the GPU, if it was basically just rendering the map, explosions, and the dynamic water reactions, when scaled way out...
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Yes, but it doesn't mean all that isn't simulated anyway. As you can zoom in at any time, the units have to look and behave just as they would without all their poly's being drawn. So there would be virtually no drop in CPU usage over-time.

And whatever GPU savings you may get is eaten up mostly by the fact you're seeing the entire map, so instead of rendering a small portion of the entire map, it's having to do the entire thing.

So it's all a tradeoff.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

But who doesn't want Sprite Spring!! ;)
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Buggi wrote:Yes, but it doesn't mean all that isn't simulated anyway. As you can zoom in at any time, the units have to look and behave just as they would without all their poly's being drawn. So there would be virtually no drop in CPU usage over-time.

And whatever GPU savings you may get is eaten up mostly by the fact you're seeing the entire map, so instead of rendering a small portion of the entire map, it's having to do the entire thing.

So it's all a tradeoff.
Not quite, the map has lod remember.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

2) As soon as the most far unit will get zoomed far enough to turn into icon, all other units should turn into icons (of same size)
That would prevent HMW style unit icons with giant untis not showing as icons untill they're small enough.


I propose there be an options to have units always be icons in settings.exe.

Also is nanospray shown in unit icon mode? If so I might write a patch to change it to a simple line graphics at a distance at some point.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Re: just checking

Post by colorblind »

alik83 wrote:1) if some units are high in the air or on top of big mountain their icon size shouldn't change.
The icons get scaled with the square root of their distance to the camera, which looks quite natural when you zoom in and out.
alik83 wrote:2) As soon as the most far unit will get zoomed far enough to turn into icon, all other units should turn into icons (of same size)
If it isn't like this, can you implement this at least as an option?
They turn into icons when their distance from the camera exceeds a certain value (which can be set in settings.exe, AF, so setting that to a small number resolves your request). This again looks fairly natural.
I suggest you grab the .exe I posted (or the 0.73b1 dev test build) to try the current settings out.
alik83 wrote:Also maybe a possibility to select unit when it's actually smaller than icon even when you click on the edge o the icon.
This isn't implemented yet but it's on my to-do list :).
alik83 wrote:Add drawable and draggable command ques for those groups (which also don't change size in icon view) and you'll have whole theater of iconic war
So I guess you saw that supcom movie too :-). If I can find the time I'll implement that also.
Argh wrote:In the version I saw, the game engine was clearly drawing the unit's geometry underneath the icon.
I really don't think that is the case, but I'll investigate it a bit though. As for your problems with the dev release, you can try the .exe I posted in the topic start. If you still have problems, feel free to PM me about it.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

smoth wrote:
mongus wrote:is it possible to malicious user to assign, lets say a special icon/flag for commander, so he can exactly know where yours is just by looking at minimap?
This would be set by the modder. if someone changes a mod they get a sync error. :P.

So... no.
But the factory ground decals are set by thre modder yet you can replace them with different custom decals without causuing desyncs... Worth checking this out I think...

PS Colorblind that's SWEET work, thx!
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Since 0.72 spring compares mod&map checksums of all clients with host before starting so if you tamper with mod or map you will error out with a (local only) message like "Your mod/map archive is not binary equal to the host's archive. Consider redownloading the mod/map.".

E: if that appears to be untrue, then file a bug report please
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

Well putting replacements for icons in the spring root does allow change of builddecals so i guess those uniticons can be changed aswell. Also when substituting the builddecals you can still play online.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If a user doesnt have a correct or 'synced' copy of the map then the only indicator is an icon that turns red in the player list. No messages popups help reasons, nothing telling you if it's the map or the mod etc....
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

That's in the Lobby AF, spring itself should give a message if you somehow manage to start with binary different maps / mods.

NOiZE got a point, maybe we should disable loading of archives from spring root on multiplayer games, or somehow include those files in the checksumming.
User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

Argh wrote: 2. In the dev. release, my custom icon plain doesn't work. Based on your screens, though, it may just be the bugs that were in that release... I'll await the next release and re-visit this.
I had the same experience with the dev release, the icons just didn't appear, despite tweaking the distance value. I used tga's like those in the example zip.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Yeah, and the newer compiled version ColorBlind put up clearly wasn't compiled from the current SVN, it crashes after it can't find IL.dll... it only works with 0.72b1...
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Foe OfTheBee wrote:I had the same experience with the dev release, the icons just didn't appear, despite tweaking the distance value. I used tga's like those in the example zip.
That's probably because the default value of UnitIconDist (the distance at which units become icons) is 4000 in settings.exe. If you change it to something like 150 or a bit higher, you'll probably see the icons.

TGA's should be fine. If Spring can't load the bitmap or can't find it, it'll replace it with the standard radar blip. So if you see that ingame, you probably misplaced your bitmap :).
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Argh wrote:Yeah, and the newer compiled version ColorBlind put up clearly wasn't compiled from the current SVN, it crashes after it can't find IL.dll... it only works with 0.72b1...
I guess you didn't read the whole of my first post: in order to use the .exe I posted, you have to download the MinGW libraries and put those extra dlls (among which is il.dll) in your spring directory.

And it *was* compiled from SVN; it even has icon support on the minimap, whereas the dev build doesn't.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Wait, wait, wait... then why is that developer release from the 4th missing all of this? Nevermind... I'll just install it and test... sorry for missing that point.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Thats most probably because he uses MinGW and the MinGW build links to IL.dll. The MSVC build however links to OpenIL.dll IIRC. Maybe just renaming the DLL works (but it may crash hard!), otherwise you can find it in the mingwlibs.exe self extracting archive (see sticky thread in dev forum).
Post Reply

Return to “Engine”