by Baker » Thu Nov 04, 2010 6:38 pm
It occurs to me that most things that someone is going to do with a HUD in engine coding aren't very complex.
DarkPlaces uses effectsinfo.txt or whatnot to specify particles effects. Some sort of similar text file should be able to obtain most of the flexibility here too.
Although Quake's status bar, as an example, uses flashes for item pickups, aside from that there isn't too much aside from that other than ...
1. x, y coordinates in a 320x240 scale
2. the graphic representing an item, ammo, etc.
3. And although Quake doesn't use this, most people want some sort of alpha blending control.
4. And the ability to specify color for certain ranges, like red numbers when health is low or if ammo is under a certain amount.
5. Ability to draw a bar or circle of some sort based on a percentage, like health as a percent of 100.
6. Plus obviously a desire for things like a radar
7. And the ability to juice up the crosshair or on-screen display a bit, like the sniper rifle zoom in Kurok.
(The crosshair should really be considered a sub-set of the HUD/status bar)
In the coming days and weeks, I'm likely to try to reduce this to a text file with most of the above functionality.
But I'd like to gain any thoughts as I think about doing this.
It is dumb to have to do engine coding only for a HUD and CSQC in my mind is overkill for most HUDs that can be rather easily described with x,y plus graphic name for the most part or x,y, "number"
Then again, if a mod is using a wildly different item inventory, I'm not sure the optimal way to deal with that curveball ... it would be nicer to include something like IT_SHOTGUN in the text file than something meaningless like the numeric constant value. Not sure the ideal way to handle alternate weapon and ammo constants in the most user friendly way.
Either way, I'd like to expose fun and flexibility on the fly.
[Same with the menu system, for the most part, but I don't want to do "too much" at once. Never a good idea ...]
The night is young. How else can I annoy the world before sunsrise?

Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..