Animated Crosshairs
enfurno
Join Date: 2003-01-25 Member: 12729Members
<div class="IPBDescription">some cool ideas</div> How bout it? is it possible, to animate crosshairs? is it possible too incorporate ammo count into the crosshair? health?
just some ideas, id be willing too make the sprites if it were possible.
example image below*
just some ideas, id be willing too make the sprites if it were possible.
example image below*
Comments
But maybe it has to be coded in.
Normally, crosshairs have only 1 "frame" in the sprite's animation. Adding more frames will make the sprite animated.
could the crosshair be incorporated into the hud? and if so couldnt the hud be changed too show some sort of circular ammo and health counters in it, and if it were part of the hud then could it be animate? as the minimap is?
Right now, the sprite definition for the weapons are in the weapon_name.txt files in the /ns/sprites folder, telling the game what crosshair the weapon uses, in what file and in what position inside the sprite itself on an XY axis.
*edit* ok, i just did a test, and my xhair did not animate... guess it only plays the first frame <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
i think im gonna begin work on this.. if anyone wants too help, lemme know i forgot how too do sprites quite some time ago. =)
wierd, because the hud is semi transparent itself.
i desire this too work.
Right there, you know that the transparency that needs to be used is INDEXEDALPHA instead of ADDITIVE, because the BLUE is coded in, and overlayed over the crosshair to give it the right color, unlike HL, which the color was given straight in the .bmp itself prior to compiling.
the blue bar applies too ammo count.
red to health and grean too armor.. if we can get this too work with the hud then they could be incorporated in several ways.. again this is just an example.
Nice crosshair enfurno... Doesnt quite look the same blue as the regular one tho, why dont you just steal that blue?
btw thanks for the comment. the colors i just randomly chose for this example, didnt put much thought into design at all.
edit. i am assuming the devs would have too code this in correct? this isnt something we can do, or is it?
Right there, you know that the transparency that needs to be used is INDEXEDALPHA instead of ADDITIVE, because the BLUE is coded in, and overlayed over the crosshair to give it the right color, unlike HL, which the color was given straight in the .bmp itself prior to compiling. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Try decompiling a crosshair sprite into a BMP, and check out the last color of its palette. The color for the crosshair <b>is</b> compiled along with the sprite, and can be changed easily.
In SpriteViewer, it's all grayscale, because using Indexed Alpha requires that all of the pixels should be shades of gray (used to determine transparency), or else it won't know what to do with the pixels that aren't gray.
However, the Health, Armor, and Ammo Counts are using Additive transparency, and the sprite are really grayscale. For these, color is overlayed depending on which team you're on.
The only place that the 'animated crosshair' could be incorporated into, is the mainhud.spr (the sprite which acts as the holder for the team resources and minimap). However, there are many problems, as of right now:<ul>
<li>The 'animated crosshair' won't be able to animate.
<li>The crosshair would probably not be centered.
<li>Attempting to center it would result in having only a semi-circle left.
<li>It could only be in shades of a single colour (since the mainhud.spr uses Indexed Alpha, and changing that would have unpredictable consequences).
<li>You wouldn't have it for the Aliens, no matter how hard you try.</ul>
There might be one way to get the crosshair above into the correct position, for starters. I'll give it a try.
thats where i got the idea for this crosshair, if you havent seen the video on hl2 then download it and you will see.
In SpriteViewer, it's all grayscale, because using Indexed Alpha requires that all of the pixels should be shades of gray (used to determine transparency), or else it won't know what to do with the pixels that aren't gray.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Well i'll be damned... you're right!
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->However, the Health, Armor, and Ammo Counts are using Additive transparency, and the sprite are really grayscale. For these, color is overlayed depending on which team you're on.
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Yeap!
AFAIK, moving the counters is impossible without some changes in coding.
well the crosshair reminds me of the TS one a bit, but yeah, it's clear this can't be made for NS unless the code was changed
There was no way to center it at any resolution.
Great idea, though, and I would've loved to make it work, animated or not.
=)
the blue bar applies too ammo count.
red to health and grean too armor.. if we can get this too work with the hud then they could be incorporated in several ways.. again this is just an example. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
That would make a nice motion tracking sprite.
I like that concept of the health/armor rings around the crosshair... but that must be hardcoded as well.
What you CAN do, though, is edit hud.txt and reposition the health and armor counters next to the crosshair. of course that might get a little crowded up there.
the blue bar applies too ammo count.
red to health and grean too armor.. if we can get this too work with the hud then they could be incorporated in several ways.. again this is just an example. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
That would make a nice motion tracking sprite. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
My thoughts exactly. The default xhairs take up enough space as it is. No need for it to carry vital info. That's why we have ze hud.