All Projects → active-logic → Xgoap

active-logic / Xgoap

Licence: mit
Goal oriented action planning beyond GOAP

Projects that are alternatives of or similar to Xgoap

Spheredissolve
Customizable procedural spherical dissolve shader for Unity3D, for all your customizable procedural spherical dissolve needs!
Stars: ✭ 311 (+677.5%)
Mutual labels:  unity3d, gamedev
Holoshield
Highly customizable sci-fi shield / force field shader for Unity3D. Allows you to set edge power & color, inner texture scrolling, waviness, scale pulsation and procedural intensity noise. Implements tessellation for low-poly base meshes.
Stars: ✭ 401 (+902.5%)
Mutual labels:  unity3d, gamedev
Game Networking Resources
A Curated List of Game Network Programming Resources
Stars: ✭ 4,208 (+10420%)
Mutual labels:  unity3d, gamedev
Noteeditor
Note editor for rhythm games.
Stars: ✭ 216 (+440%)
Mutual labels:  unity3d, gamedev
Radialprogressbar
Customizable radial progress bar shader for Unity3D. Allows you to set arc range, minimum and maximum colors, textures, radius, and a few more things. Create HP Bars, Speedometers, rank progress, etc!
Stars: ✭ 714 (+1685%)
Mutual labels:  unity3d, gamedev
Cradle
Play Twine stories in Unity.
Stars: ✭ 242 (+505%)
Mutual labels:  unity3d, gamedev
Enhancer
A collection of utilities to enhance the Unity Editor
Stars: ✭ 394 (+885%)
Mutual labels:  unity3d, gamedev
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (+325%)
Mutual labels:  unity3d, gamedev
Texturepanner
This repository hosts a shader for Unity3D whose main goal is to facilitate the creation of neon-like signs, conveyor belts and basically whatever based on scrolling textures
Stars: ✭ 528 (+1220%)
Mutual labels:  unity3d, gamedev
Consolation
In-game debug console for Unity.
Stars: ✭ 489 (+1122.5%)
Mutual labels:  unity3d, gamedev
Unity Shaders
✨ Shader demo - More than 300 examples
Stars: ✭ 198 (+395%)
Mutual labels:  unity3d, gamedev
Voxelengine unity
Voxel engine made in C# for Unity
Stars: ✭ 25 (-37.5%)
Mutual labels:  unity3d, gamedev
Deadsimple Pixel Perfect Camera
An exceedingly easy-to-use pixel perfect orthographic camera script for 2D scenes in Unity. Punch in a few specs and you've got a working pixel perfect camera. It's that easy.
Stars: ✭ 186 (+365%)
Mutual labels:  unity3d, gamedev
Noahgameframe
A fast, scalable, distributed game server engine/framework for C++, include the actor library, network library, can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua script/ Unity3d, Cocos2dx and plan to support Unreal.
Stars: ✭ 3,258 (+8045%)
Mutual labels:  unity3d, gamedev
Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (+335%)
Mutual labels:  unity3d, gamedev
Unity2d Components
A constantly evolving array of Unity C# components for 2D games, including classes for pixel art cameras, events & messaging, saving & loading game data, collision handlers, object pools, and more.
Stars: ✭ 375 (+837.5%)
Mutual labels:  unity3d, gamedev
Swissarmylib
Collection of helpful utilities we use in our Unity projects.
Stars: ✭ 154 (+285%)
Mutual labels:  unity3d, gamedev
Awesome Opensource Unity
a list of curated opensource Unity packages for future proof Game Developers
Stars: ✭ 161 (+302.5%)
Mutual labels:  unity3d, gamedev
Verticaldissolve
Procedural vertical dissolve shader. Highly customizable. Tweak edge color, noisiness & waviness, rim light, emission scrolling and more.
Stars: ✭ 434 (+985%)
Mutual labels:  unity3d, gamedev
Utymap
Highly customizable library for procedural world generation based on real map data
Stars: ✭ 825 (+1962.5%)
Mutual labels:  unity3d, gamedev

Pre-release - APIs are more likely to change during the pre-release period.

Build Status codecov

Beyond G.O.A.P

A fresh take on Goal oriented action planning.

In GOAP, actions have preconditions, effects, and a cost. Boilerplate? Have a look.

public Cost ChopLog(){
    if(!hasAxe) return false;  // Precondtion
    hasFirewood = true;        // Effect
    return 4;                  // Cost
}

Use A* or, if no cost function available, BFS.

  • Engine agnostic models - test without pain.
  • .NET Core compatible
  • Unity integration with UPM support
  • Demo project to help you get started
  • [COMING SOON] integration with the BT Framework of Awesome, Active Logic 🚀

Install

Clone the repository and add the package to your project as normal.

For Unity 3D:

  • Add xgoap/package.json via package manager > + > add package from disk.
  • Alternatively, add "com.activ.goap": "https://github.com/active-logic/xgoap.git" to Packages/manifest.json

Getting started

Planning requires a model and a goal; if available, also provide a heuristic. I will borrow Brent Owens' woodcutter example.

A woodcutter has the GetAxe, ChopLog and CollectBranches actions. Here is our implementation of the woodcutter planning model:

using Activ.GOAP;

public class WoodChopper : Agent, Clonable<WoodChopper>{

    public bool hasAxe, hasFirewood;
    Option[] opt;  // Caching reduces array alloc overheads

    public Option[] Options()
    => opt = opt ?? new Option[]{ ChopLog, GetAxe, CollectBranches };

    public Cost GetAxe(){
        if(hasAxe) return false;
        hasAxe = true;
        return 2;
    }

    public Cost ChopLog() => hasAxe ? (Cost)(hasFirewood = true, 4f) : (Cost)false;

    public Cost CollectBranches() => (hasFirewood = true, 8);

    // Clonable<WoodChopper>

    public WoodChopper Allocate() => new WoodChopper();

    public WoodChopper Clone(WoodChopper x){
        x.hasAxe      = hasAxe;
        x.hasFirewood = hasFirewood;
        return x;
    }

    // Override for correctness (don't compare refs) and faster hashes

    override public bool Equals(object other) => other is WoodChopper that
        && hasAxe == that.hasAxe && hasFirewood == that.hasFirewood;

    override public int GetHashCode() => (hasAxe ? 1 : 0)
                                       + (hasFirewood ? 2 : 0);

}

Run the model and get the next planned action:

var chopper = new WoodChopper();
var solver  = new Solver<WoodChopper>();
var next    = solver.Next(chopper, goal: (x => x.hasFirewood, null));

Parametric actions are supported; they are concise and type safe. Check the Baker example.

Quick and simple Unity integration via GameAI.cs - for details, read here.

Ready to GOAP? Follow the guide.

Getting involved

If you'd like to get involved, consider opening (or fixing) an issue. Your support is appreciated!

Send a tip

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].