Flame behaviors used to organically manage the movement of an entity. Built by Very Good Ventures 🦄

Overview

Steering Behaviors

Very Good Ventures Very Good Ventures

Developed with 💙 by Very Good Ventures 🦄

ci coverage pub package style: very good analysis License: MIT Powered by Flame


An implementation of steering behaviors for Flame Behaviors. See Steering Behaviors For Autonomous Characters by Craig Reynolds for an in-depth explanation


Installation đź’»

flutter pub add steering_behaviors

Usage ✨

This package is built on top of the flame_behaviors, if you are not yet familiar with it, we recommend reading up on the documentation of that package first.

Steerable

If you want to apply steering behaviors to your entities you have to add the Steerable mixin to your entity class:

class MyEntity extends Entity with Steerable {
  /// Provide the max velocity this entity can hold.
  double get maxVelocity => 100;

  ...
}

The Steerable mixin provides a velocity value to your entity, this velocity will then be applied on each update cycle to your entity until the velocity becomes zero.

Steering Behaviors

Each algorithm defined by this project is available as a Behavior and you can add them to your steerable entities as you would with any behavior:

class MyEntity extends Entity with Steerable {
  MyEntity() : super(
    behaviors: [
      WanderBehavior(
        circleDistance: 200,
        maximumAngle: 45 * degrees2Radians,
        startingAngle: 0,
      )
    ]
  );

  ...
}

Some steering behaviors require information that is not always available on entity creation, when that happens we recommend using the entity's onLoad method:

class MyEntity extends Entity with Steerable {
  ...

  @override
  Future<void> onLoad() async {
    world.children.register<MyOtherEntity>();
    await add(
      SeparationBehavior(
        world.children.query<MyOtherEntity>(),
        maxDistance: 25,
        maxAcceleration: 1000,
      ),
    );
  }

  ...
}
Comments
Owner
Very Good Open Source
Open source code from Very Good Ventures (@VGVentures)
Very Good Open Source
A Very Good Dart Package Template created by the Very Good Ventures Team 🦄

Very Good Dart Package Developed with ?? by Very Good Ventures ?? A Very Good Dart package created by Very Good Ventures ?? . Getting Started ?? Insta

Very Good Open Source 8 Aug 14, 2022
A Very Good Flutter Package Template created by the Very Good Ventures Team 🦄

Very Good Flutter Package Developed with ?? by Very Good Ventures ?? A Very Good Flutter package created by Very Good Ventures ?? . Getting Started ??

Very Good Open Source 32 Dec 13, 2022
A Very Good Dart CLI Template created by the Very Good Ventures Team 🦄

Very Good Dart CLI Developed with ?? by Very Good Ventures ?? A Dart CLI template created by the Very Good Ventures Team. Generated by the Very Good C

Very Good Open Source 26 Dec 15, 2022
An implementation of the behavioral composition pattern for Flame. Built by Very Good Ventures 🦄

Flame Behaviors Developed with ?? by Very Good Ventures ?? An implementation of the behavioral composition pattern for Flame. Installation ?? flutter

Very Good Open Source 35 Jan 2, 2023
Simple and fast Entity-Component-System (ECS) library written in Dart.

Fast ECS Simple and fast Entity-Component-System (ECS) library written in Dart. CPU Flame Chart Demonstration of performance for rotation of 1024 enti

Stanislav 8 Nov 16, 2022
An example Flutter application built with Very Good CLI and Supabase 🦄

Supabase Example Generated by the Very Good CLI ?? An example Flutter application built with Very Good CLI and Supabase ?? Getting Started ?? This pro

Very Good Ventures 46 Dec 27, 2022
A Very Good Blog App using Flutter, flutter_bloc, django rest framework for backend✨

Very Good Blog App - Blog sharing Features Login, register, manage personal information. Compose, edit, post blog to share with everyone. Like, save b

Nguyen Minh Dung 14 Nov 27, 2022
Notes is a good helper to manage your schedules and notes

Notes is a good helper to manage your schedules and notes. It gives you a quick and simple notepad editing experience when you write notes, memo, email, message, shopping list and to do list. It makes to take a note easier than any other notepad and memo apps.

thejorabek 11 Nov 16, 2022
An application used to manage all your tabs in a clean, scrollable, categorized format.

Tabmanager Created by Sami-ul You can contact me here: [email protected] Recent updates Made the app run faster by using the backend to serve t

Sami 7 Nov 2, 2022
Do more - A good looking glorified todo list built with flutter.

do_more (DO>) A glorified todo list with a beautiful ui. Login with Google Events Organize your tasks by events, visualize them in their page and add

Mariano Uvalle 28 Nov 22, 2022
Bill Splitting App 💵 with Good UX and Design 👨🏻‍🎨 built with Flutter. 🚀

Splitty: Bill Splitting App Link Idea ?? Create App where we can create group and add members to share the bill & split the amount equally with member

Dhruvil 2 Sep 6, 2022
Find a good meeting time across multiple timezones.

meeting_scheduler Adventures in scheduling across timezones. A project by the Adventures In [Dart, Flutter, Firebase] group. Goals: Help people find a

Adventures In [Dart, Flutter, Firebase] 3 May 23, 2022
Simple and complete Flutter hooks testing utilities that encourage good testing practices.

Flutter Hooks Testing Library Simple and complete Flutter hooks testing utilities that encourage good testing practices. Inspired by react-hooks-testi

Daichi Furiya 24 Dec 2, 2022
Masked text field - A flutter package for masked text field for formet your text and good UI

Masked Text Field Masked Text Field Features A package for masked text field for

Alok Dubey 7 Sep 4, 2022
(RPG maker) Create RPG-style or similar games more simply with Flame.

Bonfire Build RPG games and similar with the power of FlameEngine! Bonfire is ideal for building games from the following perspectives: Test our onlin

Rafael Almeida Barbosa 787 Jan 7, 2023
An app that helps you manage your Postcard Creator orders. Built with Flutter

mailman A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Dario Breitenstein 0 Jan 10, 2022
Group25 - A poultry farm management app built to help farmers manage poultry releated farm activies

poultry A poultry farm management app built to help farmers manage poultry relea

null 0 Feb 15, 2022
A simple to-do list built using flutter based on BLoC state management to manage your daily tasks .

?? Table of Contents About ScreenShots from the app Demo vedio Contributors About A to-do list flutter app to manage your daily tasks. it is built bas

Heba Ashraf 6 Oct 12, 2022