HUD shields and armor

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

HUD shields and armor

Post by pyramid »

The shields and armor status display on the disabled-cockpit HUD is very ugly. I have managed to include image files to represent their status but still those ugly lines do not go away.
Would appreciate a pointer into the right direction...
Last edited by pyramid on Sat Oct 04, 2008 6:02 pm, edited 1 time in total.
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Re: Disabled cockpit HUD shields and armor

Post by pyramid »

First of all, let me apologize for the seemingly rude comment given in my previous post. I can only express my gratitude and respect to the programmers and contributors of this titanic project who invest their valuable time and soul into this tremendous, inspiring, complex, and profoundly enthralling universe. I meant to say "ugly" as the antonym to "beautiful" by which I simply manifest my desire for the graphical presence of this game/engine and specifically the shields hud to be improved, and offer my contribution to change those things that are within my reach.

My point is, that by including the necessary statements and corresponding files into the cockpit (.cpt) definition I cannot make correct hud displays. Let me further elaborate.

Nice shields can be included by providing the correct statements in the cpt file:

Code: Select all

   <ShieldF file="shieldf.spr"/>
   <ShieldB file="shieldf.spr" ycent="-.92" GaugeDown="1"/>
   <ShieldR file="shieldl.spr"/>
   <ShieldL file="shieldl.spr" xcent=".3" GaugeRight="1"/>
Further down, there is the VDU section which defines hud elements coded in /src/gfx/vdu.cpp (function static void DrawShield defines the way standard shields (lines) are drawn). This is the standard line:

Code: Select all

<VDU TextRows="15" TextCols="25" type="Shield  Manifest" file="lvdu.spr" />
Now if I remove the "Shield" part of this, I naturally get the cash and cargo manifest but not the ship display (as in the wvdu manifest). Again if I ony use "Damage" statement for the lvdu, I actually do get my ship to display but also the systems health status. Any other combination of VDU modes does not help.

