Skip to content

Commit

Permalink
Update version to 0.5.0 & CHANGELOG & README
Browse files Browse the repository at this point in the history
  • Loading branch information
imjp94 committed Apr 17, 2021
1 parent 805aa77 commit 22e1ab8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
27 changes: 22 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
# Changelog

## 0.5.0

- Breaking changes:
- Rename StateMachinePlayer._*_param() functions to *_nested_param()
- Features:
- Support remote debug when select StateMachinePlayer node in remote SceneTree
- View live parameters with ParameterPanel
- Visualize flow of StateMachine
- Improves:
- Add StateDirectory.goto()
- Minimize size of StateNode name edit for ease of opening nested layer
- Bugfixes:
- Fix graph content above scrollbars
- Fix StateMachineEditor & PathViewer didn't free removed child
- Fix StateMachinePlayer's nested trigger are not flushed
- Fix hard to select text in StateNode name edit

## 0.4.1

- Features:
- Add StateMachine.validate() function to identify & fix corrupted StateMachine Resource
- Add StateMachine.validate() function to identify & fix corrupted StateMachine Resource
- Improves:
- Clip FlowChartLine by connecting nodes
- Position nodes by its center
- Add transparency when dragging nodes
- Clip FlowChartLine by connecting nodes
- Position nodes by its center
- Add transparency when dragging nodes
- Bugfixes:
- Fix self connection is possible when reconnecting line
- Fix self connection is possible when reconnecting line

## 0.4.0

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# ![gd-YAFSM icon](icon.png)gd-YAFSM (**g**o**d**ot-**Y**et **A**nother **F**inite **S**tate **M**achine)

![Editor Showcase](screenshots/yafsm_editor_showcase.gif)

Designer-friendly Finite State Machine implemented in "Godotic" way

⚠️ **Warning**
Expand All @@ -25,7 +23,13 @@ Designer-friendly Finite State Machine implemented in "Godotic" way
## Feature

- Designer-friendly

![Editor Showcase](screenshots/yafsm_editor_showcase.gif)
> Design `StateMachine` in a flowchart-like editor
- Remote Debug

![Remote Debug Showcase](screenshots/yafsm_remote_debug_showcase.gif)
> Visualize flow of `StateMachine` & inspect parameters in realtime
- Self-explanatory

![Sample State Machine](screenshots/yafsm_sample_fsm.png)
Expand Down Expand Up @@ -83,7 +87,7 @@ After setup `StateMachine` with editor, you can connect to the following signals
And control `StateMachinePlayer` by accessing parameter:

```gdscript
var smp = get_node(StateMachinePlayer)
var smp = get_node("StateMachinePlayer")
smp.set_trigger("jump")
smp.set_param("jump_count", 1)
smp.get_param("on_floor", false)
Expand Down Expand Up @@ -123,7 +127,7 @@ func _on_normal_state_transited(from, to):
"Game":
print("Game")
"Exit":
print("Exit)
print("Exit")
# Handle "transited" signal
func _on_nested_state_transited(from, to):
Expand All @@ -137,7 +141,7 @@ func _on_nested_state_transited(from, to):
"Entry":
print("Game Enter") # Game/Entry
"Exit":
print("Exit)
print("Exit")
```

### Parameter
Expand All @@ -152,22 +156,27 @@ Behind the scene, `StateMachinePlayer` always differentiate parameters into 2 ty
- Erased upon Exit, for example, "App/Game/Exit" will cause all local parameter("App/Game/{param_name}") to be erased

```gdscript
var smp = get_node(StateMachinePlayer)
var smp = get_node("StateMachinePlayer")
var global_param = smp.get_param("state")
var local_param = smp.get_param("App/Game/playing")
local_param = smp.get_nested_param("App/Game", "playing")
smp.set_param("App/Game/End/victory", true)
smp.set_nested_param("App/Game", "paused", true)
```

Besides of controlling `StateMachinePlayer`, it's useful to set arbitrary value with `set_param`

```gdscript
var smp = get_node(StateMachinePlayer)
var smp = get_node("StateMachinePlayer")
smp.set_param("game", preload("game.scn"))
var game_scn = smp.get_param("game")
```

### Debug

- Stack
- Editor
> When playing scene, select `StateMachinePlayer` node in remote scene tree to view flow of `StateMachine` in realtime
- In-game
> Add `res://addons/imjp94.yafsm/src/debugger/StackPlayerDebugger.tscn` to `StackPlayer`(so as `StateMachinePlayer`) to visualize the stack on screen.
## Demo
Expand Down
2 changes: 1 addition & 1 deletion addons/imjp94.yafsm/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="gd-YAFSM"
description="Yet Another Finite State Machine"
author="imjp94"
version="0.4.1"
version="0.5.0"
script="plugin.gd"
Binary file added screenshots/yafsm_remote_debug_showcase.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 22e1ab8

Please sign in to comment.