Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#14 closed enhancement (fixed)

Add a game start dialog

Reported by: Henrik Heimbuerger Owned by: Fabian Rohn
Priority: major Milestone: MS1: First release (1.0.0)
Component: ui Version: pre-1.0
Keywords: game start, initialization Cc:

Description (last modified by Henrik Heimbuerger)

After configuring the game in the player view, the user should be able to start a game using a toolbar button.

This should invoke a game start dialog that shows the game startup process in multiple phases. Depending on the game configuration, this might also require interaction with the user.

Which phases are required needs to be determined, but definitely comprises of:
1. Initialisation of input devices, for example Wiimotes have to be connected to the system if they haven't before.
2. Initialisation of the specific track controller, for example when using 42 for the first time (or maybe always?), the cars have to be given unique IDs.

  1. Some kind of preparation phase, so all players are ready to start the race. This could f.e. be visualised with traffic lights.

Change History (28)

comment:1 Changed 16 years ago by Henrik Heimbuerger

Milestone: MS1: First usable version
Type: defectenhancement

comment:2 Changed 16 years ago by Fabian Rohn

Owner: changed from somebody to Fabian Rohn
Status: newassigned

comment:3 Changed 16 years ago by SVN

New commit by frohn (revision [79]):
[Partial fix for ticket #14] First Skeleton of the RaceStart? dialog with a progress bar added.

comment:4 Changed 16 years ago by Henrik Heimbuerger

Component: unspecifiedui
Priority: majorblocker

comment:5 Changed 16 years ago by Henrik Heimbuerger

Description: modified (diff)

Steps one and two are no longer necessary under the new design and have been crossed out.

The new expected behaviour of the game start dialog is:

  1. Check if all players have a non-empty name and a selected car. Abort and report if not.
  2. Check if all players have an input device that is connected (InputDeviceManager has to be asked for the ID). Abort and report if not.
  3. Check if all players have a technology that is connected and configured (TechnologyConfigurationManager has to be asked for the ID). Abort and report if not.
  4. Check if all technologies are compatible with the used track type (e.g. no BlueRider on digital tracks). Abort and report if not.
  5. Switch the active perspective to the race perspective.
  6. Show the staging lights, and wait until they are done.
  7. Start the RaceEngine.

comment:6 Changed 16 years ago by Henrik Heimbuerger

The two modes have been added to the TrackWidget, but please remember to remove the internal animation thread (DEBUGanimationTimer) that is started in TrackWidget.setTrack() when the animation is triggered by the RaceEngine.

comment:7 Changed 16 years ago by Fabian Rohn

Status: assignedaccepted

comment:8 Changed 16 years ago by Henrik Heimbuerger

Should be obvious, but of course the action also has to check whether players have been defined at all.

comment:9 Changed 16 years ago by Fabian Rohn

Priority: blockermajor

comment:10 Changed 16 years ago by SVN

New commit by frohn (revision [218]):
[Partial fix for ticket #14] Action starts the Race Engine

NOTE: I have to filled the raceTimerIntervalValueBean statically, because the ${...} Placeholder didn't work for some reasons. We have to research this.

comment:11 Changed 16 years ago by SVN

New commit by frohn (revision [227]):
[Partial fix for ticket #14] Start Race Actions opens a RaceValidationDialog?

An annotation describes each validation method and represents a label for every single one in the Validation Dialog.

comment:12 Changed 16 years ago by SVN

New commit by frohn (revision [228]):
[Partial fix for ticket #14] Added some Messages to Validation Dialog

comment:13 Changed 16 years ago by SVN

New commit by frohn (revision [229]):
[Fix for ticket #14 and #64] Start- and StopRaceAction? inherit from union parent (abstract class RaceControl?)

This solution has the effect that both action get the same RaceEngine? and the code is well arranged and minimized.

comment:14 Changed 16 years ago by Henrik Heimbuerger

Although the UI should prevent this from occuring in the first place, the dialog should probably also check that no device or connector is assigned to more than one player (i.e. two players share an input device or connector).

comment:15 Changed 16 years ago by SVN

New commit by frohn (revision [260]):
[Partial fix for ticket #14 and #77] Added Race Validation at Race Start and fixed some bugs in the Player Settings Dialog

comment:16 Changed 16 years ago by Henrik Heimbuerger

Bug: It's currently possible to start a race without a track. This results in a NullReferenceException?.

comment:17 Changed 16 years ago by Henrik Heimbuerger

Bug: It's currently possible to start a race where two players have the same CarController.

comment:18 Changed 16 years ago by SVN

New commit by frohn (revision [287]):
[Partial fix for ticket #14] Fixed some Merge problems after update.

Validation Annotation has been renamed and its also validated if no editor is open.

comment:19 Changed 16 years ago by SVN

New commit by frohn (revision [288]):
[Partial fix for ticket #14] In conjunction to the last commit

comment:20 Changed 16 years ago by SVN

New commit by frohn (revision [399]):
[Fix for ticket #14] Added a Traffic Lights Dialog after Race validation

NOTE: There are already some repaint problems in the Track Widget, which have to be fixed.

comment:21 Changed 16 years ago by SVN

New commit by frohn (revision [403]):
[Fix for ticket #14] Added a JavaDocs? to the TrafficLightsDialog?

comment:22 Changed 16 years ago by SVN

New commit by frohn (revision [406]):
[Fix for ticket #14] Fix that Traffic Lights has been shown two times

comment:23 Changed 16 years ago by SVN

New commit by hheimbuerger (revision [419]):
[Partial fix for ticket #14] Temporarily removed traffic lights because they break the driving agents.

comment:24 Changed 16 years ago by SVN

New commit by hheimbuerger (revision [422]):
[Partial fix for ticket #14] Added some workarounds to avoid the traffic lights crashing the driving agents.

The driving agents can't be poll()ed until they are activated(). However, with the traffic lights, the TrackWidget is drawn (and therefore poll()s the controller) before the race has been started (and therefore the controllers activate()d).

Some IFs have been added to avoid in crash in that situation.

comment:25 Changed 16 years ago by Henrik Heimbuerger

The traffic lights could now be reintegrated. I'm pretty sure all remaining problems are not caused by the TrackWidget.

But to be honest, I'd just leave it out. There are too many open issues that can't be fixed in the remaining time.

Or convert the traffic lights to a regular dialog. That might remove some problems -- or maybe not. I had no success whatsoever with my attempts going in that direction.

comment:26 Changed 16 years ago by SVN

New commit by froth (revision [426]):
[Partial fix for ticket #14] Disabled traffic lights on game start.

comment:27 Changed 16 years ago by Fabian Rohn

Resolution: fixed
Status: acceptedclosed

The start race dialog in the form of the TrafficLightsDialog? has been implemented, but is not used in the current version.

comment:28 Changed 16 years ago by SVN

New commit by frohn (revision [478]):
[Related to ticket #14] Resolved a warning in the TrafficLightsDialog?

Note: See TracTickets for help on using tickets.