This is not surprising looking at the code, since 1) there seems to be no VDU mode only for calling DrawHUDSprite and 2) There seems to be not separation in the code itself for displaying the ship and its shield and armor (both, VDU::DrawVDUShield and VDU::DrawTarget call DrawHUDSprite and their incarnations of DrawShield(Armor).

While it is debatable if target ship would require a separation of VDU modes for ship and shield, I believe it would contribute to the visual appeal of the game, even if I am aware that there are more important and basic tasks to be accomplished beforehand. As for my own ship, this separation is required and highly recommended.

While - up to now - still not having figured out exactly how to accomplish the incarnation of my proposal, I do smell the scent of it (somewhere between vdu_modes [], VDU::Draw, and cockpit_xml.cpp). However, I am confessing, being proficient in a dozen of programming (and not only) languages, I do get allergic contact dermatitis with C++.

My little plea at this point is going towards the developers who are more proficient with this cryptic tongue: If you think that up to present I did a good job improving the 37 planets and committing further 30 from other artists, and you have the time and ease to make this little change happen soon, I'd rather make appealing shield graphics and continue improving the remaining 48 planet textures. :twisted:

Said so much, I am not entirely sure if my analysis is on track and would appreciate any help and guidance.

Post scriptum:
Well, this post diverted toward Developer Focus already, so please move it fittingly.

Post post scriptum:
Meanwhile, I have locally disabled DrawShieldArmor in vdu.cpp/VDU::DrawVDUShield to be able better continue my new shield graphics development.
loki1950
The Shepherd
Posts: 5790
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

I do get allergic contact dermatitis with C++.
only that :wink: i will leave this here for now pyramid.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
()Alf
Mercenary
Mercenary
Posts: 105
Joined: Fri Dec 28, 2007 4:55 pm
Location: im Schwabenländle

Post by ()Alf »

This forum can be really funny :lol:
Enjoy the Tri p :shock:
__________________________________
My Box:: Board: Fujitsu-Siemens D2156S; CPU: Pentium 4 - 3.4GHz Core²Duo; GraCa: ATI Radeon X1600Pro (PCIe); RAM: 3GB; Sound: Creative SB Audigy 1; 2xHD(ntfs): Pri_120GB,Sec_250GB; OS: Win-XP-Pro-SP2_32bit
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

To give a somehow better understanding to what I am trying to accomplish here, I will share some screen shots with you. Necessarily, diverting into developer focus and artwork/content vetting cannot be avoided.

Here's a view of the current left view display unit (VDU, lvdu) shield and armor stats for the "disabled-cockpit":
Image

It's artistic evaluation can be looked up in my previous post. Now, I am proposing to replace this representation of shield and armor status with something more representable to the likings of the following image. Please note that the engine code has not been changed and the native engine shield and armor stats representations are still visible.
Image

On a side note, for the placement of my images, I have constructed a small helper image (below) plus a simple calc sheet that allows easy calculation of the required numbers to be included in the sprite files and cockpit file shield and armor statements. Both will be soon shared in the masters directory together with different shield/armor combos as well as the source files used to make the shields and armors.
Image

To give you some further idea of the possibilities of the source file, in the following picture is another type of shield and armor status. The core possibilities (of the source for POV-Ray) are shields/armor shapes from circular to rectangular (completely flat) shape, any color combination you can dream of, and almost any type of transparency or transparency gradient for both.
Image

Of course, not being happy with the overlay of my new shields and armor stats with the existing engine stats, I am pursuing the direction of making the native engine representations disappear and at the same time maintaining the lvdu image of my ship intact. This quest lead me to the already mentioned (see previous post) uncommenting of the DrawShieldArmor statement in the function void VDU::DrawVDUShield in line 599 of the vdu.cpp file, which lead me to the desired result visible in the next image. The colors are changed just to exemplify the existing possibilities.
Image

Before proposing this little change for commitment to svn, let me share with you my dilemma. This little change (of uncommenting the DrawShieldArmor statement) would imply that all cockpits that use the <VDU ... type="Shield ..." file="lvdu.spr" /> statement either:
* upgrate to also include the corresponding shield and armor statements and images, or
* remain without shield and armor stats representations (which isn't really an acceptable option)
As far as VS the game is concerned, with the existing six cockpits, it is no issue, since I can easily upgrade the required files after generic approval of the approach here presented.
My concern however is with backward compatibility to other mods. A preliminary scan of few of the paralleluniverse and privateergold mods revealed that this statement is not used at all, means your own ship image is not shown in the vdu and the cockpits have separate shield and armor statements included and do not utilize the native engine shield/armor representation.

Another, yet unexplored option, would be to add and allow another statement type to the cockpit file, e.g. <VDU type="Vessel Shield" file="lvdu.spr" />, which would permit the display separation of your own ship and the shield/armor stats combo. This, of course, would require some coding and as far as I am concerned, with my migraine-stimulating c++ knowledge and (coming not so long ago from a windos programming environment) missing IDE setup with no debugging, tracing and this sort of programming facilities at hand, I'd jump into it only if deemed compulsory functionality.

Call for community feedback:
Therefore summarizing, what I would appreciate and request from you, developers, mod lead developers, users, programmers, and players, are comments and suggestions on the following:
1) Is the improvement in shield/armor graphics for VS the game appreciated? If so what would be the desired color combination for shield and armor?
2) Can VS mods live with the uncommented DrawShieldArmor statement in vdu.cpp (i.e. <VDU type="Shield" file="lvdu.spr" /> statement is not used in any cockpit file)?
3) Is a hermetic separation of ship and shields/armor statements in the cockpit files desired for any current needs or future flexibility?

Post scriptum:
Just in case the question has been occupying your mind, yes, I have been taking a break off improving planet textures. 8)
loki1950
The Shepherd
Posts: 5790
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Nice work much more colourful and obvious you will notice when your shields are close to dropping.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

