BAR Lobby is a new WIP lobby for the RTS game Beyond All Reason. It hopes to boldly go where no Spring client has gone before, providing a more streamlined experience, with good visuals and UX being high priority. The ultimate goal of BAR Lobby is to replace all other lobbies when it comes to playing BAR. If a significant amount of people don't wish to use it because of reasons such as functionality or speed, then this project is going very wrong.
BAR Lobby is a work-in-progress and actively developed project. We are currently working towards milestones defined in the wiki/Roadmap.
BAR Lobby is an important part of BAR's Steam Roadmap, and there is a lot of other work in other places that support this development. Please take a look at the infrastructure documentation for details on how BAR Lobby fits into the rest of the system.
- Provide functionality for everything related to BAR. Campaigns, Missions, Multiplayer, Replays etc
- Simple and intutive codebase, lots of documenation for contributing
- Steam integration, automatic account creation and login
- Smooth, seemless, fully integrated downloads. Content should be preloaded when sensible
- Communicate entirely via Teiserver's new protocol, Tachyon. No support for the legacy SpringLobbyProtocol
- TLS only, no unencypted comms
Please take a look at the contributing guide to learn how to help the project.
It is highly recommended to use VSCode for development, as it provides full, built-in TypeScript support, as well as useful extensions such as ESLint and Vue - Official (previously Volar).
We recommend tools management software like NVM or mise-en-place for installation of the correct node version.
npm install
npm start
.
├──buildResources # used by electron-builder
├──src
│ ├──main
│ │ ├──main.ts
│ │ └──...
│ ├──preload
│ │ ├──preload.ts
│ │ └──...
│ └──renderer # with vue
│ ├──public # (optional) publicDir for renderer
│ ├──index.ts
│ ├──index.html
│ └──...
├──electron-builder.config.ts
├──electron.vite.config.ts
├──package.json
└──...
- Main process
- Runs in a Node.js environment and has access to Node.js APIs
- Anything requiring access to the operating system or Node.js APIs needs to live here
- Preload script
- Runs in a Node.js environment
- Defines global objects that can be used in the renderer
- Handles communication between the main and renderer processes
- Uses Electron's ipcMain and ipcRenderer modules for inter-process communication (IPC).
- Renderer process
- Runs in a web environment and has no direct access to Node.js APIs
electron-forge
- Builds the app with a pre-configured Vite setup for Electron apps
- This intentionally does not include
electron
or any othernode_modules
dependencies in the build- Dependencies get added to the package by
electron-builder
with ASAR - Note: apps that only have CJS exports need to be included in the build, e.g.
glob-promise
- Dependencies get added to the package by
electron-builder
- Packages Electron app for distribution
- Configured for Windows NSIS installer and Linux AppImage
- Handles publishing updates
- Auto-updates TBD
- Packages Electron app for distribution
npm start
- Runs
electron-forge
indevelopment
mode - renderer runs with Hot Module Replacement (HMR)
- main and preload are directly bundled to
.vite/build
- Runs
npm run package
- Runs
electron-forge
inproduction
mode - renderer is bundled to
.vite/renderer
- main and preload are bundled to
.vite/build
- This should be run before any of the
npm run build
commands below.
- Runs
npm run preview
- Runs
electron-forge
inproduction
mode, and runs electron - main, preload, and renderer are bundled to
.vite/build
- This is useful for validating the
production
build without packaging the app
- Runs
npm run build:win
- Runs
npm run build
andelectron-builder
, building for Windows - Outputs NSIS installer in
dist
- Runs
npm run buildall:win
- Runs
npm run package
then runsnpm run build:win
.
- Runs
npm run build:linux
- Runs
npm run build
andelectron-builder
, building for Linux - Outputs AppImage executable in
dist
- Runs
npm run buildall:linux
- Runs
npm run package
then runsnpm run build:linux
.
- Runs
npm run build:unpack
- Runs
npm run build
andelectron-builder
, building an unpackaged directory - Outputs the unpacked contents in
dist
- Useful for testing
- Runs
npm run dev-cert
(optional and only for Windows development)- Runs
electron-builder
to create a self-signed cert for Windows apps. - After selecting "None" in the pop-up, a cert file should be created called
BAR Team.pfx
- Then run
npm run build:win:dev-cert
to build a signed Windows installer
- Runs
npm run generate-i18n-assets
(run when modifying source translation files)- Generates transformed asset files for translations in
src/renderer/assets/languages
- Generates transformed asset files for translations in
You can start multiple separate instances by overriding the assets and/or state location using env variables:
BAR_STATE_PATH=state-2 npm start
BAR_ASSETS_PATH=assets-3 BAR_STATE_PATH=state-3 npm start
At time of writing, the production server (server4) isn't setup for the new client. You need to enable dev mode in the settings, and then, in the dev settings, choose server5 which is closer to the production server, or the dev server where you can create test accounts.
Please see the LICENSE.md file for details on the license of this project.