{"id":15722626,"url":"https://github.com/insality/defold-adam","last_synced_at":"2025-05-13T04:37:10.986Z","repository":{"id":53000160,"uuid":"315072953","full_name":"Insality/defold-adam","owner":"Insality","description":"The FSM plugin for Defold to describe states like Playmaker in Unity with predefined actions","archived":false,"fork":false,"pushed_at":"2021-10-30T08:41:19.000Z","size":380,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T22:32:42.553Z","etag":null,"topics":["architecture","defold","defold-library","defold-module","fsm"],"latest_commit_sha":null,"homepage":"https://insality.github.io/defold-adam/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Insality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T15:47:01.000Z","updated_at":"2025-02-05T21:51:09.000Z","dependencies_parsed_at":"2022-09-08T03:22:30.046Z","dependency_job_id":null,"html_url":"https://github.com/Insality/defold-adam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-adam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-adam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-adam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-adam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Insality","download_url":"https://codeload.github.com/Insality/defold-adam/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877362,"owners_count":21977634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","defold","defold-library","defold-module","fsm"],"created_at":"2024-10-03T22:08:40.666Z","updated_at":"2025-05-13T04:37:10.965Z","avatar_url":"https://github.com/Insality.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DEVELOPMENT CANCELED\nThis project was canceled. The experiment wasn't successful for me. Even it can be good for visual programming, it not worth without it.\n\nThe state machine here is powerful and easy describing, but better use simple library with any other fsm.\n\n---\n\n![](media/adam-logo.png)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/insality/defold-adam/Run%20tests)](https://github.com/Insality/defold-adam/actions)\n[![codecov](https://codecov.io/gh/Insality/defold-adam/branch/main/graph/badge.svg?token=VIN9pcSlpF)](https://codecov.io/gh/Insality/defold-adam)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/insality/defold-adam)\n---\nThe FSM plugin for Defold to describe states like Playmaker in Unity with predefined actions\n\n\n## Features\n\nDefold Adam has next features:\n\n- **Powerful** Finite State Machine to describe any behaviour you want\n- **Easy to start**: A lot of predefined actions with good API reference and annotations\n- **Enough for game**: Ability to build any game logic just via state machine (like Playmaker and Bolt in Unity)\n- **Rich features**: reusable action templates and nested FSM\n- **Comfort**: Any action describes in one line of code. It provides fast developing, easy reading and less bugs\n- **Performance**: Good performance even with a lot of instances of FSM\n- **Visual Editor**: not provided now, but who knows?\n- **Code as Data**: Ability to load your FSM as JSON (from resources, from web, etc). _Need visual editor to make it_ :)\n\n\n## Setup\n\n### Dependency\n\nYou can use the **Defold-Adam** extension in your own project by adding this project as a [Defold library dependency](https://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:\n\n\u003e [https://github.com/Insality/defold-adam/archive/main.zip](https://github.com/Insality/defold-adam/archive/main.zip)\n\nOr point to the ZIP file of a [specific release](https://github.com/Insality/defold-adam/releases).\n\n\n## Basic usage\n\nTo use **Adam**, you should do next:\n\n- Describe your states with actions via create State instances: `adam.state`\n\n- Describe transitions between states via create Adam instances: `adam.new`\n\nThe basic code looks like this:\n```lua\nlocal adam = require(\"adam.adam\")\nlocal actions = require(\"adam.actions\")\n\nfunction init(self)\n    -- Empty state\n    local initial = adam.state()\n\n    -- The state with one instant action\n    local hello = adam.state(\n        actions.debug.print(\"Hello guys\")\n    )\n\n    -- The Adam instance itself\n    self.adam = adam.new(initial,\n        {\n            {initial, hello, adam.FINISHED}  -- Third parameter is optional, it's adam.FINISHED by default\n        }\n    )\n    self.adam:start()\nend\n\nfunction final(self)\n\tself.adam:final() --- The final call is important!\nend\n\nfunction update(self, dt)\n\tself.adam:update(dt) --- The update call is important!\nend\n\n```\n\n\n## Custom actions\n\nShort description how to create your custom actions and how to use it in code. Full instruction in other document\n\n\n## Learn more\n\n- [Core Concepts \u0026\u0026 Glossary](docs_md/01-core-concepts.md)\n- [States](docs_md/02-states.md)\n- [Events](docs_md/03-events.md)\n- [Actions](docs_md/04-actions.md)\n- [Variables](docs_md/05-variables.md)\n- [Custom Actions](docs_md/06-custom-actions.md)\n- [Template Actions](docs_md/07-template-actions.md)\n- [Nested State Machines](docs_md/08-nested-fsm.md)\n- [JSON representation](docs_md/09-json-format.md)\n- [EmmyLua annotations](docs_md/10-emmylua.md)\n- [Performance](docs_md/11-performance.md)\n- [Usage examples](docs_md/12-examples.md)\n- [FAQ](docs_md/13-faq.md)\n- [Tips](docs_md/14-tips.md)\n\n\n## Examples\n\nList of created examples and their code from `/examples`\n\n\n## License\n\nDeveloped and supported by [Insality](https://github.com/Insality)\n\n---\n\nUsed libraries:\n\n- [lua-fsm](https://github.com/unindented/lua-fsm)\n- [middleclass](https://github.com/kikito/middleclass)\n\n\n## Issues and suggestions\n\nIf you have any issues, questions or suggestions please [create an issue](https://github.com/Insality/defold-adam/issues) or contact me: [insality@gmail.com](mailto:insality@gmail.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsality%2Fdefold-adam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsality%2Fdefold-adam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsality%2Fdefold-adam/lists"}