definitely a great idea. those lines dim now (an improvement over the stable) but aren't up to the quality level of the rest of the engine (which is exceptional).
First of all, let me apologize for the seemingly rude comment given in my previous post. I can only express my gratitude and respect to the programmers and contributors of this titanic project who invest their valuable time and soul into this tremendous, inspiring, complex, and profoundly enthralling universe....
roflmao :D
sounds like my emails to people :D :D
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Post by legine »

nice way to go. pls continue :)
Coragem
Bounty Hunter
Bounty Hunter
Posts: 169
Joined: Sun Jan 20, 2008 8:38 pm
Location: Rio de Janeiro, Brazil

Post by Coragem »

with the very good new graphics for shield+armour the target vdu old shield graph look even uglier.

Can this be used in the Shield representation on the TARGET vdu?
My System: Arch Linux x86_64 Bits CPU: AMD Phenom II X4 995 RAM: Kingston DDR2 800Mhz 8 GB GPU: Dual ATI Radeon HD 4830 512 MB Opensource ATI-Git Drivers. HD: SATA 500 Gb WindowManager: KDE4 Joystick: Thustmaster T.Flight Stick X USB
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

Haven't been giving the target shield/armors a big thought yet. There are two possible ways we can go.

1) Understand your ship hud display as an instrument reading the detailed status od your ship (based on a combination of a set of sensors readings) and the representation of your target as an iconic ans simplified representation of your targets shield status (based on one particular sensor reading)
This might explain the difference in visuals and make it feasible to keep target shields displayed as they are (in terms of simplicity not graphics).

2) Understand both, your ship and the target, shield display as the result of detailed sensor reading and display a more detailed shield display for the target.

