Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1054 closed defect (fixed)

[PATCH] multiplayer with no humans broken

Reported by: daemacles Owned by: Matt Doerksen
Priority: Nice to Have Milestone: Alpha 13
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

It is possible to host a multiplayer game with only bots. When launched, gui/session/session.js fails because playerState is undefined.

Attachments (1)

Patch1054.patch (2.3 KB ) - added by Matt Doerksen 12 years ago.

Download all attachments as: .zip

Change History (14)

by Matt Doerksen, 12 years ago

Attachment: Patch1054.patch added

comment:1 by Matt Doerksen, 12 years ago

Keywords: patch review added
Owner: set to Matt Doerksen
Summary: multiplayer with no humans broken[PATCH] multiplayer with no humans broken

For network games, check to ensure that at least 2 humans are in the game, otherwise they should be playing a single player game anyways. The only thing left to do is disable the launch game button or display a dialog box to the user saying this is why they can't start a game with just one person.

comment:2 by Kieran P, 12 years ago

Milestone: BacklogAlpha 10
Priority: Must HaveNice to Have

comment:3 by historic_bruno, 12 years ago

Component: Core engineUI & Simulation

I disagree that we should require two human players, there's nothing wrong with only one (especially for testing purposes).

comment:4 by historic_bruno, 12 years ago

Milestone: Alpha 10Alpha 11

in reply to:  3 comment:5 by Matt Doerksen, 12 years ago

Replying to historic_bruno:

I disagree that we should require two human players, there's nothing wrong with only one (especially for testing purposes).

In theory yes, but why would you need to test a single player multiplayer game? Once you get past the limitations (timing, etc.) for a multiplayer game, the same logic is being used as in a single player game. Also, single player multiplayer will be disabled in the final release anyways, so it shouldn't matter. Feel free to debate but I can't see a reason why single player multiplayer should be enabled.

comment:6 by Jonathan Waller, 12 years ago

Once we get observer support then people might want to watch someone else playing single player. It seems like a pretty small use case though.

in reply to:  6 comment:7 by Matt Doerksen, 12 years ago

Replying to quantumstate:

Once we get observer support then people might want to watch someone else playing single player. It seems like a pretty small use case though.

That's one case, and, I'm just throwing this out there, but wouldn't it be easier just to have them use a 3rd party program to stream video of the game or record the game for playback later given how much of a headache it's going to be to support this for the small number of people that will use it?

in reply to:  6 comment:8 by Erik Johansson, 12 years ago

Replying to quantumstate:

Once we get observer support then people might want to watch someone else playing single player. It seems like a pretty small use case though.

Wouldn't that technically be multiplayer? Just that the observer isn't actually playing. I'm not a programmer, and don't know this issue in-depth, but looking at the original description it says something about playerState. Couldn't "Observer" be a player state? (Or, in case I'm horribly wrong about what playerState might be, it still doesn't sound like "One player playing against bots, another player joining over the internet/network as an observer" shouldn't be defined as multiplayer anyway. At least from a game setup point of view.)

comment:9 by Alex, 12 years ago

I don't actually see why including observer in single player is not an option. This is actually the reason I am writing this post, about half an hour ago I just wanted so see 2 bots fight each other but came across the problem in the ticket. I think this option will attract people who are more interested in programming AI rather then playing (talking of myself right now), meanwhile not affecting at all the ones who enjoy playing against the bots.

in reply to:  9 comment:10 by Jonathan Waller, 12 years ago

Replying to am_butch:

I don't actually see why including observer in single player is not an option. This is actually the reason I am writing this post, about half an hour ago I just wanted so see 2 bots fight each other but came across the problem in the ticket.

This is possible currently by launching the game like this:

./pyrogenesis -quickstart -autostart="Oasis" -autostart-ai=1:qbot -autostart-ai=2:qbot

Look at the readme file in binaries/system for more options like using a random map.

comment:11 by Kieran P, 12 years ago

Keywords: patch, review → patch review
Milestone: Alpha 11Backlog

comment:12 by ben, 11 years ago

Resolution: fixed
Status: newclosed

In 13070:

Fixes a bug in player assignment and prevents starting games with no assigned human players, fixes #1054

comment:13 by historic_bruno, 11 years ago

Keywords: review removed
Milestone: BacklogAlpha 13
Note: See TracTickets for help on using tickets.