Skip to content

Latest commit

 

History

History
103 lines (82 loc) · 5.03 KB

README.md

File metadata and controls

103 lines (82 loc) · 5.03 KB

Boardgames

🎬 See a demo! Click here. It is 1 minute video of web app, linux native app and local docker deployment of nakama server multiplaying tic-tac-toe game.

North star for the project is to provide single- and multi-player cross-platform gaming experience for "boardgame-like" games (i.e. dice/cards/"traditional" boardgames). The experience is supposed to leverage the fact we are using computing devices (phones, PCs, etc.) to enrich the gaming experience as opposed to trying to emulate real-life experience. For example, we can have computer do the time consuming and boring computations which real-life game requires people to do manually. Games themselves can and should be developed outside of this repository and by anyone.

If you are interested in contributing to the project, go to CONTRIBUTING. If you need help or you are stuck, see TROUBLESHOOTING. If you want to know the license of the project, see COPYING. If you want to run code for your self, read on...

Pre-commit checklist

  1. dart analyze. You could: Make sure to save your changes and then dart fix --apply.
  2. Check it works on linux
  3. git commit

Local development with Linux native app and web app in Chrome (guide for Arch Linux host)

Setup

  1. Install flutter from this AUR package.
  2. Ensure you can use flutter sudo gpasswd -a <your-username> flutterusers
  3. Install docker and nodejs (needed for nakama server) sudo pacman -S docker docker-compose nodejs npm
  4. Install build dependencies sudo pacman -S cmake clang ninja
  5. Install IDE sudo pacman -S code
  6. Open IDE code . and install extension named Flutter
  7. Reboot.
  8. Verify everything is OK by running flutter doctor. You can ignore errors related to chrome and android, see "Testing on other platforms" for instructions how to fix these.
  9. Open IDE code . and do Ctrl+E, type >flutter and choose flutter doctor, ensure output shows no errors. You can ignore errors related to chrome and android, see "Testing on other platforms" for instructions how to fix these.

Setup for Chrome

  1. Install Chrome from this AUR package.
  2. Set variables
export CHROME_EXECUTABLE=/opt/google/chrome/chrome
  1. Verify there are no Chrome related errors by running flutter doctor

Running

Linux native: scripts/run-linux.sh Web (Chrome): scripts/run-web.sh Multiplayer server: scripts/run-server.sh (WARNING: This assumes you are using iptables as firewall and CHANGES its configuration)

Testing on other platforms

Android (guide for Arch Linux host)

Setup

  1. Install Android Studio from this AUR package.
  2. Open Android Studio and install latest SDK.
  3. Open Android Studio, choose more actions and then SDK manager. Install Android SDK Command-Line Tools from SDK tools.
  4. Open Android Studio and create a virtual device (more actions and then virtual device manager).
  5. Accept Android licenses flutter doctor --android-licenses
  6. Verify there are no Android related errors by running flutter doctor

Run

Execute: flutter run -d android

Mac

TODO

iOS

TODO

Windows

TODO

Build for release

  • For Linux
    • Build binary for your Arch Linux machine - Run flutter build linux --release --obfuscate --split-debug-info=build/symbols/linux/v0.0.1, output is in ./build/linux/x64/release/bundle/ which you can redistribute only to folks using same OS set-up as yours.
    • TODO Publish to snap store. relevant guide
  • For Web run scripts/release-web.sh, output is in ./build/web which you should host. To test output locally, run:
      dart --disable-analytics
      dart pub global activate dhttpd
      dart pub global run dhttpd --path build/web
    
    And go to http://localhost:8080
  • For Android
    1. Change signing config in build.gradle
    2. TODO Other steps might be needed. relevant guide
    3. Run scripts/release-android.sh, output is in ./build/app/outputs/bundle/release/app-release.aab which you should publish to play store.
  • TODO For Mac. relevant guide
  • TODO For iOS. relevant guide
  • TODO For Windows. relevant guide

Reference: Folders

  • android: Flutter app Android specific.
  • assets: All assets used in some way for the app. Not all are necessarily shipped with the app.
  • ios: Flutter app iOS specific.
  • lib: Flutter app cross platform.
  • linux: Flutter app Linux specific.
  • macos: Flutter app MacOS specific.
  • nakama: Multiplayer server specific.
  • scripts: Scripts used for local development.
  • test: Flutter app tests.
  • web: Flutter app Web specific.
  • windows: Flutter app Windows specific.