Radiance - Dart port of gdx-ai

Related tags

Templates radiance
Overview

⚠️ This package is currently under development.

This library is a collection of AI algorithms used in games. This includes:

  • Steering behaviors (NYI)
  • Flocking behaviors (NYI)
  • Pathfinding (NYI)

Steering

The set of steering behaviors used in many modern game engines: lib-GDX, Unity (also 2), ROYGBIV, Godot. All these libraries share the same ancestry: they originate from the work of Craig Reynolds originally published in 1999. This library implements the same algorithms in Dart language.

Comments
  • test: Added closeToVector utility function

    test: Added closeToVector utility function

    I wasn't able to use new version of flame_test, because it depends on Flutter SDK, and we want Radiance to be a pure-Dart project.

    The interim solution is to simply copy the closeToVector method over from flame_test, and use that. In the future we might be able to use flame_test directly.

    opened by st-pasha 2
  • Added Separation behavior

    Added Separation behavior

    Added seperation feature, check it!

    Recording :

    https://user-images.githubusercontent.com/96647299/195695451-bffcef73-4d95-463e-a67c-a42bcb23cc1a.mp4

    Thank you.

    Closes #18

    opened by Perumallpardhiv 1
  • feat: Seek behavior

    feat: Seek behavior

    This is a somewhat preliminary implementation of the Seek behavior for two different types of Kinematics.

    Examples/tests will be added later, when I figure out a system for them.

    opened by st-pasha 1
  • feat: LightKinematics agent always faces the direction where it is moving

    feat: LightKinematics agent always faces the direction where it is moving

    • Agents with LightKinematics will now always face the direction of their velocity.
    • Seek behavior for LightKinematics agents will now stop at the target without changing the orientation.
    • Reducing maxSpeed of a LightKinematics agent will now also scale down its velocity.
    • Field Kinematics.own renamed into owner.
    • Fixed angle calculations in Sandbox.
    • Cloning of Kinematics objects removed (since it cannot be adequately expanded to cloning of behaviors).
    opened by st-pasha 0
  • feat: Improve presets in sandbox

    feat: Improve presets in sandbox

    • Added LightEntity (with LightKinematics)
    • Added several more presets
    • Scenes can now be explicitly saved/restored
    • Removed cloning of entities

    A few notes on the design of Scene class, concerning the ability to "reset" the scene to its initial state how it was at the beginning of a simulation:

    • At first I thought we will have scene factories, i.e. a preset will not contain a scene but rather a function to create a new scene from scratch. This works fine, except when we want to have an "editable scene" functionality in the future;
    • Then I wanted scenes to be clone-able, so that at the start of the simulation we would clone the currently selected preset, and run simulation on the clone. Unfortunately, cloning proved to be hard, especially for entities that have behaviors targeting other entities. The targets for behaviors are declared final so cannot be reassigned, and for a good reason: a behavior may need to perform some initialization work depending on the target;
    • The final solution is to save the "state" of each entity at the start of a simulation, and then later revert to that state. So far I don't see any problems with this approach.
    opened by st-pasha 0
  • feat: Add display of velocity/acceleration vectors in sandbox

    feat: Add display of velocity/acceleration vectors in sandbox

    There is now a button in the top menu that toggles whether those vectors are shown or not.

    In addition, sandbox Entitys and main library Kinematic objects can now be cloned.

    opened by st-pasha 0
  • chore!: Rename Kinematics classes

    chore!: Rename Kinematics classes

    Rename MaxSpeedKinematics -> LightKinematics and MaxAccelerationKinematics -> HeavyKinematics. This makes the names closer to the other kinematics classes that we plan to add in the future: PedalKinematics, CarKinematics, RobotKinematics.

    opened by st-pasha 0
  • feat(sandbox): Added top menu with control buttons

    feat(sandbox): Added top menu with control buttons

    This adds several control buttons at the top of the Sandbox widget: to start/pause/stop the simulation. More buttons can be added in the future as needed.

    opened by st-pasha 0
  • feat: Added sandbox

    feat: Added sandbox

    This is an initial implementation of the Sandbox -- eventually it should get many more features, including the ability to create and edit scenes.

    The Sandbox is a bit like Examples book in the Flame repository, only here the ultimate goal is to allow the user to modify each scene as they see fit. In particular, this will allow the user to experiment with different settings, different mixtures of behaviors, etc.

    opened by st-pasha 0
  • Separation

    Separation

    Description of Separation from https://www.red3d.com/cwr/steer/gdc99/:

    Separation steering behavior gives a character the ability to maintain a certain separation distance from others nearby. This can be used to prevent characters from crowding together. To compute steering for separation, first a search is made to find other characters within the specified neighborhood. This might be an exhaustive search of all characters in the simulated world, or might use some sort of spatial partitioning or caching scheme to limit the search to local characters. For each nearby character, a repulsive force is computed by subtracting the positions of our character and the nearby character, normalizing, and then applying a 1/r weighting. (That is, the position offset vector is scaled by 1/r 2.) Note that 1/r is just a setting that has worked well, not a fundamental value. These repulsive forces for each nearby character are summed together to produce the overall steering force. See Figure 14:

    separation behavior

    opened by st-pasha 2
