Forum

Simple way to a customize hud using QC?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Simple way to a customize hud using QC?

Postby Moi » Mon Jul 26, 2010 2:15 pm

I've read the tutorial about CSQC hud customizing but i hope there are easier way because the tutorial uses unusual syntax only compiles with fte and requires csqc to run.

are there any better/easier/different ways to do so? maybe by showing sprites in front of the screen?
Moi
 
Posts: 12
Joined: Tue Jul 20, 2010 10:47 pm

Postby ceriux » Mon Jul 26, 2010 2:18 pm

if you read through the tutorial, there's also a darkplaces version. csqc is probably the easiest way to make a custom hud. other wise your stuck using client side coding through the engine.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Spike » Mon Jul 26, 2010 2:47 pm

csqc or engine code are the two sane ways to make a hud. engine code will never be portable to other engines, at least csqc stands a chance.
there are other ways, you can create sprites infront of the view, sure, but that'll bug out the instant that you move the mouse.
DP has an svc_showpic svc. But that also has its flaws and will bug out if the user has a different resolution.

if by tutorial, you refer to csqctest's hud.qc, then yes, it only compiles with fteqcc due to its usage of arrays. You don't have to use arrays, you can use lots of if statements instead, and then it'll work with any qcc.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Moi » Mon Jul 26, 2010 4:23 pm

thanks for the quick replies ceriux and spike. i guess custom hud feature has to be dropped from my "mod" then...
Moi
 
Posts: 12
Joined: Tue Jul 20, 2010 10:47 pm

Postby Spike » Mon Jul 26, 2010 4:40 pm

airquake used a viewmodel 'hud' (actually an mdl).
With regular quake that means you're limited to 1 variable to affect your entire hud - frame, but viewmodelforclient is more generous.
You have to make sure that the player cannot ever roll, nor pitch, as both of these cause the viewmodel to move/reangle.
It just doesn't really look nice/robust.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Swift » Tue Jul 27, 2010 12:16 am

Swift
 
Posts: 60
Joined: Tue Jan 26, 2010 11:02 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest