Skip to content

Commit

Permalink
Badges + another library for HTNs
Browse files Browse the repository at this point in the history
  • Loading branch information
victorb committed Aug 10, 2024
1 parent 36f9c2f commit 45b80ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Data-Oriented, Goal-Oriented Action Planning
# Data-Oriented GOAP (Goal-Oriented Action Planning)
> AKA DOGOAP - GOAP implemented in data-oriented way to facilitate dynamically setting up states/actions/goals rather than only at compile-time
> Includes bevy_dogoap which provides a neat Bevy integration of the dogoap library
[![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/victorb/dogoap#License)
[![Crates.io](https://img.shields.io/crates/v/dogoap.svg)](https://crates.io/crates/dogoap)
[![Downloads](https://img.shields.io/crates/d/dogoap.svg)](https://crates.io/crates/dogoap)
[![Docs](https://docs.rs/dogoap/badge.svg)](https://docs.rs/dogoap/latest/dogoap/)
[![ci](https://github.com/victorb/dogoap/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/victorb/dogoap/actions/workflows/ci.yml)

## Documentation

- [`dogoap`](./crates/dogoap/README.md) docs - Standalone library for creation actions, states and goals to be used with the provided planner
Expand All @@ -12,6 +18,7 @@

- https://github.com/skyne98/soap - A lot of inspiration taken from this repository, biggest difference is the data-oriented structure that dogoap has
- https://github.com/dmackdev/bevy_goap - Native Bevy GOAP library, API interface isn't ideal though
- https://github.com/QueenOfSquiggles/bevy_htnp - Native Bevy HTN (Hierarchical Task Network) library

## License

Expand Down
25 changes: 11 additions & 14 deletions crates/bevy_dogoap/examples/resman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,24 @@

/* Sequence Diagram for the full flow of actions (paste into https://sequencediagram.org/)
Customer->Customer: Check thirst
Customer->Serve Desk: GoToServeDesk
Worker->Serve Desk: GoToServeDesk
Customer->Serve Desk: Create Order
Worker->Lemonade Maker: Produce Lemonade
Lemonade Maker->Worker: Produced Lemonade
Worker->Serve Desk: Complete Order
Customer<-Serve Desk: Pickup Order
Customer->Customer: Drink Lemonade
Customer->Order Desk: GoToOrderDesk
Order Desk->Worker: RequestWorker
Worker->Order Desk: GoToOrderDesk
Customer->Order Desk: PlaceOrder
Worker->Order Desk: TakeOrder
Customer->Order Desk: WaitForOrder
Worker->Lemonade Maker: GoToLemonadeMaker
Lemonade Maker->Worker: MakeLemonade
Worker->Order Desk: FinishOrder
Customer->Order Desk: PickupLemonade
Customer->Customer: DrinkLemonade
*/

use std::collections::{HashMap, VecDeque};

use bevy::{color::palettes::css::*, input::common_conditions::input_toggle_active, prelude::*};
use bevy_dogoap::prelude::*;
use bevy_inspector_egui::quick::WorldInspectorPlugin;

fn main() {
let mut app = App::new();
Expand Down Expand Up @@ -80,7 +78,6 @@ fn main() {
..default()
}))
.add_plugins(DogoapPlugin)
.add_plugins(WorldInspectorPlugin::default().run_if(input_toggle_active(false, KeyCode::KeyI)))
.add_systems(Startup, setup)
.add_systems(Update, (draw_state_debug, draw_ui))
// Systems that always affects needs
Expand Down

0 comments on commit 45b80ff

Please sign in to comment.