Owner
Flame Engine
2D game engine built on top of Flutter. Maintained by https://github.com/bluefireteam
Flame Engine
Dart port of FormCoreJS: A minimal pure functional language based on self dependent types.

FormCore.js port to Dart. So far only the parser and typechecker have been ported i.e. the FormCore.js file in the original repo. (Original readme fro

Modestas Valauskas 2 Jan 28, 2022
A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each with individual port and timeout. Defaults are provided for convenience.

data_connection_checker A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each

Kristiyan Mitev 103 Nov 29, 2022
A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages

kt.dart This project is a port of Kotlin's Kotlin Standard library for Dart/Flutter projects. It's a useful addition to dart:core and includes collect

Pascal Welsch 460 Jan 9, 2023
A dart port of the excellent Guard Clauses C# package by Ardalis

Guard Clauses A dart port of the excellent C# Guard Clauses package by Ardalis. A simple extensible package with guard clause extensions. A guard clau

Chris Hibler 1 Apr 15, 2022
Mysql.dart - MySQL client for Dart written in Dart

Native MySQL client written in Dart for Dart See example directory for examples

null 48 Dec 29, 2022
Docker images for the Dart programming language (https://dart.dev)

dart-docker This is the Git repo of the Docker "Official Images" for the Dart programming language. See the Docker Hub page for a full description on

Dart 49 Dec 14, 2022
A most easily usable Duolingo API wrapper in Dart. Duolingo4D is an open-sourced Dart library.

A most easily usable Duolingo API wrapper in Dart! 1. About Duolingo4D Duolingo4D is an open-sourced Dart library. With Duolingo4D, you can easily int

Kato Shinya 18 Oct 17, 2022
dna, dart native access. A lightweight dart to native super channel plugin

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.

Assuner 14 Jul 11, 2022
Dart package responsible to provide the basic resources to Lambda Functions with Clean Dart

AWS Lambda Core This package is responsible to provide the basic resources to all services; Usage pubspec.yaml dependencies: aws_lambda_core: <laste

David Araujo 1 Dec 2, 2021
A Dart client for the NATS messaging system. Design to use with Dart and Flutter.

Dart-NATS A Dart client for the NATS messaging system. Design to use with Dart and flutter. Flutter Web Support by WebSocket client.connect(Uri.parse(

Chart Chongcharoen 32 Nov 18, 2022
GitHub Action that uses the Dart Package Analyzer to compute the Pub score of Dart/Flutter packages

Dart/Flutter package analyzer This action uses the pana (Package ANAlysis) package to compute the score that your Dart or Flutter package will have on

Axel Ogereau-Peltier 45 Dec 29, 2022
Dart-com-Shelf - Web server básico feito com dart e shelf, configurações de rotas e conexão com mysql.

A server app built using Shelf, configured to enable running with Docker. This sample code handles HTTP GET requests to / and /echo/<message> Running

Luanzera07 0 Jan 3, 2022
Rock-Paper-Scissor-Game-Using-Dart - This is a repository of Rock Paper Scissor Game which I developed while learning Dart.

Rock-Paper-Scissor-Game-Using-Dart This is a repository of Rock Paper Scissor Game which I developed while learning Dart. The main.dart file consist o

Nitin Varma 0 Jan 4, 2022
Flutter Navigation - all types of navigation in flutter run main.tabBar.dart to see tabBar, and run main.dart to see the otheres

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

Michael Odumosu 0 Jan 1, 2022
Spider - A small dart library to generate Assets dart code from assets folder.

Spider A small dart library to generate Assets dart code from assets folder. It generates dart class with static const variables in it which can be us

Birju Vachhani 159 Nov 8, 2022
Tello-Dart - A testing ground for the Tello drone's socket API in dart

This packages provides a Dart interface to Ryze Tello drones. Getting started Ma

null 2 Jul 27, 2022
🎬 A movie catalog app for both Android & IOS ~ Flutter.io project in Dart | Dart, Bloc, Movies

Movie Catalog App ?? Browse through movies from the YIFY api Getting Started For help getting started with Flutter, view our online documentation. Tod

Jonas De Vrient 49 Nov 21, 2022
Socketio dart server and client - Full Socket.io implementation using Dart Lang

Getting Started Step 1: Run dart_server.dart Step 2: Android Emulator has proble

Trần Thiên Trọng 1 Jan 23, 2022
Dart wrapper via `dart:js` for webusb

Dart wrapper via dart:js for https://wicg.github.io/webusb/ Features canUseUsb g

Woodemi Co., Ltd 1 Jan 25, 2022