DepthHUD Inline - The remake of the old DepthHUD


Author's note : THIS ADDON IS DONCONTINUED.
I wouldn't advise anyone to use it as it is likely to drop your framerate down by 50%.

Hey there !

I know some people liked DepthHUD because it wasn’t far off from the design of the classic Half-Life 2 HUD … and that did not change in “DepthHUD Inline”, which is the name I’m giving to the new version of it.

So, the design of the HUD is exactly the same. The ammo, the shrinking square and blinking icon. Except this time, I - attempted - to code the thing in a way that wasn’t so dorky as the old DepthHUD was. I had a headache when I tried to read my old DepthHUD code to make the new one.


SVN : 

http://depthhudinfo.googlecode.com/svn/trunk/


Garrysmod.org : 

http://www.garrysmod.org/img/?t=dll&id=94766


To install in : 

garrysmod/garrysmod/addons/depthhud_inline/

Here are the two promotional video I’ve made of it (The second video shows the HUD in a more advanced development stage).

[hd]http://www.youtube.com/watch?v=ESMYMSkoHLU[/hd]

[hd]http://www.youtube.com/watch?v=IrN1S9fIrMs[/hd]
(The disappear animation has changed, it now looks like the iPhone “Scale and Fadeout” animation when going back)

http://www.hurricaaanes.info/ai/depthhud_inline_show.jpg

New functionalities include :

  • You have a menu to customize anything anywhere !
  • HUD Lag is still there and customizable.

  • You can change how far are the elements from the edge of the screen altogether.

  • You can disable any element by ticking a box (Useful for gamemodes that use their own HUD !).

  • You can change each element position on the screen with a grid snap (Useful for gamemodes that use their own HUD !).

  • You can still change the text color.

  • You can change the background color and opacity of the boxes.

  • You can set the background color to change dynamically (it will brighten on dark areas, and darken in light areas, still experimental).

  • You can code your own elements by dropping the script in the folder. Default elements include:

  • Health
  • Armor
  • Primary Ammo
  • Secondary Ammo

Framerate (Smoothed value)

  • Framerate (Fast) : Display the true FPS, with a blending of the previous framerate values to simulate persistence of vision.

Ping, with lag spike detection

  • Vehicle Speedometer (MPH)
  • Vehicle Speedometer (KM/H)
  • Clock (24-h)
  • Clock (12-h)

Target Information (reveals the entity name under the crosshair, and if available its model, unless the target is a NPC or a Player).

  • Compass
  • Witnesses : Shows “How many people are looking at you / How many people can potentially see you”.
  • Little “Team name” sticker
  • Experimental crosshair (Beta, may be removed)

For those who know DepthHUD Radar, I copied the “Beacons” system and renamed it to “Elements” to work in DepthHUD Inline. Basically, every element of the HUD has its own LUA file that are loaded automatically.

This is the Framerate element for example :

[lua]ELEMENT.Name = “Framerate”
ELEMENT.DefaultOff = false
ELEMENT.DefaultGridPosX = 0
ELEMENT.DefaultGridPosY = 0
ELEMENT.SizeX = nil
ELEMENT.SizeY = nil

ELEMENT.MaxFramerate = 100
ELEMENT.colorBadLesser = Color(255,0,0,92)

function ELEMENT:Initialize( )
self:CreateSmoother(“framerate”, 25, 0.01)
end

function ELEMENT:DrawFunction( )
local framerate_smooth = math.floor(self:GetSmootherCurrent(“framerate”))

local framerate = math.floor(1 /FrameTime())
local smallText = "FPS"
self:ChangeSmootherTarget("framerate", framerate)

rate = 1 - (1 - math.Clamp(framerate_smooth / self.MaxFramerate,0,1))^2


self:DrawGenericInfobox(

/*Text */ framerate_smooth
/*Subtxt / ,smallText
/
% */ ,rate
/atRight/ ,false
/0.0 col/ ,self.colorBadLesser
/1.0 col/ ,nil
/minSize/ ,0.5
/maxSize/ ,1.0
/*blink< */ ,-1
/blinkSz/ ,1.0
/*Font */ ,nil
/bStatic/ ,true
/*stCol */ ,nil
/stColSm/ ,nil
)

return true

end
[/lua]

If you have any thing to report or to tell about this, feel free to share here.
Thanks for reading , Cya !

Looks pretty useful. Got my download.

Wohoo!

Downloading right now!

Yay, a new version!
This has always been my favorite HUD.

Wonderful seems really useful

I did some work in the meantime to fix issues related to Garbage Collector.

Most of the Vectors and Colors are now registered in either their own ELEMENT.var or in the main file for drawing purposes. Some bugs may have slipped in though.

It’s committed.

for some reason, nobody’s microphone tags appear. not even my own. I never know who is talking or when I have the mic button held down.

It’d be nice the have the compass back, if not just the pointers showing the X and Y axis.

There you go ! Enjoy !

Woot! Thanks! Finally update :slight_smile:
Going to test this out now! :smiley:

This is pretty fucking cool.

Can’t wait to make some modules for it when I get back from work.

[editline]12:23PM[/editline]

wat

what

Thanks, brah.

Hey Ha3, do you think you can make a filefront mirror since Gmod.org is apparently unstable, because i kinda hate svn so yeah? Can you get a filefront mirror?

Um. I found a bug.

http://old.filesmelt.com/Imagehosting/pics/89a7c8c647edab43662880eceb0346e7.JPG

This happens in Single Player only.
When you open Steam community in-game, Your game pauses. If you noticed that. Then when you go back in game. This happens.

But it doesn’t happen when you reguarly pause the game. (As in, Going to the Main Menu).
Anyways to fix this?

It’s fixed. I didn’t increment the Version file because this is very minor.

About the downloadable package, I’m surprised there is no download package on Google Code. I did some search though and it seems that they are working on it. I’m going to zip files to upload on Google Code though.


ZIP download if you're lazy (prefer the SVN for easy updates) :

http://depthhudinfo.googlecode.com/files/depthhudinline.zip

Omg i luv you XD

Sorry that I just respond 3 days after you send me the PM (I’ve been busy).
An impressive piece of work you did there. The coding-style is A+ and optimized for decreased garbage-generation.