The Flash Client

From Mafia

Client

The flash client is available here

With "click to kill" technology, the flash client makes playing mafia child's play.

Requirements and Possible Problems

The Flash Client runs from a web browser and on top of Flash Player 10 or higher. Flash Player 9 will run the client, but because of certain problems that were only fixed in Flash Player 10, it is not supported and you may experience inconsistencies when using it.

The minimum supported window size is 900x620 pixels. This should be sufficient for a maximized (or possibly fullscreen) web browser window in a 1024x768 pixels desktop environment or any higher resolution. The window is resizeable and should adapt itself to the shape of your web browser window. Most smartphones and other embedded platforms do not have the required screen resolution to run the Flash Client.

The ActiveX (Internet Explorer) version of the Flash Player has been known to cause a dessynchronization in the Client's built-in timer over time. This problem wasn't observed in the remaining major web browsers in Windows.

The Flash Client needs to store information on your computer in order to be able to store your settings and certain variables it needs to run optimally. If you do not allow Flash applications to store information on your computer, you should enable this for the Client by right-clicking anywhere in the Client window, selecting Settings, navigating to the Local Storage tab and moving the slider to at least 10KB.

Finally, the Flash Client performs outgoing TCP connections in order to connect to the remote Mafia Server. If your firewall or router prevent the Client from performing these connections, the Client will be unable to access the Server: XML request from port 52460: Flash security policy retrieval (Failure results in a Security Error). Mafia server connection to port 52461 (Failure results in an I/O Error).

Interface overview

Interface overview

  • Background: The background changes with the state of the game - No game, Joining, Night, Day or Rock, Paper and Scissors mode.
  • Top bar: This part of the window contains the buttons to access the Wiki, Game menu, Settings window, set Away status, Join a game and some minor toggles, as well as many quick status displays.
  • Lists/sidebar: Contains the Town (alive/participating players), Graveyard (dead/watching players) and Commands lists. The Commands list displays a few commands that do not apply to a target player.
  • Chatbox: Takes the most room in the window and provides the user with the game narration and chat from other players, as well as the private output from his own commands. Below it is the Input box, flanked by the Channel selector and Timer display.

The Game menu

Game Menu while disconnected
Game Menu before login
Game Menu when Mafia is idle
Game Menu when a game is running

The Game menu allows the user to connect to Mafia, login, disconnect and quickly obtain help and information. The option to start a new game can also be found here. The contents of this menu change depending on the game state and are complemented by the !away and !join buttons, which can be found right next to it.

Connecting and logging in

In the above image, you can see two Connect options: Connect to Mafia and Connect as NICKNAME. The first of these, always available, will connect to the server without logging in. This allows the user to register a new account or change his password. The second option will attempt to automatically log the user into the displayed NICKNAME, which is stored in the Settings.

The automated login may fail if the user has a delayed ban in place (automated) or if there already is another connection with the same nickname (possibly a ghost connection left behind by the user after losing internet connectivity). If this is the situation, the Game menu will contain Ghost and Login options for the stored nickname. The Ghost option should be used to forcefully disconnect the user's account (if it's registered) and connect in its place, and the Login option can be used to enter the game after the user's delayed ban has expired, after registering an account or if the user simply selected the wrong Connect option.

Message of the Day

The MOTD window.

The Message of the Day (MOTD) is a small text with information on current events or important resources provided by the operators that's displayed to all users when they connect.

The Flash Client stores the MOTD in your hard drive for two reasons:

  • Allowing you to access it later via the Message of the day option in the Game menu, and
  • Only displaying it after login if there were any changes from the MOTD that's kept in memory.

As such, whenever the MOTD window shows up without being asked to, either there was a change in the MOTD, or you reset your saved settings, which also removes the MOTD from storage.

Starting and joining a game

The Start a game option in the Game menu can be used to start a new game, provided this command is enabled in the server (if not, only operators can start games). Games can be started at any time provided no game is already running and the cooldown period after the previous game has expired. The text command (!start) can also be used.

To join a game from the Flash Client, the !join button (which is on the top bar) can be clicked to bring up a menu with the different game modes. Clicking one of the modes will join the game with a vote for that mode. It is also possible to select the Condition... option, which brings up the same menu again but after the mode selection allows the user to input the minimum amount of players who must be in the game for him to join. The condition can only be set once; Afterwards, any attempt to set a condition will result in an immediate join. It is also possible to join with the text command (!join) from the client.

In the beginning of a game or after dying, the user can click the !away button to enable away mode. This will be displayed in the user's !info line and also block any attempts from other players to revive the player into the game (for example, with the Freemason revive ritual) or to !beep him.

Quickly obtaining information

The rules browser.

The remaining options in the Game menu provide help and information about the game:

  • The About... option opens this page of the wiki.
  • During the game, role help links will be available (one for each of the user's current roles) that open the corresponding page of the wiki.
  • The !help option calls this command (which returns a context-sensitive list of all the commands that can currently be used) and displays the results in a small window. The player can also type the command in the input box, in which case the results are displayed in the chatbox.
  • The !rules option opens the rules browser, which allows the player to navigate through the attributes (roles, thresholds, probabilities and other variables) of each mode and also view global server settings. Typing the command in the input box will display its results in the chatbox instead.

Settings customization

Settings.png

  • Automatically save !register and manual !nick parameters: Do not have this set if you use a public computer. It will automatically log you in.
  • Automatically highlight teammates in players list when they speak: Have your teammates highlighted in the userlist when they talk in your faction's channel.
  • Play alert when a game is started: Choose which sound the client will make to draw your attention to the flash client when the sign-ups start.
  • Play alerts from: Choose "Operators only" if you don't want other registered users to be able to beep your client.
  • Display list context menus with a single click: Use if you don't want to have to double-click user names to see possible actions.
  • Automatically reposition town/graveyard lists divider: Reposition the graphical divider when players die.
  • Timer box on the left corner of the window: Some people prefer the timer box on a different side then normal.
  • Chatbox capacity: How many lines of text the client will store until deleting old lines. Note: Huge is highly recommended on all but the most ancient computers.
  • Absolute positioning of chatbox messages (chatbox fix): <EDIT ME>
  • Prefix incoming messages with timestamps: Be shown the exact time before every line of text.
  • Display raw !showtimer/!players output in the chatbox: Have text be shown in the textbox instead of in a dialogue.
  • !status mode: How your current status will show up when you use !status (if at all.)
  • Black background color scheme: Used for cave-dwellers and people that live in a basement. Or if the textbox colors are just too bright for you.

The Chatbox and channels

Some roles start with or can be invited to private chat channels, which allow them to talk outside of public chat. To access these chats you must hit the correct key and a space prior to your message. Such as m mafia here.

  • Public - Public chat is automatically sent to everyone to see without having to hit the c key.
c Hello all
  • Police - p Detectives have access to either invest/arrest/bombsquad or to invite another member of the game to be a deputy, giving them access to police chat.
p Lazy is suspicious
  • Mason - t Masons of the temple could invite another member of the game to be a mason.
t Let's revive tonight
  • Mafia - m
m mafia here
  • Camorra - r
r cam here
  • Family - !fam Only a priest marriage gives you access to Family chat with your partner.
!fam Hey lets make a baby tonight
  • Death - Death chat is automatically sent to the realm of the dead without having to hit the - key.
- They will lose for executing me now

Status displays

The Town list

Another feature of the flash client is the town list. Everyone currently alive in the game is listed in the town list, with everyone who is murdered executed or devoured being sent to the graveyard list. You can also mark players with one of several colors to help you keep track of who is or seems to be innocent mafia monster or just plain suspicious. The flash client itself automatically marks others with a certain color if they use private chats along your faction or is a werewolf just growls.

The Graveyard list

Connection troubles

  • Security error: Flash is unable to ascertain that it has permission to connect to the Mafia server. This means Flash Player's security settings are badly configured (refer to Flash documentation) or it's unable to access Mafia's security policy, which is hosted in a different port (common if you are in an university or another restricted environment or if you have a very tight AND badly configured router or firewall).
  • IO error: The Mafia server is down or unreachable. If it's down, you must wait it out. Otherwise, it may be caused by a very tight AND badly configured router or firewall (which you can try to fix), or lots of stuff beyond your control, such as temporary ISP/routing problems, DNS problems (such as a bad IP address in the cache), etc.

You can always try a different access method if the problem persists.