This is a documentation for Board Game Arena: play board games online !

BGA Studio Guidelines: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
 
(74 intermediate revisions by 14 users not shown)
Line 1: Line 1:
= BGA Studio Guidelines =  
= BGA Studio Guidelines (UX/UI) =


Originally From: https://www.slideshare.net/boardgamearena/bga-studio-guidelines
This page covers UX guidelines for games on Board Game Arena. Read the [[Media:Guidelines UX new compressed.pdf|official PDF]] or [https://bga.li/mRdx bga.li/mRdx] first. This page is an unofficial summary.


Goal: most games should be instantly playable on any device — desktop at midnight or phone at lunch.


Use this page to validate UX before switching your game from '''ALPHA → BETA → RELEASE'''.


== Why guidelines? ==
== A — Layouts ==
More and mode game publishers are choosing Board Game Arena for their game adaptations because the quality of these adaptations is high.
If we want to continue to have nice games in the future, we have to make sure that every game published in the BGA platform is matching the quality standards of BGA.
These guidelines are here to help you to make your game easy to use by BGA players, and to make sure its going to be validated by the game publisher.


== General guidelines ==  
=== A.1 Layout arrangement ===
The 3 main important guidelines
* If a player knows the real board game, he should be able to play your adaptation with no learning.
* Fidelity to the original game is an absolute requirement.
* Don't try to create a video game: make your game interface as close as possible to how the original board game looks like.


== Game layout  ==
Game should fit a square ratio and show everything the active player needs. Use vertical scroll for secondary info (other players' progress, secondary boards).
=== I-1 Don't hide game elements ===


Many board games have a lot of material to display, and computer screens are sometimes too small.
'''✔️ Do'''
But you are lucky: your game will be on a webpage with a scrolling functionality.  
* Center the play area on all devices.
Basically, you always have some more space available .
* Leave a "no action" margin around the board (deselect, scroll on mobile).
Don't hide game elements behind menus, submenus, dialogs, … but display them directly on the main page.
* Use HTML anchors to jump between distant sections.
Tips: eventually, you can use HTML anchor link to jump between the different elements of the page if the page height is very big.  
* Use spacers / transparent whiteblocks to group pieces clearly.
* Keep score, turn order, and objectives '''accessible''' (button/tab/panel), not always visible.
* Tuck rare abilities into tooltips.


Examples:
'''❌ Don't'''
* Do not hide game components behind popups — you should see everything you'd see on a real table.
* Do not place "always accessible" info permanently on the player panels.
* Do not add in-game logos or branding that isn't part of the actual game.
* Do not scatter related info (e.g. resources) across three corners.


In Amyitis, characters cards are elements you don't have to check all the time. Thus, we placed them at the bottom of the page  and you have to scroll to see them.
Note: '''Layout mantra:''' Central = shared actions. Top/Bottom = global info. Panels = private resources.  


=== I-2 Make it fluid ===
[[File:Ux-01-layouts.jpg]]


BGA game interface is «fluid». It means the interface width can vary in order to use extra space on the screen when available.
HTML and CSS give us a lot of possibilities to adapt a web content to a given browser width.
You have to use HTML and CSS:
* To allow players owning a big screen to enjoy the game comfortably without scrolling the page.
* To allow players with a screen of just 1024px


Tips: for each element of the game, answer this question « how many times during a game do I need to check/use this element? ».Less frequently used elements can be placed below
=== A.2 Action Bar ===


Examples:
The Action Bar always shows the current state: turn in progress, who we're waiting for, or what the player can do.


Caylus: when we have a 1024px small width to play the game – even if they have to screen, available buildings are placed scroll on the the right and below the board.
[[File:Ux-03-action-bar-mock.jpg]]
On larger screen, these tiles are placed
  on the right of the board.  This is a very basic usage of the others. « float:left » CSS property.


'''✔️ Do'''
* Center '''main awaited actions''' (Play card, End turn, Confirm move).
* Place secondary/greyed-out actions next to them.
* Put '''cancel / undo / remove''' on the right, visually separated from forward actions.
* Use the Action Bar for: actions targeting another player, Pass/End turn/time-related actions, auction phases, and small resource exchanges without dedicated board space.
* Keep it to '''max 4 buttons + context''' so it doesn't overflow on mobile.


=== I-3 Use whiteblocks ===
'''❌ Don't'''
White blocks are « div » HTML element with the « whiteblock » class (white and transparent background). This is the recommended way to gather game elements together in your game interface when they are not directly on a board.
* Do not replace board-component actions with Action Bar buttons — players should act on the board like in real life.
Whiteblocks helps you to organize the space in order it can be easily understood by players.
* Do not stick custom buttons next to BGA's built-in buttons (replay controls, etc.).
* Do not let cancel actions visually compete with main actions.
* Do not show "Round in progress" text inside the bar — display it on the table or as flavor text of the current action.


Tips: you can use a <h3> title inside the whiteblock to help players to understand what is inside or to who it belongs.
''Example: Wingspan shows the current round as flavor text under the action bar.''


In The Year of the Dragon game interface, with whiteblocks and h3  titles /picture here/
[[File:Ux-02-action-bar-examples.jpg]]


=== I-4 Use player panels ===
→ See [[#C.3 Button colors and styling|C.3]] for button colors.


BGA players are used to look at player panels when they need an information about a player.
=== A.3 Player panels ===
Using player panels can allow you to save a lot of space on the main game space. In general, the following information is placed in the player panel:
* Players resources (i.e.  small game elements the player is keeping in front of him in the real game).
* Summary information about player (i.e. number of cards in hand, number of cards played...).
* « First player » token.
* Score.


Player panels in Seasons. /picture/ A lot of useful information can fit into these small spaces :)
Player panels let anyone glance at: who's playing, color, score, turn order, and resources gained.


Note: for all games, you must always use the standard BGA score counter (with the star). Players are used to check this counter to see who is winning the game.
'''✔️ Do'''
* Keep panels compact — a 4-player game on mobile must not occupy more than '''¼ of the screen'''.
* Offer HTML anchor shortcuts to jump to a player's main components.


=== I-5 Use status bar actions ===
'''❌ Don't'''
* Do not put settings, titles, round numbers, or other redundant info in panels.
* Do not put always-accessible info (score, objectives) ''only'' on player panels.


When some game action is particular to a specific game state, the good practice is to use a status bar action (HTML link).
[[File:Ux-04-player-panel.jpg]]
Don't try to place some icon in your main gameinterface that will be useless 95% of the time: it takes space and makes the interface more complex to understand.  


Status bar actions in Tobago /picture/
=== A.4 Popups ===


== Game usability  ==
'''✔️ Do'''
* Reserve automatic popups for '''tutorials only'''.
* Make any required popup skippable on click/touch/timer.
* Use the game wiki for rules, hints, scoring tips, helpers.
[[File:Ux-06-wiki.jpg]]


=== II-1 Use tooltips ===
'''❌ Don't'''
* Do not block game flow with popups (forbidden).
* Do not use popups mid-game — only allowed for between-round/stage scoring.


With BGA Studio its very easy to associate atooltip on any element of the game.Each time this is possible : add a tooltip toexplain to the players :● What is this game element?● What happens if I click on it?However, tooltips should NOT be used todisplay dynamic information about the currentgame to save space on the game interface. Seasons : a Typically, regular players should be able to card tooltipplay with no tooltips.Tips : you can place any HTML element in tooltips. So you can make them as rich and beautiful as you need :)
Example: area around popup clickable - should be used to close it
=== II-2 Use left click only ===
● The whole game should be playable with only simple left button mouse clicks.● Context menus should not be used.●Dragndrop should be avoided (if you want to use it anyway, you should make a click basedalternative available).● Mouse icon must change on cliquable elements (« cursor:pointer » CSS property)..
=== II-3 Make your interface intuitive ===
If your testers have different opinions about« how to trigger some game action », maybe The Boss : when a player clics on a card the best is to make several options possible for with no selected cubes, the interface tell this game action. us to select some cube first.In the case there is a complex action to do bythe player (ex : select some cards, then clickon an action button), design your errormessages in order they can guide the player(ex : « please select some cards first »).Tips : For complex games, it is simple and useful to  highlight the area of the interface where player should focus his attention (using onEnteringState/onLeavingState and CSS).
=== II-4 Use the gamelog ===
With BGA Studio it is very easy to place sometext (or HTML code) in the gamelog.Dont hesitate to use the game log.Players are not always in front of the gamepage when their opponents are making theirmoves.In addition, the computer manipulates gameelements faster than you usually do with thereal board game and even regular players canget behind of what happened sometimes.You should be able to understand the « gamestory » by reading the game log. Caylus : game log extract
=== II-5 Tell players about automatic actions ===
Very often, during a game you are in asituation where :● Only one action is possible for the activeplayer, or● A series of action has to be done (accordingto the rules) without any players actions.In these situation, you must or you may triggerthese actions automatically.In any case, you must make sure that playersunderstand what is happening, otherwisetheyll probably report a bug. Stone Age : people are fed  automatically at the end of the turn, ● Use the game log to trace all actions but players can always see what performed automatically. happened exactly in the gamelog.● Use synchronous notifications handlers toslow down the execution of automatic actions,so that players can understand what ishappening.
=== II-6 Confirm a move ===
As a rule of thumb, dont provide a way toconfirm a move.Confirming a move slows down the userinterface and thus, the game flow.You can eventually allow a player to confirm amove if this is a very critical step in a game,and if it is possible that a player triggers theaction by accident. Hawaii : ending a turn is a critical action  that happens only 5 times per player in  a game. In this case, it is acceptable  (and a good idea) to have a  confirmation dialog.
=== II-7 Translatable interface ===
With BGA Studio its very easyto translate your game in anylanguage, using BGAcollaborative translation system.Check the FAQ and the examplegames to learn how to declareyour strings so that everymessage in your code can bemanaged by theinternationalization system. Diams 100 % translated in Polish


== Original game representation ==
[[File:Ux-05-popup.jpg]]
=== III-1 Use the original art===
The less you are modifying the original art of the game, the better.
Its important for publishers that a board game adaptation looks like the real board game. Sometimes it can be useful to modify some elements of the game to save some space on the screen – but try to avoid it.
Tips: if you have not enough space on the screen, reduce the size of the game elements.
Try to make sure they are recognizable for players who played regularly, and add a tooltip to help beginners to figure out what they are.
Gosu : the original cards are used,  with tooltips.


=== III-2 Be careful about player assistance ===
As a rule of thumb, in order to respect the original board games, you should not introduce any player assistance feature.
An assistance must not be introduced if it directly helps the player to figure out if his move is good or bad.
An assistance may be introduced if it can helps the payer to figure out what moves are available.
Gygès : the assistance shows you  available moves, but is not alerting  you about stupid moves (like the  upper left one).


=== III-3 Cancel a move ===
→ See [[#B.1 Tooltips|B.1]] for non-blocking alternatives.
As a rule of thumb, do not allow players to cancel one of their moves. Cancelling a move can cause many issues, including allowing players to reveal some private information intentionally.
You can allow a player to cancel a move only if he is in the middle of a multiple steps game action and if no private information has been revealed yet.


=== III-4 Available information ===
=== A.5 Clarity & Zoom ===
Every information visible by players in the real game should be accessible in the adaptation. Pay attention to some information like the number of cards in the opponents hand, or the number of remaining cards in the deck.
If it is explicitly forbidden to count cards in the discard pile, so this information is not available.


== Game technical quality ==
Use vertical space and good layout instead of zoom controls.
=== IV-1 Don't use exotic stuff ===
BGA Studio provides a set of useful tools to build board games adaptations (i.e. card management, confirmation dialog, tooltips,…).
Use them, and don't use exotic libraries, plugins or tricks.
Why? Because BGA Framework will evolve in the future to provide new features to players, and it could make your game incompatible with the new version.
On the contrary, if you are using standard Haggis using BGA standard card stuff, you will enjoy these enhancements without any effort.
If you feel that you really need some exotic thing: don't hesitate to ask us.


=== IV-2 Write in (simple) English ===
'''✔️ Do'''
Some other person may have to look on your code:
* Design so the core game is fully playable at '''100% scale'''.
* We (BGA team) are here to help you if you need us
* Trust browser zoom: Ctrl+wheel on desktop, pinch on mobile.
* Some other BGA developer wanting to help you
For all these reasons, your code must be written in English (variables, methods,comments...).
If English is not your mother tongue don't be afraid: the whole idea here is to be understood, not to write an essay :)


=== IV-3 Page refresh ===
'''❌ Don't'''
A page refresh (F5) must allow players to reset the game interface to a stable state at any moment of the game.
* Do not add zoom buttons unless absolutely necessary (large secondary boards, very text-heavy cards like Ticket to Ride).
BGA Studio framework allows you to do this with the « getAllDatas » PHP method and the « setup » Javascript method.
Note: this « refresh » feature is also quite useful during the development process:)


=== IV-4 Private information ===
'''If you must add zoom buttons:'''
A private game element must be visible only to the player owning it. It must not be visible by his opponents, by any means.
* '''+''' (plus): zoom in
In particular:  
* '''–''' (minus): zoom out
* getAllDatas PHP method must not return any element that are hidden from current player, even if the Javascript « setup » method ignores them.
* 🏠 Home: reset to default
* you must not send via the « notifyAllPlayers » function some information that is hidden from one player (use « notifyPlayer » instead).


== B — Usability ==


Hearts: each player is alerted about his new cards using notifyPlayer, and cards from the other players remains secret
=== B.1 Tooltips ===


=== IV-5 Game progression ===
Tooltips add insight, not duplication.
Game progression should be as accurate as possible.
Of course, its not always easy (or even possible) to compute game progression, but a vague approximation is better than nothing.
Stone Age: there are 2 different end game conditions (building cards and civilization  cards).
Both are taken into account to  increase the accuracy of the game  progression.


=== IV-6 Game statistics ===
'''✔️ Do'''
Using BGA Studio you can define a set of statistics for your game. Statistics will be displayed at the end of the game, and help players to figure out why they win/loose a game,
* Add extra detail beyond what's on screen (translatable text, hints about when to use).
and what they should improve. Try to choose interesting statistics that distinguish the different strategies for your game, in order it can help players to understand their game.  
* Use them to zoom into small text/icons on large game boards.
* Close tooltips when the user taps away on mobile.


Seasons : statistics
'''❌ Don't'''
== Summary ==
* Do not show the same info twice the same way.
These guidelines are here to help you to make sure that the players, the game publisher and the game author are going to enjoy your adaptation of the game. We created these guidelines based on our personal experience (which includes many mistakes along the way) implementing a lot of games on BGA platform. Don't hesitate to contact us if you feel uncomfortable with one of these guidelines in some particular context with your game: these guidelines are here to help and not to prevent you to do smart things, and have fun while programing your game ;)
* Do not add a tooltip that's just a zoomed-in copy of an already-visible card — that's a sign your components are mis-sized.
 
''Example: Ticket to Ride hover tooltips name cards/decks without distraction.''
 
[[File:Ux-07-tooltip-1.jpg]]
 
''Example: Altered shows minimal default info, with full detail on hover.''
 
[[File:Ux-08-tooltip-2.jpg]]
 
=== B.2 Forbidden actions ===
 
'''✔️ Do'''
* Grey out / disable actions that exist but aren't currently available.
 
'''❌ Don't'''
* Do not show disabled buttons for actions that are never relevant in the current context — just hide them.
 
=== B.3 Undo, Reset, Restart ===
 
BGA philosophy: fast, fluid, intuitive. Use these controls sparingly.
 
'''✔️ Do'''
* Use '''Confirm''' buttons for impactful, irreversible actions (end turn, discard, commit resources).
* Prefer timed confirmation (5–8s) over undo.
* Offer one '''Restart Turn''' for the whole turn when rules allow, not per-micro-action undo.
* Allow "Undo last move" only when a turn has '''more than 2 actions'''.
 
'''❌ Don't'''
* Do not add an Undo button for every action — multiplies validation steps, slows the game.
* Do not layer Undo on top of Reset on top of Confirm — over-validation.
* Do not use Undo to paper over misclicks — fix the layout instead (bigger targets, clearer highlights).
 
== C — Design ==
 
=== C.1 Typography & translations ===
 
Clarity beats style.
 
'''✔️ Do'''
* Use the default BGA font.
* Use clean sans-serif if you must change.
* Maintain good line spacing.
* Make all text translatable via BGA's translation system.
* Support LTR ''and'' RTL languages — test alignment & mirroring.
* Ensure your font supports accents/diacritics (é, ñ, ü).
* Meet '''WCAG AA''' contrast.
* Test on a phone — what's readable on a 27" monitor may not be on mobile.
 
'''❌ Don't'''
* Do not use decorative or themed fonts (hard to read, licensing risk, missing glyphs).
* Do not mix multiple fonts for "theme."
* Do not embed text directly into images without alt-text.
 
=== C.2 Highlights & Glowing auras ===
 
Players should never wonder "what do I click?"
 
'''✔️ Do'''
* Highlight valid options so the awaited action is obvious.
* Show consequences visually before the player commits.
 
''Example of highlighting valid options on the table.''
 
[[File:Ux-09-active-element.jpg]]
 
=== C.3 Button colors and styling ===
 
Button colors are a shared language across BGA. Mandatory for consistency.
 
{| class="wikitable"
! Color !! Meaning !! <code>statusBar.addActionButton</code>
|-
| 🔵 '''Blue''' || Advance, confirm, move forward || <code>primary</code>
|-
| 🔴 '''Red''' || Cancel, undo, stop, exit || <code>alert</code>
|-
| ⚪ '''White / Transparent''' || Optional/side actions || <code>secondary</code>
|-
| ⚫ '''Grey''' || Disabled, completed, unavailable || (disabled state of any of the above)
|}
 
'''✔️ Do'''
* Display usernames in their assigned player color.
* Outline player-color text so it stays visible (e.g. yellow on white).
* Test player colors on both light and dark backgrounds.
* Take any extra colors from '''game components''' (cards, tiles, tokens), not UI buttons.
 
'''❌ Don't'''
* Do not reassign blue/red/grey for game-specific meaning.
* Do not tint UI buttons to match the game's theme.
 
Note: Think of button colors as '''traffic lights''': blue = go, red = stop, grey = unavailable.
 
=== C.4 Sizing & responsiveness ===
 
'''✔️ Do'''
* Keep the main play area centered on every device.
* Use fluid layouts that expand/contract to fit available space.
* Leave margins around the board (prevents mobile misclicks).
* On desktop/tablet: show the entire board when possible.
* On mobile (vertical): stack secondary elements ''below'' the main action zone.
* Make everything readable and usable at 100% scale.
* Add HTML anchors / jump-links for vertical layouts.
 
'''❌ Don't'''
* Do not use fixed-width designs.
* Do not rely on zoom for legibility.
* Do not let layout break when players zoom in/out.
* Do not make any interactive element smaller than '''32×32px''' (see [[#E.3 Tap targets|E.3]]).
 
''Reference implementation:'' [https://thoun.github.io/bga-jump-to/demo/index.html bga-jump-to demo]
 
=== C.5 Background & extras ===
 
The background is the table surface your game sits on.
 
'''✔️ Do'''
* Use thematic, modern backgrounds (subtle playmat look).
* Add slight texture or pattern.
* Apply a touch of blur so components remain the visual focus.
* Prioritize contrast against the game's components.
 
'''❌ Don't'''
* Do not use pure flat colors.
* Do not use sharp, busy, detailed backgrounds that compete with the game.
* Do not let the background reduce component visibility.
 
== D — Feedback ==
 
=== D.1 Errors & invalid actions ===
 
Silence is never acceptable. Every failed action must say why.
 
'''✔️ Do'''
* Use a short shake, grey-out, or tooltip on failure.
* Show concise plain-text errors: ''"You don't have enough resources."''
* Pair color with icons or text (don't rely on red alone).
 
'''❌ Don't'''
* Do not leave the player guessing.
* Do not use color alone — colorblind users won't see it.
 
=== D.2 Game Logs ===
 
Logs are the narration of the match. Critical for asynchronous games.
 
'''✔️ Do'''
* Log every major action: card plays, moves, resource changes, eliminations.
* Always say '''who''' acted and '''what''' changed.
* Use icons, colors, formatting for fast scanning.
* Provide alt-text for graphic components inside logs.
* Group small simultaneous actions into a one-liner.
* Log automated/forced actions too.
 
'''❌ Don't'''
* Do not write walls of text or use oversized images that break log flow.
* Do not hide ''who'' did the action.
 
''Good:''
* "Marianna placed [red tile] on [central board] (+2 points)."
* "Alex drew 2 [train cards]."
 
''Bad:''
* "+2 points"
* "Card drawn"
 
=== D.3 Animation ===
 
Animations explain '''what moved, where it went, why it matters'''.
 
'''✔️ Do'''
* Use animations for: cards entering a hand, tokens moving, score count-up.
* Keep regular animations at '''0.5s''', max '''0.8s'''.
* Batch repetitive updates (don't show 50 tiny +1 animations).
 
'''❌ Don't'''
* Do not animate trivial updates one by one.
* Do not use looping, bouncing, or glowing animations as decoration.
 
→ See [https://en.doc.boardgamearena.com/BgaAnimations BGA animation library].
 
=== D.4 Sound effects ===
 
Sound is a bonus, not a requirement.
 
'''✔️ Do'''
* Keep volume '''below''' the BGA default.
* Keep sounds short, sharp, purposeful.
* Always pair sound with a visual cue.
 
'''❌ Don't'''
* Do not add long looping soundtracks.
* Do not let any action be communicated by '''sound only'''.
* Do not surprise players with loud audio.
 
== E — Accessibility ==
 
=== E.1 Design for all ===
 
'''✔️ Do'''
* Pair colors with icons, textures, or shapes.
* Meet contrast ratio '''4.5:1''' minimum.
* Label every button, icon, and interactive element (screen readers).
* Use bold shapes, clear outlines, strong contrast to differentiate pieces.
 
'''❌ Don't'''
* Do not rely on color alone.
* Do not use flashing or rapidly alternating visuals.
* Do not depend on fine details or subtle shading to differentiate components.
 
=== E.2 Colorblind-safe design ===
 
'''✔️ Do'''
* Add unique shapes/symbols/outlines per pawn or token color.
* Place small icons in card corners (or patterns) so suits are recognizable without hue.
* Meet '''WCAG AA''' for text and icons.
* Outline player-color names so yellow doesn't vanish on white.
 
'''❌ Don't'''
* Do not assume players perceive color differences.
 
=== E.3 Tap targets ===
 
'''✔️ Do'''
* Minimum '''32×32px''' for any interactive element.
* Aim for '''40–44px''' (greatly reduces mis-taps).
* Leave spacing between buttons, tokens, cards.
* Group many options into expandable menus or secondary panels.
* When space runs out, add scrolling — don't shrink components.
 
'''❌ Don't'''
* Do not cram small icons into tight clusters.
* Do not shrink components below the minimum to fit.
 
=== E.4 Settings & customization ===
 
'''✔️ Do'''
* Put all game settings in BGA's '''standard settings menu'''.
* Reuse existing BGA controls.
* Offer per-game options only where relevant: animation speed, tooltip detail, sound on/off.
 
'''❌ Don't'''
* Do not build custom settings UI (the platform is phasing those out).
* Do not duplicate controls already available globally.
 
== F — Technical ==
 
=== F.1 Endgame & Replays ===
 
'''✔️ Do'''
* Make replays flow without interruption.
* Keep animations skippable and playable at minimum speed.
* Keep logs and highlights in sync with each replayed action.
* Match the scoring pay-off to game length — long games deserve a longer reveal.
* Use synchronous notifications per scoring step and <code>this.displayScoring</code> for points animations.
 
'''❌ Don't'''
* Do not put blocking popups in replays.
* Do not drop the final score instantly at the end of a long game.
 
=== F.2 Refresh & Continuity ===
 
A refresh should feel invisible.
 
'''✔️ Do'''
* Restore the exact game state after refresh (no missing/corrupted info).
* Restore temporary UI: whose turn it is, pending actions, selected components.
* Treat the server as the source of truth for all critical state.
* Expect disconnect/reconnect as normal — BGA may do it at any time.
 
'''❌ Don't'''
* Do not store critical state in client-only memory.
* Do not rely on session continuity hacks.
 
=== F.3 Error handling ===
 
'''✔️ Do'''
* Handle disconnects and dropped actions without breaking flow.
* Show players short, friendly messages explaining what went wrong.
* Log precise error details to the developer console.
* Isolate the error to the affected action.
 
'''❌ Don't'''
* Do not crash the game on invalid input.
* Do not expose raw server logs or stack traces to players.
* Do not block the whole table because of one failed request.
 
== Pre-release Checklist ==
 
''Version 1.0.0 — May 22, 2026''
 
{| class="wikitable"
! # !! Check
|-
| 1 || Layout centers and scales on all devices.
|-
| 2 || Action Bar ≤ 4 buttons, never replaces components.
|-
| 3 || Tooltips: clear, translatable, useful.
|-
| 4 || Buttons follow BGA standards (blue = forward, red = cancel).
|-
| 5 || No blocking popups mid-game.
|-
| 6 || Animations: quick, smooth, informative.
|-
| 7 || All tap/click targets ≥ 32px.
|-
| 8 || Colorblind-safe icons in place.
|-
| 9 || Endgame shows breakdown + replay option.
|-
| 10 || Game state restores cleanly after refresh.
|}
 
== Closing thoughts ==
 
* '''Alpha:''' gather usability feedback.
* '''Beta:''' listen to the crowd — confusion spots = redesign spots.
* '''Iterate:''' small UX tweaks = big retention gains.
* '''Watch metrics:''' if players stall at a phase, that's your design flag.
 
Play other BGA games with similar mechanics — get inspired, challenge your assumptions, and treat UX as a key part of design, not an afterthought.
 
 
 
= BGA Studio Guidelines (Source Code) =
Make your code as easy to read and understand as possible: clearly named functions and variables, comments when necessary, ...
 
Everything should be in english in your code.
 
In case you drop the support for a project, another developer should be able to follow up on your code and understand it easily.
 
== Front (JS) code ==
 
=== Generated code ===
Generated code (SCSS, Typescript) is tolerated, as long as you provide both source files and built files, ideally with build tools. The build file should not be minimized, as someone taking over your project might not know the source language, and will the work on the built file ignoring the source file. Build tools are useful if he wants to continue the project with your source files.
 
JS and CSS files remains the used file in the end, BGA does not handle natively other languages.
 
=== Templates ===
Use of .tpl file and view.php is deprecated and forbidden for new projects.
 
 
== Back (PHP) code ==
Game name and option names should be Capitalized.
 
=== Framework functions ===
 
===== Undocumented functions =====
Do not use undocumented functions. They may change or be deleted without warning, and your game will not work anymore. Any change on documented function will be avoided as much as possible, and will be notified.
 
==== Function override ====
Do not override framework functions. Use a wrapper instead.
 
'''Bad :'''
 
<pre>
public function getPlayerNameById($player_id) { // same name as the framework function = override
  if ($player_id == 0) {
    return 'Automata';
  } else {
    return parent::getPlayerNameById($player_id);
  }
}
</pre>
 
'''Better :'''
<pre>
public function myGameGetPlayerNameById($player_id) { // // different name = wrapper
  if ($player_id == 0) {
    return 'Automata';
  } else {
    return $this->getPlayerNameById($player_id);
  }
}
</pre>
 
==== State functions ====
States functions should be prefixed "st"
 
Args functions should be prefixed "arg"
 
Action functions should be prefixed "act"
 
=== Namespacing ===
The classes should be namespaced following the PSR-4 norm. That means you won't need to require the classes, as BGA will be able to autoload them.
 
So a class named PowerCardManager on a PowerCard folder should have the filename <code><mygame>/PowerCard/PowerCardManager.php</code> and start like this :
 
<pre>
<?php
declare(strict_types=1);
namespace Bga\Games\<mygame>\PowerCard;
class PowerCardManager {
</pre>
 
=== Other ===
.action.php shouldn’t be used anymore, auto-wiring should be used instead.
 
 
The actions function must check any input. To avoid code duplication, they can use the arg function.
 
''Example :''  
 
<pre>
$args = $this->argPlayCards();
if (!in_array($cardId, $args['selectableCardsIds'])) { throw new \BgaUserException(...); }
</pre>
 
 
Don’t use `@` to ignore the errors of a function call.  
 
 
[[Category:Studio]]

Latest revision as of 03:15, 23 May 2026

BGA Studio Guidelines (UX/UI)

This page covers UX guidelines for games on Board Game Arena. Read the official PDF or bga.li/mRdx first. This page is an unofficial summary.

Goal: most games should be instantly playable on any device — desktop at midnight or phone at lunch.

Use this page to validate UX before switching your game from ALPHA → BETA → RELEASE.

A — Layouts

A.1 Layout arrangement

Game should fit a square ratio and show everything the active player needs. Use vertical scroll for secondary info (other players' progress, secondary boards).

✔️ Do

  • Center the play area on all devices.
  • Leave a "no action" margin around the board (deselect, scroll on mobile).
  • Use HTML anchors to jump between distant sections.
  • Use spacers / transparent whiteblocks to group pieces clearly.
  • Keep score, turn order, and objectives accessible (button/tab/panel), not always visible.
  • Tuck rare abilities into tooltips.

❌ Don't

  • Do not hide game components behind popups — you should see everything you'd see on a real table.
  • Do not place "always accessible" info permanently on the player panels.
  • Do not add in-game logos or branding that isn't part of the actual game.
  • Do not scatter related info (e.g. resources) across three corners.

Note: Layout mantra: Central = shared actions. Top/Bottom = global info. Panels = private resources.

Ux-01-layouts.jpg


A.2 Action Bar

The Action Bar always shows the current state: turn in progress, who we're waiting for, or what the player can do.

Ux-03-action-bar-mock.jpg

✔️ Do

  • Center main awaited actions (Play card, End turn, Confirm move).
  • Place secondary/greyed-out actions next to them.
  • Put cancel / undo / remove on the right, visually separated from forward actions.
  • Use the Action Bar for: actions targeting another player, Pass/End turn/time-related actions, auction phases, and small resource exchanges without dedicated board space.
  • Keep it to max 4 buttons + context so it doesn't overflow on mobile.

❌ Don't

  • Do not replace board-component actions with Action Bar buttons — players should act on the board like in real life.
  • Do not stick custom buttons next to BGA's built-in buttons (replay controls, etc.).
  • Do not let cancel actions visually compete with main actions.
  • Do not show "Round in progress" text inside the bar — display it on the table or as flavor text of the current action.

Example: Wingspan shows the current round as flavor text under the action bar.

Ux-02-action-bar-examples.jpg

→ See C.3 for button colors.

A.3 Player panels

Player panels let anyone glance at: who's playing, color, score, turn order, and resources gained.

✔️ Do

  • Keep panels compact — a 4-player game on mobile must not occupy more than ¼ of the screen.
  • Offer HTML anchor shortcuts to jump to a player's main components.

❌ Don't

  • Do not put settings, titles, round numbers, or other redundant info in panels.
  • Do not put always-accessible info (score, objectives) only on player panels.

Ux-04-player-panel.jpg

A.4 Popups

✔️ Do

  • Reserve automatic popups for tutorials only.
  • Make any required popup skippable on click/touch/timer.
  • Use the game wiki for rules, hints, scoring tips, helpers.

Ux-06-wiki.jpg

❌ Don't

  • Do not block game flow with popups (forbidden).
  • Do not use popups mid-game — only allowed for between-round/stage scoring.

Example: area around popup clickable - should be used to close it

Ux-05-popup.jpg


→ See B.1 for non-blocking alternatives.

A.5 Clarity & Zoom

Use vertical space and good layout instead of zoom controls.

✔️ Do

  • Design so the core game is fully playable at 100% scale.
  • Trust browser zoom: Ctrl+wheel on desktop, pinch on mobile.

❌ Don't

  • Do not add zoom buttons unless absolutely necessary (large secondary boards, very text-heavy cards like Ticket to Ride).

If you must add zoom buttons:

  • + (plus): zoom in
  • – (minus): zoom out
  • 🏠 Home: reset to default

B — Usability

B.1 Tooltips

Tooltips add insight, not duplication.

✔️ Do

  • Add extra detail beyond what's on screen (translatable text, hints about when to use).
  • Use them to zoom into small text/icons on large game boards.
  • Close tooltips when the user taps away on mobile.

❌ Don't

  • Do not show the same info twice the same way.
  • Do not add a tooltip that's just a zoomed-in copy of an already-visible card — that's a sign your components are mis-sized.

Example: Ticket to Ride hover tooltips name cards/decks without distraction.

Ux-07-tooltip-1.jpg

Example: Altered shows minimal default info, with full detail on hover.

Ux-08-tooltip-2.jpg

B.2 Forbidden actions

✔️ Do

  • Grey out / disable actions that exist but aren't currently available.

❌ Don't

  • Do not show disabled buttons for actions that are never relevant in the current context — just hide them.

B.3 Undo, Reset, Restart

BGA philosophy: fast, fluid, intuitive. Use these controls sparingly.

✔️ Do

  • Use Confirm buttons for impactful, irreversible actions (end turn, discard, commit resources).
  • Prefer timed confirmation (5–8s) over undo.
  • Offer one Restart Turn for the whole turn when rules allow, not per-micro-action undo.
  • Allow "Undo last move" only when a turn has more than 2 actions.

❌ Don't

  • Do not add an Undo button for every action — multiplies validation steps, slows the game.
  • Do not layer Undo on top of Reset on top of Confirm — over-validation.
  • Do not use Undo to paper over misclicks — fix the layout instead (bigger targets, clearer highlights).

C — Design

C.1 Typography & translations

Clarity beats style.

✔️ Do

  • Use the default BGA font.
  • Use clean sans-serif if you must change.
  • Maintain good line spacing.
  • Make all text translatable via BGA's translation system.
  • Support LTR and RTL languages — test alignment & mirroring.
  • Ensure your font supports accents/diacritics (é, ñ, ü).
  • Meet WCAG AA contrast.
  • Test on a phone — what's readable on a 27" monitor may not be on mobile.

❌ Don't

  • Do not use decorative or themed fonts (hard to read, licensing risk, missing glyphs).
  • Do not mix multiple fonts for "theme."
  • Do not embed text directly into images without alt-text.

C.2 Highlights & Glowing auras

Players should never wonder "what do I click?"

✔️ Do

  • Highlight valid options so the awaited action is obvious.
  • Show consequences visually before the player commits.

Example of highlighting valid options on the table.

Ux-09-active-element.jpg

C.3 Button colors and styling

Button colors are a shared language across BGA. Mandatory for consistency.

Color Meaning statusBar.addActionButton
🔵 Blue Advance, confirm, move forward primary
🔴 Red Cancel, undo, stop, exit alert
⚪ White / Transparent Optional/side actions secondary
⚫ Grey Disabled, completed, unavailable (disabled state of any of the above)

✔️ Do

  • Display usernames in their assigned player color.
  • Outline player-color text so it stays visible (e.g. yellow on white).
  • Test player colors on both light and dark backgrounds.
  • Take any extra colors from game components (cards, tiles, tokens), not UI buttons.

❌ Don't

  • Do not reassign blue/red/grey for game-specific meaning.
  • Do not tint UI buttons to match the game's theme.

Note: Think of button colors as traffic lights: blue = go, red = stop, grey = unavailable.

C.4 Sizing & responsiveness

✔️ Do

  • Keep the main play area centered on every device.
  • Use fluid layouts that expand/contract to fit available space.
  • Leave margins around the board (prevents mobile misclicks).
  • On desktop/tablet: show the entire board when possible.
  • On mobile (vertical): stack secondary elements below the main action zone.
  • Make everything readable and usable at 100% scale.
  • Add HTML anchors / jump-links for vertical layouts.

❌ Don't

  • Do not use fixed-width designs.
  • Do not rely on zoom for legibility.
  • Do not let layout break when players zoom in/out.
  • Do not make any interactive element smaller than 32×32px (see E.3).

Reference implementation: bga-jump-to demo

C.5 Background & extras

The background is the table surface your game sits on.

✔️ Do

  • Use thematic, modern backgrounds (subtle playmat look).
  • Add slight texture or pattern.
  • Apply a touch of blur so components remain the visual focus.
  • Prioritize contrast against the game's components.

❌ Don't

  • Do not use pure flat colors.
  • Do not use sharp, busy, detailed backgrounds that compete with the game.
  • Do not let the background reduce component visibility.

D — Feedback

D.1 Errors & invalid actions

Silence is never acceptable. Every failed action must say why.

✔️ Do

  • Use a short shake, grey-out, or tooltip on failure.
  • Show concise plain-text errors: "You don't have enough resources."
  • Pair color with icons or text (don't rely on red alone).

❌ Don't

  • Do not leave the player guessing.
  • Do not use color alone — colorblind users won't see it.

D.2 Game Logs

Logs are the narration of the match. Critical for asynchronous games.

✔️ Do

  • Log every major action: card plays, moves, resource changes, eliminations.
  • Always say who acted and what changed.
  • Use icons, colors, formatting for fast scanning.
  • Provide alt-text for graphic components inside logs.
  • Group small simultaneous actions into a one-liner.
  • Log automated/forced actions too.

❌ Don't

  • Do not write walls of text or use oversized images that break log flow.
  • Do not hide who did the action.

Good:

  • "Marianna placed [red tile] on [central board] (+2 points)."
  • "Alex drew 2 [train cards]."

Bad:

  • "+2 points"
  • "Card drawn"

D.3 Animation

Animations explain what moved, where it went, why it matters.

✔️ Do

  • Use animations for: cards entering a hand, tokens moving, score count-up.
  • Keep regular animations at 0.5s, max 0.8s.
  • Batch repetitive updates (don't show 50 tiny +1 animations).

❌ Don't

  • Do not animate trivial updates one by one.
  • Do not use looping, bouncing, or glowing animations as decoration.

→ See BGA animation library.

D.4 Sound effects

Sound is a bonus, not a requirement.

✔️ Do

  • Keep volume below the BGA default.
  • Keep sounds short, sharp, purposeful.
  • Always pair sound with a visual cue.

❌ Don't

  • Do not add long looping soundtracks.
  • Do not let any action be communicated by sound only.
  • Do not surprise players with loud audio.

E — Accessibility

E.1 Design for all

✔️ Do

  • Pair colors with icons, textures, or shapes.
  • Meet contrast ratio 4.5:1 minimum.
  • Label every button, icon, and interactive element (screen readers).
  • Use bold shapes, clear outlines, strong contrast to differentiate pieces.

❌ Don't

  • Do not rely on color alone.
  • Do not use flashing or rapidly alternating visuals.
  • Do not depend on fine details or subtle shading to differentiate components.

E.2 Colorblind-safe design

✔️ Do

  • Add unique shapes/symbols/outlines per pawn or token color.
  • Place small icons in card corners (or patterns) so suits are recognizable without hue.
  • Meet WCAG AA for text and icons.
  • Outline player-color names so yellow doesn't vanish on white.

❌ Don't

  • Do not assume players perceive color differences.

E.3 Tap targets

✔️ Do

  • Minimum 32×32px for any interactive element.
  • Aim for 40–44px (greatly reduces mis-taps).
  • Leave spacing between buttons, tokens, cards.
  • Group many options into expandable menus or secondary panels.
  • When space runs out, add scrolling — don't shrink components.

❌ Don't

  • Do not cram small icons into tight clusters.
  • Do not shrink components below the minimum to fit.

E.4 Settings & customization

✔️ Do

  • Put all game settings in BGA's standard settings menu.
  • Reuse existing BGA controls.
  • Offer per-game options only where relevant: animation speed, tooltip detail, sound on/off.

❌ Don't

  • Do not build custom settings UI (the platform is phasing those out).
  • Do not duplicate controls already available globally.

F — Technical

F.1 Endgame & Replays

✔️ Do

  • Make replays flow without interruption.
  • Keep animations skippable and playable at minimum speed.
  • Keep logs and highlights in sync with each replayed action.
  • Match the scoring pay-off to game length — long games deserve a longer reveal.
  • Use synchronous notifications per scoring step and this.displayScoring for points animations.

❌ Don't

  • Do not put blocking popups in replays.
  • Do not drop the final score instantly at the end of a long game.

F.2 Refresh & Continuity

A refresh should feel invisible.

✔️ Do

  • Restore the exact game state after refresh (no missing/corrupted info).
  • Restore temporary UI: whose turn it is, pending actions, selected components.
  • Treat the server as the source of truth for all critical state.
  • Expect disconnect/reconnect as normal — BGA may do it at any time.

❌ Don't

  • Do not store critical state in client-only memory.
  • Do not rely on session continuity hacks.

F.3 Error handling

✔️ Do

  • Handle disconnects and dropped actions without breaking flow.
  • Show players short, friendly messages explaining what went wrong.
  • Log precise error details to the developer console.
  • Isolate the error to the affected action.

❌ Don't

  • Do not crash the game on invalid input.
  • Do not expose raw server logs or stack traces to players.
  • Do not block the whole table because of one failed request.

Pre-release Checklist

Version 1.0.0 — May 22, 2026

# Check
1 Layout centers and scales on all devices.
2 Action Bar ≤ 4 buttons, never replaces components.
3 Tooltips: clear, translatable, useful.
4 Buttons follow BGA standards (blue = forward, red = cancel).
5 No blocking popups mid-game.
6 Animations: quick, smooth, informative.
7 All tap/click targets ≥ 32px.
8 Colorblind-safe icons in place.
9 Endgame shows breakdown + replay option.
10 Game state restores cleanly after refresh.

Closing thoughts

  • Alpha: gather usability feedback.
  • Beta: listen to the crowd — confusion spots = redesign spots.
  • Iterate: small UX tweaks = big retention gains.
  • Watch metrics: if players stall at a phase, that's your design flag.

Play other BGA games with similar mechanics — get inspired, challenge your assumptions, and treat UX as a key part of design, not an afterthought.


BGA Studio Guidelines (Source Code)

Make your code as easy to read and understand as possible: clearly named functions and variables, comments when necessary, ...

Everything should be in english in your code.

In case you drop the support for a project, another developer should be able to follow up on your code and understand it easily.

Front (JS) code

Generated code

Generated code (SCSS, Typescript) is tolerated, as long as you provide both source files and built files, ideally with build tools. The build file should not be minimized, as someone taking over your project might not know the source language, and will the work on the built file ignoring the source file. Build tools are useful if he wants to continue the project with your source files.

JS and CSS files remains the used file in the end, BGA does not handle natively other languages.

Templates

Use of .tpl file and view.php is deprecated and forbidden for new projects.


Back (PHP) code

Game name and option names should be Capitalized.

Framework functions

Undocumented functions

Do not use undocumented functions. They may change or be deleted without warning, and your game will not work anymore. Any change on documented function will be avoided as much as possible, and will be notified.

Function override

Do not override framework functions. Use a wrapper instead.

Bad :

public function getPlayerNameById($player_id) { // same name as the framework function = override
  if ($player_id == 0) {
    return 'Automata';
  } else {
    return parent::getPlayerNameById($player_id);
  } 
}

Better :

public function myGameGetPlayerNameById($player_id) { // // different name = wrapper
  if ($player_id == 0) {
    return 'Automata';
  } else {
    return $this->getPlayerNameById($player_id);
  } 
}

State functions

States functions should be prefixed "st"

Args functions should be prefixed "arg"

Action functions should be prefixed "act"

Namespacing

The classes should be namespaced following the PSR-4 norm. That means you won't need to require the classes, as BGA will be able to autoload them.

So a class named PowerCardManager on a PowerCard folder should have the filename <mygame>/PowerCard/PowerCardManager.php and start like this :

<?php
declare(strict_types=1);
namespace Bga\Games\<mygame>\PowerCard;
class PowerCardManager {

Other

.action.php shouldn’t be used anymore, auto-wiring should be used instead.


The actions function must check any input. To avoid code duplication, they can use the arg function.

Example :  

$args = $this->argPlayCards();
if (!in_array($cardId, $args['selectableCardsIds'])) { throw new \BgaUserException(...); }


Don’t use `@` to ignore the errors of a function call.