Skip to content

Commit

Permalink
Merge pull request #415 from flame-engine/feat/platform-docs
Browse files Browse the repository at this point in the history
Adding platforms and channel doc section
  • Loading branch information
erickzanardo authored Jul 25, 2020
2 parents fb478f4 + 495638b commit ac78238
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Check out the [awesome flame repository](https://github.com/flame-engine/awesome
- [Game Loop](game.md)
- [Components](components.md)
- [Input](input.md)
- [Platforms](platforms.md)
* Audio
- [General Audio](audio.md)
- [Looping Background Music](bgm.md)
Expand Down
28 changes: 28 additions & 0 deletions doc/platforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Supported Platforms

Flame runs on top of Flutter, so its supported platforms depend on how mature/stable support for each platform is by Flutter.

At the moment, mobile has full support, and we try to keep supporting web the best we can.

## Flutter channels

Flame keeps it support on the stable and beta channel, dev and master channel should work, but we don't support them. This mean that issues happening outside stable or beta channel, are not a priority.

## Flame web

To use Flame on web you need to be on the beta channel of Flutter and the game should be running using skia rendering, otherwise weird side effects may happen.

To run your game using skia in release mode, use the following command:

`$ flutter run -d Chrome --release --dart-define=FLUTTER_WEB_USE_SKIA=true`

To run with skia on debug mode, just start the project using the conventional command:

`$ flutter run -d Chrome`

And when the app starts and the debug is setup, press the `k` key. That will enable the `CanvasKit` mode.

To build the game for production, using skia, use the following:

`$ flutter build web --release --dart-define=FLUTTER_WEB_USE_SKIA=true`

8 changes: 4 additions & 4 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -xe

if [[ $(flutter format -n .) ]]; then
echo "flutter format issue"
FORMAT_ISSUES=$(flutter format --set-exit-if-changed -n .)
if [ $? -eq 1 ]; then
echo "flutter format issues on"
echo $FORMAT_ISSUES
exit 1
fi

Expand Down

0 comments on commit ac78238

Please sign in to comment.