Push Down Automata

An asset by batomow
The page banner background of a mountain and forest
Push Down Automata hero image

Quick Information

0 ratings
Push Down Automata icon image
batomow
Push Down Automata

A super easy and flexible PDA implementation. A PDA is basically a finite state machine with a stack. Just add the Machine node and fill in the export options. A relative dependency is a child of the entity. Just type the name of the child in the inspector like so: "AnimationPlayer". A global dependency can be any node, just tap de exported NodePath and select a node. If your Machine node is a child of the entity you can use whichever method you prefer. To add a new state, create a new script that inherits anything. Just use one of the templates. I recommend starting with the tutorial one. For animations to work, just add any dependency of type AnimationPlayer. The state buffer ensures that the stack never grows too large. (Just a buffer_size of 3 should be enough tho)You can reference your dependencies (nodes in the scene tree) by just declaring them in the state script in snake case (e.g. animation_player), just name them in the regular PascalCase convention in the scene tree. Your state names match your script name, just use PascalCase. (e. g. `push_state('Idle')` )

Supported Engine Version
3.3
Version String
1.2
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

A super easy and flexible PDA implementation.
A PDA is basically a finite state machine with a stack.
Just add the Machine node and fill in the export options.
A relative dependency is a child of the entity. Just type the name of the child in the inspector like so: "AnimationPlayer".
A global dependency can be any node, just tap de exported NodePath and select a node. If your Machine node is a child of the entity you can use whichever method you prefer.
To add a new state, create a new script that inherits anything.
Just use one of the templates. I recommend starting with the tutorial one.
For animations to work, just add any dependency of type AnimationPlayer.
The state buffer ensures that the stack never grows too large. (Just a buffer_size of 3 should be enough tho)
You can reference your dependencies (nodes in the scene tree) by just declaring them in the state script in snake case (e.g. animation_player), just name them in the regular PascalCase convention in the scene tree.
Your state names match your script name, just use PascalCase. (e. g. `push_state('Idle')` )

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Push Down Automata icon image
batomow
Push Down Automata

A super easy and flexible PDA implementation. A PDA is basically a finite state machine with a stack. Just add the Machine node and fill in the export options. A relative dependency is a child of the entity. Just type the name of the child in the inspector like so: "AnimationPlayer". A global dependency can be any node, just tap de exported NodePath and select a node. If your Machine node is a child of the entity you can use whichever method you prefer. To add a new state, create a new script that inherits anything. Just use one of the templates. I recommend starting with the tutorial one. For animations to work, just add any dependency of type AnimationPlayer. The state buffer ensures that the stack never grows too large. (Just a buffer_size of 3 should be enough tho)You can reference your dependencies (nodes in the scene tree) by just declaring them in the state script in snake case (e.g. animation_player), just name them in the regular PascalCase convention in the scene tree. Your state names match your script name, just use PascalCase. (e. g. `push_state('Idle')` )

Supported Engine Version
3.3
Version String
1.2
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers