Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

HUD drawing in QuakeC? Goto page 1, 2 Next

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Willem Joined: 23 Jan 2008 Posts: 73 |

Posted: Thu Feb 14, 2008 8:52 pm Post subject: HUD drawing in QuakeC? |

I'm getting the impression from my searching that the answer is NO, but is there a way to customize the HUD in vanilla Quake 1 via QuakeC? Even the ability to put up some text strings each frame would be enough. _________________ www.wantonhubris.com

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Thu Feb 14, 2008 11:46 pm Post subject: |

Vanilla Quake 1... not clean ways. You can centerprint a string with just the right number of leading newlines that it appears just above the hud - but that requires knowing their screen resolution. Or you can spam console prints at them, but that only shows on the top four lines on the console (and destroys any other notifications you might send).
There are other perfectly viable methods, just not in vanilla quake 1.
_________________
What's a signature?

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Fri Feb 15, 2008 8:58 am Post subject: |

As Spike said, centerprint is your method of choice. Look in the tutorial section of this site, and you should soon find a couple about QC menus, which do exactly this. Remember to not spam the centerprints too often if you want it to be playable in multiplayer
_________________
Look out for Twigboy

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sat Feb 16, 2008 3:22 pm Post subject: |

Centerprint can look good if you got a good conchars font for it Problem is getting working menus, overlapping cursors, etc etc _________________

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Sat Feb 16, 2008 4:59 pm Post subject: |

/me burps http://tlb.quakedev.com/PICS/SHOTS/hsmash/compup.gif http://tlb.quakedev.com/PICS/SHOTS/hsmash/micamain.gif http://tlb.quakedev.com/PICS/SHOTS/hsmash/detailobj.gif _________________
"Roboto suggests Plasma Bazooka."

Back to top |

Willem Joined: 23 Jan 2008 Posts: 73 |

Posted: Sat Feb 16, 2008 6:40 pm Post subject: |

I tried burping but it didn't produce those same results. What is that, a bunch of centerprint'ing or something else? _________________ www.wantonhubris.com

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Sat Feb 16, 2008 6:48 pm Post subject: |

COUGH _________________ frag.machine - Q2K4 Project http://fragmachine.quakedev.com/

Back to top |

Willem Joined: 23 Jan 2008 Posts: 73 |

Posted: Sat Feb 16, 2008 7:37 pm Post subject: |

Is that vanilla Quake 1? If so, how please. _________________ www.wantonhubris.com

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Sun Feb 17, 2008 12:37 am Post subject: |

Willem wrote:
I tried burping but it didn't produce those same results. What is that, a bunch of centerprint'ing or something else?

Yes it's centerprint, but not a whole buttload of them.
Look in the Frikbot X source:
http://www.inside3d.com/frikbot/fbx/
If you absolutely must have something more simplified, I suppose I could be persuaded to cough up my code.
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Sun Feb 17, 2008 7:54 am Post subject: |

Like I said earlier, there are tutorials on this site which do what you want. _________________ Look out for Twigboy

Back to top |

Willem Joined: 23 Jan 2008 Posts: 73 |

Posted: Sun Feb 17, 2008 10:24 am Post subject: |

Yeah, thanks all! Got the message. _________________ www.wantonhubris.com

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Sun Feb 17, 2008 4:37 pm Post subject: |

Urre wrote:
Like I said earlier, there are tutorials on this site which do what you want.

Bad, bad Urre. Not only is that tutorial incomplete (what pray tell refreshes the menu list when you move out of the trigger? It's not nice to make it so that the player does something unknown when he tries to change weapons) it doesn't cover the vastly more useful multi-string centerprint. (Such as the one in FBX's source, which incidentally comes with a menu system by merit of the waypoint editor)
/me resolves to make a new tutorial to address this issue very soon
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Sun Feb 17, 2008 5:52 pm Post subject: |

Willem wrote:
Is that vanilla Quake 1? If so, how please.

Actually is pretty simple. Open up defs.qc and add the following line just below the regular centerprint() builtin definition:

Code:
void(entity client, string s) centerprint = #73; // sprint, but in middle void(entity client, string s1, string s2, string s3, string s4, string s5, string s6, string s7) centerprint7 = #73;

And BANG, you can do things like you see in the previous screenshot:

Code:
void () actorShowMenu = { centerprint7 (self.owner.enemy, self.owner.killtarget, self.owner.netname, "\n[", self.owner.targetname, "]\n\n", self.owner.message, ""); };

_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Sun Feb 17, 2008 6:13 pm Post subject: |

Borg: I'm pretty sure Willem can edit it to do what he wants, if it's incomplete. I recall doing so when I used that tutorial, didn't even use the trigger part. _________________ Look out for Twigboy

Back to top |

Willem Joined: 23 Jan 2008 Posts: 73 |

Posted: Sun Feb 17, 2008 7:24 pm Post subject: |

Sure, I can jigger up centerprint to put stuff in the middle of the screen but I was looking for something more than that. It evidently doesn't exist. Ahh well. _________________ www.wantonhubris.com

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group