In any case the graphical aspect of the target shields should be improved. The question really is only to which extent and detail the target shield would be drawn. In addition, this would probably require adaptations to the engine (I'll need to analyze this in more detail), since there are currently no facilities implemented to provide shield sprites for targets.

Anyway I'll put this up as an item for post 0.5
Coragem
Bounty Hunter
Bounty Hunter
Posts: 169
Joined: Sun Jan 20, 2008 8:38 pm
Location: Rio de Janeiro, Brazil

Post by Coragem »

Ok great, i just posted cause i didn't know if anyone had though about the issue. Good to know you already started thinking about it.
This might explain the difference in visuals and make it feasible to keep target shields displayed as they are (in terms of simplicity not graphics).
I understand the idea. though the same thing myself. if we can change and it fits, nice, if not, well maybe later.
My System: Arch Linux x86_64 Bits CPU: AMD Phenom II X4 995 RAM: Kingston DDR2 800Mhz 8 GB GPU: Dual ATI Radeon HD 4830 512 MB Opensource ATI-Git Drivers. HD: SATA 500 Gb WindowManager: KDE4 Joystick: Thustmaster T.Flight Stick X USB
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

HUD Shields and Armor

Post by pyramid »

Today, I've committed to svn new armor sprites with 8 faces for the disabled-cockpit. Other cockpits will follow soon.
The individual faces correspond in the following way to your vessel orientation ( ship orientation triplet means: (F-front, B-back), (R-right, L-left), (T-top, B-bottom); clock hours indicate the HUD position): FRT-8h, FRB-7h, FLB-5h, FLT-4h, BLB-2h, BLT-1h, BRT-11h, BRB-10h, or more graphically:

Code: Select all

	BRT	BLT	
BRB			BLB
FRB			FLB
	FRT	FLT	

The orientation was specially designed for the Llama, which in the HUD display is oriented with the nose towards left-bottom and in such a way that the correspondence between the HUD and the 3d space is easy to remember:
* bottom and top HUD armor images represent the front and back top armor
* left HUD armor images represent the right front and back bottom armor
* right HUD armor images represent the left front and back bottom armor

Unfortunately, not all ships HUD representation is oriented in the same way (e.g. Dostoevsky) so confusion might arise. I would propose to orient all ship HUD images in the same way.

Here's a preview of the new HUD armor graphics:
Image

I was trying to achieve the same effect with the shields. While the xml parser seems to be prepared for that I was not successful with making the BRB and BLB shield indicators actually visible on the HUD.

EDIT: OK, now all the cockpits are changed to include eight armor faces.
At the same time, images and sprites were renamed to the new extension schema (.image and .sprite respectively).
fUlainfesse

SPAM!

Post by fUlainfesse »

SPAM!

[I just modified the first post code to work in replies too. -ace123]
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

Hmm.. I'm not sure what orientation will eventually be best, but it should be standardized both for the HUD and the pics in the middle of the shield display. Many people may associate UP <--> FRONT and might not immediately take to damage at the front of the ship being displayed at the bottom, etc.
Still, I don't know that this is a "right answer exists" sort of situation, so... we should all ponder for a bit, perhaps :)

Perhaps we could do different shades of orange for top/bottom? thoughts?
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

UP <--> FRONT would imply having the nose of the ship pointing upwards. I tried that but this looks ugly and is somehow counter-intuitive with current hud images (or would require the re-rendering of all ship hud images). I think it is ok to have front armor where the nose of the ship is in the hud image (down). This however needs to be standardized so that top and bottom have the same reference for all ships.

I like the idea of different shades for top and bottom armor (other color suggestions are welcome):
Image
cap601
Merchant
Merchant
Posts: 56
Joined: Wed Jul 18, 2007 3:28 pm

Post by cap601 »

Another problem is damage to the left side of the ship is shown on the right (and vice versa) which is counter-intuitive. I feel it makes more sense to redesign the images to fit the display (with front<->top, left<->left) then vice versa. This shouldn't be much more hassle as many ships would need new images even for the proposed layout.
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

While it is true that most if not all ships require better versions of hud images, it is not entirely true that all would need new images for the current armor setup. Take for example the Areus. The existing hud image is not so bad and can simply be mirrored horizontally to achieve the correct positioning for current orientation (front<->down). While, with changing the orientation to front<->up, the exiting hud image mirrored vertically produces a view that is not understandable at least, if not totally confusing and unrecognizable.

Don't take me wrong. I am not opposing the change. Rather, if the front<->up orientation is desired and found more believable by the users, then I'd recommend to implement it. There is almost no work involved with repositioning the armor faces. I can do it within an hour. The problem would be making the new renders (with transparent background, anti-aliased edges, 512x masters) for all ships. Something that currently is beyond my focus, scope, and capabilities. We are talking about 70-80 vessels here. Community and user contribution would be essential to make this change as quick and painless as possible.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

I sent a set of hud images for the ugliest few ships off to jacks a few days ago. I took them all facing bottom-left like the current llama. Either that or bottom-right facing look the best imho, so I guess we should just pick one and stick to it. I agree that the current llama would be a fine basis, and if so, i'll start flipping and bettering some of the huds as soon as I get some support here. :wink:
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

Coragem wrote:with the very good new graphics for shield+armour the target vdu old shield graph look even uglier. Can this be used in the Shield representation on the TARGET vdu?
May the wish come true... et voilà...here it is in the svn; right now only as proof of concept for disbled-cockpit. The remaining two active cockpits will follow soon.

EDIT: All cockpits (even the inactive ones) now have their target shield images. :D
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

The individual faces correspond in the following way to your vessel orientation ( ship orientation triplet means: (F-front, B-back), (R-right, L-left), (T-top, B-bottom); clock hours indicate the HUD position): FRT-8h, FRB-7h, FLB-5h, FLT-4h, BLB-2h, BLT-1h, BRT-11h, BRB-10h, or more graphically:

Code: Select all

	BRT	BLT	
BRB			BLB
FRB			FLB
	FRT	FLT	

Image
Most of the vessels have now the correct hud image orientation committed to svn. There might be a couple that I overlooked or couldn't render.
Fendorin
Elite Venturer
Elite Venturer
Posts: 725
Joined: Mon Feb 26, 2007 6:01 pm
Location: France, Paris

Post by Fendorin »

Great job ! and thank
Post Reply