More than nine players?

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
furyofaseraph
Posts: 2
Joined: April 18th, 2010, 5:32 pm

More than nine players?

Post by furyofaseraph »

Hey guys,

Yes, I know I am new here, and it might be rather uncouth of me to post a topic so soon, but I've been looking at battle of wesnoth all day. I think it would be a fantastic tool for a project I am working on.

Basically I hope to use it as a way to simulate/keep-track-of my own fantasy world for an up and coming D&D campaign setting I'm working on. In essence I needed a tool to help me track the timeline that I'm developing.

My only problem with BfW is that I can only have 9 players. Granted for traditional usage of this game system, nine players would probably be enough. But my plan is to use a hot-seat multiplayer game that I can constantly go back to and use for the project, and thus I would not be so limited by the typical sit-and-wait phenomenon.

To be short, I am wondering how hard it would be to expand the number of players possible in a single game - Ideally I'd love to see a number like 24 crop up, but thats me being pretty demanding.

So, is it possible, and if not, will such a thing be included in the forseeable future?
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

You can have as many sides as you want. The limit is actually imposed on sides capable of recruiting. Since you're making a simulator, it doesn't sound like you need to recruit.
furyofaseraph
Posts: 2
Joined: April 18th, 2010, 5:32 pm

Re: More than nine players?

Post by furyofaseraph »

'fraid I will. each of the 24 sides needs to be able to recruit units as part of the simulation is economics.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

You could fake recruiting through a combination of [store_gold], [gold], [set_menu_item], [message], and [option].
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: More than nine players?

Post by AI »

The 9 side limit is a simple hardcoded limit. If you don't have a problem with compiling your own binaries, it's a trivial change.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

If you filled out the proper paperwork, this would be great in the new experimental fork of Wesnoth.

edit: I just came from an interesting discussion on IRC that you might like to hear. They're considering lifting this limit in mainline. So 1.9.x maybe?
In #wesnoth-dev it was wrote: (9:18:25 AM) happygrue: Upthorn: with regard to team limits I was wondering about the upper bound on the number of players that could currently be in a game (9), as it might be somewhat limiting for such an ambitious project?
(9:19:18 AM) Upthorn: ah. I don't foresee modifying the team limit
(9:19:29 AM) Ivanovic: happygrue: that one is only an artificial limitation of the interface anyway
(9:19:58 AM) Ivanovic: in the old days with starting positions hardcoded as numbers from 1 to 9 in the map format it was different
(9:20:09 AM) Ivanovic: but these days you can have "more" sides
(9:20:24 AM) happygrue: Ivanovic: perhaps worth lifting then, if this goes through. For an RPG style campaign it would be reasonable to have 6-10 players and then you want a bunch of AI sides too in some cases
(9:20:25 AM) Ivanovic: (though we will have to find some new colors to identify players...)
(9:20:26 AM) happygrue: I see
(9:20:46 AM) Ivanovic: you can basically have endless sides right now alreayd
(9:20:49 AM) Gambit: Tested up to 200.
(9:21:01 AM) happygrue: well good
(9:21:08 AM) Ivanovic: as you see, nothing stopping you from a roleplaying campaign
(9:21:20 AM) Gambit: 199 leaderless AI sides with just one unit anyway...
(9:21:25 AM) Ivanovic: the limitation is just the interface in the mp lobby only allowing 9 "selectable at start" sides
(9:23:30 AM) Gambit: So right now, if you could get 20 observers, you could give them sides once you got in the game?
(9:23:37 AM) Gambit: Ivanovic: ^?
(9:23:46 AM) Ivanovic: no idea, probably yes
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: More than nine players?

Post by AI »

Well, as Ivanovic said, the only real problem is the team colours. Gui2 shouldn't have any issues with 20 human-playable sides. It will probably give you a scrollbar for the ones that don't fit.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

Right now when you get past 9 it starts at black and slowly increases saturation(?) towards bright red. What if instead it went through the web safe colors?
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: More than nine players?

Post by AI »

If I'm reading the code correctly, it currently interprets the team number as an RGB value, in the "255,255,255" format, if there's no defined color palette.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

Weird. That's not the behavior I noted in that project with the 200 sides. It made every new team after 9 a different shade of red. It started at black and got lighter.
lmelior
Posts: 116
Joined: June 16th, 2009, 3:30 am

Re: More than nine players?

Post by lmelior »

AI wrote:If I'm reading the code correctly, it currently interprets the team number as an RGB value, in the "255,255,255" format, if there's no defined color palette.
I'm not going to pretend to understand exactly what's going on in there, but it looks like the default color range for other teams is defined just above that in team.cpp:

Code: Select all

const color_range team::get_side_color_range(int side){
  std::string index = get_side_colour_index(side);
  std::map<std::string, color_range>::iterator gp=game_config::team_rgb_range.find(index);

  if(gp != game_config::team_rgb_range.end()){
    return(gp->second);
  }

  return(color_range(0x00FF0000,0x00FFFFFF,0x00000000,0x00FF0000));
}
So I guess in team::get_side_colour_index (the function you referred to) it sets the team number as the index into that color_range? It makes sense in my head but I don't really understand how the color_range class works.

Either way, it seems likely you could tinker with that last line there to change the colors for teams 10+.
User avatar
pauxlo
Posts: 1049
Joined: September 19th, 2006, 8:54 pm

Re: More than nine players?

Post by pauxlo »

Gambit wrote:Weird. That's not the behavior I noted in that project with the 200 sides. It made every new team after 9 a different shade of red. It started at black and got lighter.
This sounds like quite the same as "it currently interprets the team number as an RGB value".
The team number is taken as the red value, and the other components (green and blue) are 0.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: More than nine players?

Post by Gambit »

Ah. Okay I got confused by the numbers he gave. I thought he meant everything over 9 was automatically (transparent?) white.
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: More than nine players?

Post by AI »

For reference, the functions you want is color_info() in game_config.cpp and string2rgb() in color_range.cpp
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Re: More than nine players?

Post by Eleazar »

Gambit wrote:What if instead it went through the web safe colors?
Team colors are defined by 4 different RBG numbers. We can't have just one color value per team.
  • # 1) the average shade of a unit's team-color portions
    # 2) the maximum highlight shade of a unit's team-color portions
    # 3) the minimum shadow shade of a unit's team-color portions
    # 4) the color of the markers on the mini-map.
AI wrote:Well, as Ivanovic said, the only real problem is the team colours. Gui2 shouldn't have any issues with 20 human-playable sides. It will probably give you a scrollbar for the ones that don't fit.
I'd be happy to define more colors. It shouldn't be too hard to define 10 to 14 more colors that are equally or more visibly distinct that what we currently have.

Wasn't there some java or web app that let you preview team colors?
EDIT: scratch that, i found the thread.

Somewhere around 30 total colors i expect that new colors would tend to look very similar to existing colors. At whatever point we run out of listed colors, it's probably best to start reusing colors definitions on the list.


EDIT: team-colors.cfg has 11 colors defined. There's an additional 2 in the red family at the top, but the game doesn't seem to list them as options.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
Post Reply