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

Last Man Standing

| Inside3d Forums Forum Index -> General Discussion

View previous topic :: View next topic
Author | Message
--- | ---
Senban Joined: 14 Apr 2007 Posts: 19 |

Posted: Wed Sep 03, 2008 2:20 pm Post subject: Last Man Standing |

I really want to add a Last Man Standing game mode to my mod. So far I've got as far as coding it so that the fraglimit sets the number of lives each player has and players stop respawning when they run out of lives. What I don't know how to do is tell when all but one of the players/teams are dead.
Once I know all the players are dead what I want to do is start a new round, respawning all items and players in to the map.
Any ideas/suggestions?

Back to top |

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

Posted: Wed Sep 03, 2008 4:07 pm Post subject: |

First check to see how many players there are, next check and see which players are dead. (Compare dead_players against total_players, if equal or 1 off, reset game) _________________ "Roboto suggests Plasma Bazooka."

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Fri Sep 05, 2008 2:18 am Post subject: Re: Last Man Standing |

Senban wrote:
I really want to add a Last Man Standing game mode to my mod. So far I've got as far as coding it so that the fraglimit sets the number of lives each player has and players stop respawning when they run out of lives. What I don't know how to do is tell when all but one of the players/teams are dead.
Once I know all the players are dead what I want to do is start a new round, respawning all items and players in to the map.
Any ideas/suggestions?

You might find this helpful:
Clan Arena (by Mungo) 1.3 source code
Clan Arena is round-based and once all the players are dead, a new round starts. A little different than your idea of players having X lives, but I think the code should be helpful none the less.

Back to top |

Senban Joined: 14 Apr 2007 Posts: 19 |

Posted: Fri Sep 05, 2008 3:19 pm Post subject: |

Dr. Shadowborg wrote:
First check to see how many players there are, next check and see which players are dead. (Compare dead_players against total_players, if equal or 1 off, reset game)

Interesting, I've never come across those values before, is there a complete list of them anywhere? And most importantly can this method be made to work with teamplay?

Baker wrote:
You might find this helpful: Clan Arena (by Mungo) 1.3 source code Clan Arena is round-based and once all the players are dead, a new round starts. A little different than your idea of players having X lives, but I think the code should be helpful none the less.

