Coder Social home page Coder Social logo

werewolf-engine's Introduction

Werewolf engine

This is an unfinished attempt at a Werewolf engine according to these rules built for a very specific purpose that is a GM assistant app. This GM assistant app will be built afterwards using flutter_rust_bridge and has the following tasks:

  • make it hard to forget things
  • keep track of / alert at edge cases
  • keep history of events

Design

In order to achieve the goals I set myself for the assistant app, I will be trying to adhere to these design guidelines:

  • All state is immutable. Advancing the game results in a new game state as opposed to modifying the current one.
  • Follow the feel of finite state machines even though they won't suffice for this task.
  • General process when using the engine: build initial state (players, roles, factions, etc.), query which input type needs to be submitted next, submit input (will output a new immutable state), repeat.
  • The previous point also ties into the hierarchy of responsibilities. I don't want the engine to ask for input by calling a provided function or interface because in the case of the assistant app that would mean rendering UI, receving input from there and returning that all in one call (or do crazy async stuff). Either way I'd like to keep UI = fn(state).

Notes

  • This is my first real project with Rust.
  • I am much more comfortable with C# than with Rust so I'll prototype the engine in C# before attempting it in Rust. I'd still like to do it in Rust because that basically runs everywhere and is much simpler to embed than C#. Of course I could use MAUI to create the app but frankly I started this whole thing because I wanted to create something useful with flutter.
  • I may decide to create a more general engine later on.
  • I do have some ideas for the far future like a lua integration to write custom roles etc. but I am trying very hard to ignore these for the time being.

License

AGPL for now but I might change that at a later stage. If I do switch, I'll make sure that you can still

  • create your own characters, rules and adjustments
  • create a free api, app, website, tool or anything that uses the library and do whatever with it (publish, keep, ..)
  • create a paid/commercial api, app, website, tool or anything that uses the library and do whatever with it (publish, keep, ..)

and I will also always require you to (at the very least)

  • publish the changes you make to the library (weakest copyleft I'll probably consider is MPL, up to AGPL)

werewolf-engine's People

Contributors

joelius300 avatar

Watchers

 avatar  avatar  avatar

werewolf-engine's Issues

Notes

Collection of random thoughts about the project so I can write them down and move on to more pressing matters :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.