Author Topic: New Feature, switch teams in game  (Read 2044 times)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
New Feature, switch teams in game
« on: 21 September 2011, 06:59:28 »
As requested by Elimnator, there is a new advanced game setting that allows players to switch teams in game! Currently this is how it works:

1. a new popup menu comes up in game when you press ESC
2. if in the lobby the server user selected (under advanced options) to enabled Switch Teams (there is also a percent accept rate associated to AI users) then the popup menu will display an option to 'join another team'
3. If a player selects this option they are shown a list of possible players to join (one of them is 'create a new team which means joining a team # not used)
4. If a player 'creates a new team' then they join the first unused team# automatically
5. If a player selects a team to join which has players, each player on selected team receives a yen / no vote for this player to join their team.
6. If > 50% respond yes, then the player switches teams and all players are notified of the change
7. if all players on the team have answered and >= 50% vote no then all players are notified that the player was denied switching teams.

*notes:

- AI player randomly chooses based on percent accept specified in the lobby
- You may ONLY ask a given AI player 2 times per game maximum to join their team, otherwise they always answer No

Thanks

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: New Feature, switch teams in game
« Reply #1 on: 21 September 2011, 15:12:12 »
Wow, that's an impressive feature (I need yet to try it)! It also sounds like it involves a large code change.

[small]Edit: Fixed a typo[/small]
« Last Edit: 22 September 2011, 11:56:21 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: New Feature, switch teams in game
« Reply #2 on: 21 September 2011, 18:46:31 »
I don't think the AI should be chosing at all. I fail to see how it would help anything.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: New Feature, switch teams in game
« Reply #3 on: 22 September 2011, 05:22:39 »
It sounds a very cool feature!

I don't think the AI should be chosing at all. I fail to see how it would help anything.

Perhaps the default for AI should be 100% accept, but that can of course be changed under the advanced custom game settings?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: New Feature, switch teams in game
« Reply #4 on: 22 September 2011, 05:40:03 »
You can change the % from 30% (the default) to a value from 0 - 100. This is the percent chance that an AI player would accept your request to join their team.

This adds an interesting new element to the game when enabled.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: New Feature, switch teams in game
« Reply #5 on: 22 September 2011, 05:55:21 »
You can change the % from 30% (the default) to a value from 0 - 100. This is the percent chance that an AI player would accept your request to join their team.
I am aware of that, and agree with Will, at the very least, that it should default to 100%. Relatively few players would generally want the AI to strike down a vote to change team based on pure dumb luck.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: New Feature, switch teams in game
« Reply #6 on: 22 September 2011, 17:16:54 »
I think its not wise to have the AI automatically let you join their team (especially when its a mega-cpu) as this is a hugely unfair advantage and would make a network game more of a gong show than strategy. At least by having a small element of chance (by default) this makes the game more unpredictable and interesting. Of course you can set the values to whatever you want based on experimentation. We need to hear some feedback on this feature to possibly tweak it a bit to make it as fun as possible.

james876

  • Guest
Re: New Feature, switch teams in game
« Reply #7 on: 23 September 2011, 01:25:07 »
nice work, team!
 This is a very good feature, we love it, thank you, softcoder, a great programmer.

Psychedelic_hands

  • Guest
Re: New Feature, switch teams in game
« Reply #8 on: 23 September 2011, 04:31:10 »
Sounds awesome. I look forward to testing it out once I have time  ;).

I think that AI rejecting is a good idea, but it shouldn't be based on luck.... What if you have to pay a tribute to the other team or something? Like if you don't offer enough resources they reject you. But that might be too much work.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: New Feature, switch teams in game
« Reply #9 on: 23 September 2011, 04:48:44 »
Keep posting ideas about how this team switching could work.

Your ideas may lead to a mixture of combinations that make the game play very interesting!

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: New Feature, switch teams in game
« Reply #10 on: 23 September 2011, 15:48:46 »
Maybe  it would create a new multiplayer experience if mg gets an additional game mode in wich teams are switched (random) automaticly (e.g. ever 15 minutes) so you must change tactics very quickly (and build [faster] tactis for killing an enemy within 15 minutes)

Mr War

  • Guest
Re: New Feature, switch teams in game
« Reply #11 on: 23 September 2011, 16:12:37 »
Maybe  it would create a new multiplayer experience if mg gets an additional game mode in wich teams are switched (random) automaticly (e.g. ever 15 minutes) so you must change tactics very quickly (and build [faster] tactis for killing an enemy within 15 minutes)
Interesting idea but wouldn't the obvious 'cheat' be to play terribly for 15 minutes knowing that you'll switch to a much stronger side who can then walk all over the side you just made really weak.

The fact that's the first thing I thought of tells a lot about me I guess

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: New Feature, switch teams in game
« Reply #12 on: 23 September 2011, 16:19:09 »
Interesting idea but wouldn't the obvious 'cheat' be to play terribly for 15 minutes knowing that you'll switch to a much stronger side who can then walk all over the side you just made really weak.
We could disable team-damage so you can only weaken youself and I tought about random teams so you don't know with who you are playing in the next 15 minutes.

Mr War

  • Guest
Re: New Feature, switch teams in game
« Reply #13 on: 23 September 2011, 17:16:53 »
Just playing devils advocate. There are a lot of ways to weaken yourself, such as sending units on suicidal missions to walk into enemy camps, or squander resources on unnecessary buildings, or somehow create a bet decifit of food resources so that units weaken or die. Or build huge numbers of an unsuitable unit.

Then when u change sides u know where that weak side is, how their base is set up etc

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: New Feature, switch teams in game
« Reply #14 on: 23 September 2011, 20:29:22 »
Let's build an example: a multiplayermap 2v2v2:
(click to show/hide)
« Last Edit: 23 September 2011, 20:57:10 by MuwuM »

Psychedelic_hands

  • Guest
Re: New Feature, switch teams in game
« Reply #15 on: 24 September 2011, 04:11:55 »
Just playing devils advocate. There are a lot of ways to weaken yourself, such as sending units on suicidal missions to walk into enemy camps, or squander resources on unnecessary buildings, or somehow create a bet decifit of food resources so that units weaken or die. Or build huge numbers of an unsuitable unit.

Then when u change sides u know where that weak side is, how their base is set up etc

He doesn't mean swapping bases and units.... Just switching teams, so your allies become your enemies.


Mr War

  • Guest
Re: New Feature, switch teams in game
« Reply #16 on: 24 September 2011, 09:52:15 »
Ah, my misunderstanding. Sorry