Cool I'll have a good look at that. Getting the basic round structure in place seems like being the big hurdle, along with indexing everything that need's to be replaced (cos eventually I'm going to get to coop and need to spawn a full levels worth of fresh monsters each time the players run out of blood.)
This is all a lot harder work than making different kinds of fireballs come out of the monsters.

Back to top |

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

Posted: Fri Sep 05, 2008 4:27 pm Post subject: |

Senban wrote:

Dr. Shadowborg wrote:
First check to see how many players there are, next check and see which players are dead. (Compare dead_players against total_players, if equal or 1 off, reset game)

Interesting, I've never come across those values before, is there a complete list of them anywhere? And most importantly can this method be made to work with teamplay?

That's because they don't exist in quakec by default. What I mean for you to do is declare in DEFS.QC
float total_players;
float dead_players;
Then in CLIENT.QC under clientconnect() add
total_players = total_players + 1;
In clientdisconnect() add
total_players = total_players - 1;
And finally, whereever you check if a player has expended all lives and dump him into observer mode add something like:
dead_players = dead_players + 1;
If you want this to work in teamplay, you'll have to do something a bit different. (Same principle applies, just slightly more complex)
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

Senban Joined: 14 Apr 2007 Posts: 19 |

Posted: Fri Sep 05, 2008 5:38 pm Post subject: |

Ahhhh, cool gotcha, makes a lot more sense than having a little daemon constantly searching the map to see if anyone's still alive.

Back to top |

Lardarse Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK |

Posted: Mon Sep 08, 2008 9:00 am Post subject: |

Senban wrote:
Ahhhh, cool gotcha, makes a lot more sense than having a little daemon constantly searching the map to see if anyone's still alive.

Tracking how the total changes is often the fastest way to count things...

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Mon Sep 08, 2008 7:27 pm Post subject: |

hmm but dont rule out the demon, that would be cool if a demon was the ref or somthing, or um hmm:D _________________ bah

Back to top |

Stealth Kill Joined: 29 Dec 2006 Posts: 83 |

Posted: Tue Sep 09, 2008 12:57 pm Post subject: |

Clanarena is very interesting. How can play it? If i start a map it spawns me with no weapons. Are there any commands to start game?

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Tue Sep 09, 2008 5:31 pm Post subject: |

Lardarse wrote:

Senban wrote:
Ahhhh, cool gotcha, makes a lot more sense than having a little daemon constantly searching the map to see if anyone's still alive.

Tracking how the total changes is often the fastest way to count things...

I should note that a daemon that checks with a find command, say, every 5 seconds is an *extremely* good idea. If you're going to do it by changes alone, then you must make sure you have every single control point and possibility covered. Clients connecting, disconnecting, dying, kill command... *everything*. It may be much better to have a hybrid system that includes the daemon thinking every 5 seconds to audit the results and correct mistakes. If a mistake is made and not corrected, a match may never end even though no players are left alive, and that's very frustrating for players.
Also, make sure that when a player joins, he joins dead and has to wait for the round to restart. If the new player pops right into the match to fight, then whenever a player dies he can just disconnect and reconnect to keep playing and that encourages abuse.
BTW, when you said "daemon" I thought "demon" as in the fiend monster. I imagined an invincible super-powerful fiend that patrols the level by foot and quickly kills any player it finds. Could be something you release into the level right at the get-go, or only if a round goes past a certain time limit to finish off the stragglers. Unleash the army of fiends!
You'd just need some sort of level prowling code, or maybe just let the demon teleport near the location of random players when it can't see a target. The make it able to move extremely fast, jump very fast or climb walls, and kill with only a couple of slashes. Maybe even a spitting ranged attack.
That should take care of some of the players that like to drag these kinds of matches on forever.
*poof* Rawr! "Oh gawd mah camp'n strategy are not werkin!!!"
-Wazat
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

Lardarse Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK |

Posted: Wed Sep 10, 2008 2:18 am Post subject: |

Wazat wrote:

Lardarse wrote:

Senban wrote:
Ahhhh, cool gotcha, makes a lot more sense than having a little daemon constantly searching the map to see if anyone's still alive.

Tracking how the total changes is often the fastest way to count things...

I should note that a daemon that checks with a find command, say, every 5 seconds is an *extremely* good idea. If you're going to do it by changes alone, then you must make sure you have every single control point and possibility covered. Clients connecting, disconnecting, dying, kill command... *everything*. It may be much better to have a hybrid system that includes the daemon thinking every 5 seconds to audit the results and correct mistakes. If a mistake is made and not corrected, a match may never end even though no players are left alive, and that's very frustrating for players.

Very true. The more ways it ccan change, the more likely you are to screw up and miss one...
If you don't want to create an entity for this, then use the think for an existing entity that doens't normally think. info_player_* are good choices.

Back to top |

Senban Joined: 14 Apr 2007 Posts: 19 |

Posted: Wed Sep 10, 2008 8:25 am Post subject: |

Wazat wrote:
If you're going to do it by changes alone, then you must make sure you have every single control point and possibility covered. Clients connecting, disconnecting, dying, kill command... *everything*.

What happens if a player powers down their computer mid game, or their ISP shut's down or whatever?

Wazat wrote:
Also, make sure that when a player joins, he joins dead and has to wait for the round to restart. If the new player pops right into the match to fight, then whenever a player dies he can just disconnect and reconnect to keep playing and that encourages abuse.

Good point.

Wazat wrote:
BTW, when you said "daemon" I thought "demon" as in the fiend monster. I imagined an invincible super-powerful fiend that patrols the level by foot and quickly kills any player it finds. Could be something you release into the level right at the get-go, or only if a round goes past a certain time limit to finish off the stragglers. Unleash the army of fiends!
You'd just need some sort of level prowling code, or maybe just let the demon teleport near the location of random players when it can't see a target. The make it able to move extremely fast, jump very fast or climb walls, and kill with only a couple of slashes. Maybe even a spitting ranged attack.
That should take care of some of the players that like to drag these kinds of matches on forever.
*poof* Rawr! "Oh gawd mah camp'n strategy are not werkin!!!"
-Wazat

Maybe later...

Lardarse wrote:
Very true. The more ways it can change, the more likely you are to screw up and miss one... If you don't want to create an entity for this, then use the think for an existing entity that doens't normally think. info_player_* are good choices.

That's got certain effiency to it.

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Wed Sep 10, 2008 9:32 pm Post subject: |

Senban wrote:
What happens if a player powers down their computer mid game, or their ISP shut's down or whatever?

Typically the player will time out and disconnect. This might happen immediately, or it may take a few minutes to happen. I'm not sure how quickly quake determines that it's lost the connection and goes through the motions of a client disconnect, but I seem to remember it being rather quick.

Quote:

Lardarse wrote:
Very true. The more ways it can change, the more likely you are to screw up and miss one... If you don't want to create an entity for this, then use the think for an existing entity that doens't normally think. info_player_* are good choices.

That's got certain effiency to it.

Just be aware that you only need *one* entity to do the auditing. It's rather inefficient to have info_player_deathmatch do it since the typical map will have many, many dm spawns. info_player_start is a better choice, but by far the best way to do it is to simply have world.qc spawn a new entity on level start and set its think. Then there's no question as to whether it'll get spawned (some dm maps may lack an info_player_start or may have more than one) or how many times per frame it happens because you have full control. I generally prefer to be explicit in these cases, and spawning a new entity really isn't much work.
-Wazat
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Wed Sep 10, 2008 9:38 pm Post subject: |

Stealth Kill wrote:
Clanarena is very interesting. How can play it? If i start a map it spawns me with no weapons. Are there any commands to start game?

It's multiplayer only. Bot support would be difficult as there are no items so no waypoints or intuitive bot ai would be easy to achieve.
You start with all weapons and ammo usually it is the blue team vs. the red team until one or the other is dead. You play traditionally best of 9 rounds.
You pretty much have to play it on a server like speaknow.quakeone.com or elsewhere. I'm sure there is Clan Arena in Quake 3 as well, it is one of the few mods that has maintained long term popularity.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> General Discussion | All times are GMT
Page 1 of 1

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