Key hunt changes

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Key hunt changes

Postby Spaceman » Tue Jun 17, 2008 1:11 pm

For the last few weeks I've been modifying the keyhunt.qc code with the intention of improving the display of the keys that you have picked up.

After a few false starts,I believe I have now accomplished my goal.

Image

The image above shows that the red key has been dropped, I own the blue and yellow keys, and the pink key is currently owned by another player.

I have also added an alarm/siren when one team owns all the keys.

The diff's, new key images and sounds are in a zip file here - http://www.badongo.com/file/9930637

It currently has a problem, when you change game modes eg from KH to CTF, the KH HUD stays.

The code uses two new cvars - kh_keys and kh_keys_status. They are both transmitted with the stuffcmd.

kh_keys contains information about the players own keys and is transmitted whenever a key changes state - a key is dropped, picked up or allocated.

kh_keys_status conatins information about the status of all the keys and is transmitted every second as well as when a key changes state. This allows the key status to appear within one second of joining a KH server.

I hope one of the game developers can take my initial code and turn it into a useful modification.
Last edited by Spaceman on Thu Jun 19, 2008 3:13 pm, edited 1 time in total.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby [-z-] » Tue Jun 17, 2008 2:57 pm

wow, looks really good. Is that a new gforce?
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Xeno » Wed Jun 18, 2008 10:02 am

This looks like a very nice addition to the hud for KH games. Nice job :)

Questions and suggestions (I can't test it right now, sorry):
Can you see which team has the other keys? (colored border around the key/colored Nexuiz symbol on the key maybe)
When one team has all the keys, could the HUD flash the displayed keys/spin them/whatever to indicate urgency?


General suggestions for KH not directed at victim [v]:
It might be good to have some announcer sounds for KH (new round in 5... 4..., red/blue/yellow/pink team has all the keys!, etc)
Xeno
peregrinus originis incognitae
 
Posts: 396
Joined: Wed Nov 15, 2006 10:42 pm

Postby Spaceman » Thu Jun 19, 2008 3:54 pm

[-z-] wrote:wow, looks really good. Is that a new gforce?

It most certainly is a new gforce. It's Cortez's most recent version gforce4. :D
I have modified it a little bit. I removed the turrets and changed the mapinfo to give four key hunt teams.

Xeno The Blind wrote:Questions and suggestions (I can't test it right now, sorry):
Can you see which team has the other keys? (colored border around the key/colored Nexuiz symbol on the key maybe)
When one team has all the keys, could the HUD flash the displayed keys/spin them/whatever to indicate urgency?
Your ideas are very good and are all possible. I don't plan to to any more with this until one of the developers has approved it.

At one point it did show if the keys were owned by your team or not, instead of the current 'the keys are owned by somebody or have been dropped', but I couldn't get the stuffcmd to work properly and deleted it :cry:

I would like to have flashing or spinning keys, I think they would add to the game.
Xeno The Blind wrote:it might be good to have some announcer sounds for KH (new round in 5... 4..., red/blue/yellow/pink team has all the keys!, etc)
I recently asked Torus (he did announcer voces in 2.4.2) if he could do 'yellow/pink have the key', he repied maybe.

There is now a simple siren that plays when all the keys are owned by one team or one player collects all the teams keys. It's 2 seconds long and repeats every 2.5 seconds.

I'm also thinking about a different layout for the scores.
Image
Your team score would move up and down the list, in team colours, with yours being a bigger point size. I would also position it in the lower right hand corner. Currently, any team scoring over 1,000 have the leading digits hidden.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby [-z-] » Wed Jun 25, 2008 2:06 pm

I was just playing some keyhunt and wishing I had these changes. I hope they get committed.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby divVerent » Thu Jun 26, 2008 8:07 am

They can't in the current form, as they severely lag player/server communication and partially behave wrong (e.g. they still show in non-teamplay). We need someone to implement that using CSQC. Blub, maybe?
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Spaceman » Sat Jun 28, 2008 1:06 pm

divVerent wrote:They can't in the current form, as they severely lag player/server communication
Why?

divVerent wrote:and partially behave wrong (e.g. they still show in non-teamplay).
This can be fixed fairly easily with the removal of the cvar 'kh_keys_status' and reverting to 'The Impossible Combination[tm]'.

Is there a cvar sent by the server with the current game type?
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am

Postby divVerent » Sat Jun 28, 2008 6:30 pm

Now there is, on older servers there isn't, so one can't rely on it yet.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Spaceman » Wed Jul 02, 2008 8:18 pm

divVerent wrote:They can't in the current form, as they severely lag player/server communication
Why? You didn't explain why my new code could cause a lag.
Spaceman
Alien trapper
 
Posts: 264
Joined: Tue Aug 28, 2007 10:53 am


Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron