Renamed doc to docs and minor language fixes
2
.gitignore
vendored
@ -7,7 +7,7 @@
|
||||
.pub/
|
||||
packages
|
||||
pubspec.lock
|
||||
doc/api/
|
||||
docs/api/
|
||||
.flutter-plugins
|
||||
.vscode/
|
||||
**/.flutter-plugins
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
# CHANGELOG
|
||||
|
||||
## [next]
|
||||
- Updated the doc structure and minor language fixes
|
||||
|
||||
## 0.20.2
|
||||
- Fix text component bug with anchor being applied twice
|
||||
|
||||
2
FAQ.md
@ -36,7 +36,7 @@ To prevent that exception from happening, add the following line before calling
|
||||
|
||||
We have a few examples! The simplest of all is in [the root example folder](/example/). This folder must be called `example` and contain a single project, so it's a very simple generic example game.
|
||||
|
||||
However there is an [examples folder inside the docs](/doc/examples) that contains many more examples. Most newer features we are adding we are trying to add a specific example for that. Those are directed to specific features.
|
||||
However there is an [examples folder inside the docs](/docs/examples) that contains many more examples. Most newer features we are adding we are trying to add a specific example for that. Those are directed to specific features.
|
||||
|
||||
If you want a more full-fledged game, please check [BGUG](https://github.com/fireslime/bgug), FireSlime's open source fast paced side-scrolling platformer. It is mostly up-to-date with Flame and uses a good chunck of the featues offered by the engine. Other examples game are [feroult](https://github.com/feroult)'s [Haunt](https://github.com/feroult/haunt), which is outdated but showcases Box2D,[renancaraujo](https://github.com/renancaraujo)'s port of the [trex](https://github.com/flame-engine/trex-flame) chrome game in Flame, and also [Bob Box](https://github.com/fireslime/bounce_box), which is easy to grasp and a good display of our core features.
|
||||
|
||||
|
||||
18
README.md
@ -6,19 +6,19 @@
|
||||
|
||||
A minimalist Flutter game engine.
|
||||
|
||||
Any help is appreciated! Comment, suggestions, issues, PR's! Give us a star to help!
|
||||
Any help is appreciated! Comments, suggestions, issues, PRs! Give us a star to show your support!
|
||||
|
||||
## Help
|
||||
|
||||
We have a Flame help channel on Fireslime's Discord, join it [here](https://discord.gg/pxrBmy4). Also we now have a [FAQ](FAQ.md), so please search your questions there first.
|
||||
We have a Flame help channel on Fireslime's Discord, join it [here](https://discord.gg/pxrBmy4). Also we now have a [FAQ](FAQ.md), so please search for your question there first.
|
||||
|
||||
## Goals
|
||||
|
||||
The goal of this project is to provided a complete set of out-of-the-way solutions for the common problems every game developed in Flutter will share.
|
||||
The goal of this project is to provide a complete set of out-of-the-way solutions for the common problems every game developed in Flutter will share.
|
||||
|
||||
Currently it provides you with: a few utilities, images/sprites/sprite sheets, audio, a game loop and a component/object system.
|
||||
Currently it provides you with: a few utilities, images/sprites/sprite sheets, audio, a physics engine, a game loop and a component/object system.
|
||||
|
||||
You can use whatever ones you want, as they are all somewhat independent.
|
||||
You can use whichever ones you want, as they are all somewhat independent.
|
||||
|
||||
## Support
|
||||
|
||||
@ -26,7 +26,7 @@ Support us by becoming a patron on Patreon
|
||||
|
||||
[](https://www.patreon.com/fireslime)
|
||||
|
||||
Or making a single donation buying us a coffee:
|
||||
Or making a single donation by buying us a coffee:
|
||||
|
||||
[](https://www.buymeacoffee.com/fireslime)
|
||||
|
||||
@ -44,7 +44,7 @@ You can also show support by showing on your repository that your game is made w
|
||||
|
||||
## Contributing
|
||||
|
||||
Found a bug on Flame and want to contribute with a PR? PRs are always very welcome, just be sure to create your PR from the `develop` branch.
|
||||
Found a bug in Flame and want to contribute with a PR? PRs are always very welcome, just be sure to create your PR from the `develop` branch.
|
||||
|
||||
## Getting started
|
||||
|
||||
@ -61,7 +61,9 @@ We also offer a curated list of Games, Libraries and Articles over at [awesome-f
|
||||
|
||||
## Documentation
|
||||
|
||||
The complete documentation can be found [here](doc/README.md).
|
||||
The complete documentation can be found [here](docs/README.md).
|
||||
|
||||
A lot of examples of different features can be found [here](docs/examples) and a good starting example can be found [here](./example).
|
||||
|
||||
A very cool docs site can be found [here](https://flame-engine.org/).
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"path_provider","dependencies":[]}]}
|
||||
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 14 MiB After Width: | Height: | Size: 14 MiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -1,6 +1,19 @@
|
||||
# Audio
|
||||
|
||||
To play an audio, it's really simple! Just run, at any moment:
|
||||
To play an audio is really simple!
|
||||
|
||||
Start by adding an entry in your `pubspec.yaml` for each file you want to use (and make sure at the files exist in path that you provide).
|
||||
|
||||
For the examples below, your `pubspec.yaml` file needs to contain something like this:
|
||||
|
||||
```yaml
|
||||
flutter:
|
||||
assets:
|
||||
- assets/audio/explosion.mp3
|
||||
- assets/audio/music.mp3
|
||||
```
|
||||
|
||||
Then simply run:
|
||||
|
||||
```dart
|
||||
import 'package:flame/flame.dart';
|
||||
@ -43,14 +43,14 @@ The `onDestroy` method can be overridden to run code before the component is rem
|
||||
|
||||
There are also other implementations:
|
||||
|
||||
* The `AnimationComponent` takes an `Animation` object and renders a cyclic animated sprite (more details about Animations [here](/doc/images.md#Animation))
|
||||
* The `AnimationComponent` takes an `Animation` object and renders a cyclic animated sprite (more details about Animations [here](/docs/images.md#Animation))
|
||||
* The `SvgComponent` takes an `Svg` object and renders the SVG on the game
|
||||
* The `ParallaxComponent` can render a parallax background with several frames
|
||||
* The `Box2DComponent`, that has a physics engine built-in (using the [Box2D](https://github.com/google/box2d.dart) port for Dart)
|
||||
|
||||
## Animation Component
|
||||
|
||||
This component uses an instance of the [Animation](/doc/images.md#Animation) class to represent a Component that has a sprite that runs a single cyclic animation.
|
||||
This component uses an instance of the [Animation](/docs/images.md#Animation) class to represent a Component that has a sprite that runs a single cyclic animation.
|
||||
|
||||
This will create a simple three frame animation
|
||||
|
||||
@ -59,7 +59,7 @@ This will create a simple three frame animation
|
||||
this.player = AnimationComponent(64.0, 64.0, new Animation.spriteList(sprites, stepTime: 0.01));
|
||||
```
|
||||
|
||||
If you have a sprite sheet, you can use the `sequenced` constructor, identical to the one provided by the `Animation` class (check more details in [the appropriate section](/doc/images.md#Animation)):
|
||||
If you have a sprite sheet, you can use the `sequenced` constructor, identical to the one provided by the `Animation` class (check more details in [the appropriate section](/docs/images.md#Animation)):
|
||||
|
||||
```dart
|
||||
this.player = AnimationComponent.sequenced(64.0, 64.0, 'player.png', 2);
|
||||
@ -80,7 +80,7 @@ This component uses an instance of `Svg` class to represent a Component that has
|
||||
|
||||
## FlareAnimation Component
|
||||
|
||||
This component wraps an instance of the [FlareAnimation](/doc/images.md#FlareAnimation), it receives the filename of the Flare animation file, which animation from that file you want to use, and the `width` and `height` of the rendered animation.
|
||||
This component wraps an instance of the [FlareAnimation](/docs/images.md#FlareAnimation), it receives the filename of the Flare animation file, which animation from that file you want to use, and the `width` and `height` of the rendered animation.
|
||||
|
||||
```dart
|
||||
final fileName = "assets/Bob_Minion.flr";
|
||||
@ -96,7 +96,7 @@ This component wraps an instance of the [FlareAnimation](/doc/images.md#FlareAni
|
||||
|
||||
You can also change the current playing animation using the `updateAnimation` method.
|
||||
|
||||
For a working example, check this [source file](/doc/examples/flare/lib/main_component.dart).
|
||||
For a working example, check this [source file](/docs/examples/flare/lib/main_component.dart).
|
||||
|
||||
## Composed component
|
||||
|
||||
@ -179,7 +179,7 @@ Once you are done with setting the parameters to your needs, render the Parallax
|
||||
Like the AnimationComponent, even if your parallax is static, you must call update on this component, so it runs its animation.
|
||||
Also, don't forget to add you images to the `pubspec.yaml` file as assets or they wont be found.
|
||||
|
||||
An example implementation can be found in the [examples directory](/doc/examples/parallax).
|
||||
An example implementation can be found in the [examples directory](/docs/examples/parallax).
|
||||
|
||||
## Box2D Component
|
||||
|
||||
@ -195,7 +195,7 @@ You can see a more complete example of box2d usage on [this WIP game](https://gi
|
||||
|
||||
Currently we have a very basic implementation of a Tiled component. This API uses the lib [Tiled](https://github.com/feroult/tiled.dart) to parse map files and render visible layers.
|
||||
|
||||
A example of how to use the API can be found [here](/doc/examples/tiled).
|
||||
A example of how to use the API can be found [here](/docs/examples/tiled).
|
||||
|
||||
# Nine Tile Box Component
|
||||
|
||||
@ -211,6 +211,6 @@ Check the example app `nine_tile_box` details on how to use it.
|
||||
|
||||
## Effects
|
||||
|
||||
Flame provides a set of effects that can be applied to a certain type of components, these effects can be used to animate some properties of your components, like position or dimensions. You can check the list of those effects [here](/doc/effects)
|
||||
Flame provides a set of effects that can be applied to a certain type of components, these effects can be used to animate some properties of your components, like position or dimensions. You can check the list of those effects [here](/docs/effects)
|
||||
|
||||
Examples of the running effects can be found [here](/doc/examples/effects.md);
|
||||
Examples of the running effects can be found [here](/docs/examples/effects.md);
|
||||
@ -4,4 +4,4 @@ Flame provides some features for debugging, these features are enabled when the
|
||||
|
||||
BaseGame will also start record the fps when in debug mode, you can access the current fps by using the method `fps`.
|
||||
|
||||
To see an working example of the debugging features, [check this example](/doc/examples/debug).
|
||||
To see an working example of the debugging features, [check this example](/docs/examples/debug).
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |