# State Machines

**URL:** <https://forum.makecode.com/t/state-machines/23847>\
**Category:** Game Design\
**Created:** [November 2, 2023, 4:24pm UTC](https://forum.makecode.com/t/state-machines/23847 "2023-11-02T16:24:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [November 2, 2023, 4:24pm UTC](https://forum.makecode.com/t/state-machines/23847/1 "2023-11-02T16:24:11Z")

</div>

I’d be interested to see people create finite state machines in makecode if it’s even possible

(if it is possible and it has been done before, please send me it. my goblin sized brain is currently not aware of anything)

just asking cause i finally got my finite state machine working for my game!

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [November 2, 2023, 10:16pm UTC](https://forum.makecode.com/t/state-machines/23847/2 "2023-11-02T22:16:50Z")

</div>

What’s a finite state machine?

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [November 3, 2023, 5:00pm UTC](https://forum.makecode.com/t/state-machines/23847/3 "2023-11-03T17:00:32Z")

</div>

Essentially, a state machine is an advanced way of managing animations and states

Typically used for a player and enemies. In my case, I got mine working for my player.  
Here’s a sneakpeak:

 ![Screenshot_2023-11-03_at_11.01.49_am](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/808c460dfc5f6a12942abf1ae8c70986e659ce35.png)

Here is a diagram to illustrate what state machines do:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fe6298f933167045a740002955bc549bf229a902.jpeg)

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [November 6, 2023, 6:58pm UTC](https://forum.makecode.com/t/state-machines/23847/4 "2023-11-06T18:58:38Z")

</div>

Oo that’s awesome! I’ve never seen these before, pretty cool!

---

<div class="post-metadata">

**Author:** ![Future\_Knight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/future_knight/32/22166_2.png) [@Future\_Knight](https://forum.makecode.com/u/Future_Knight)\
**Post date:** [November 6, 2023, 6:58pm UTC](https://forum.makecode.com/t/state-machines/23847/5 "2023-11-06T18:58:45Z")

</div>

reminds me of rain world

---

<div class="post-metadata">

**Author:** ![cSquared](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/csquared/32/7676_2.png) [@cSquared](https://forum.makecode.com/u/cSquared)\
**Post date:** [November 6, 2023, 7:20pm UTC](https://forum.makecode.com/t/state-machines/23847/6 "2023-11-06T19:20:48Z")

</div>

I think this is what you are looking for:

> **[state sprites 2](https://arcade.makecode.com/S19460-93699-49718-37627)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

it took about 10 minuets to make…

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [November 6, 2023, 7:38pm UTC](https://forum.makecode.com/t/state-machines/23847/7 "2023-11-06T19:38:53Z")

</div>

Are you already using the player animations extension?

---

<div class="post-metadata">

**Author:** ![PixelDoodle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/pixeldoodle/32/24129_2.png) [@PixelDoodle](https://forum.makecode.com/u/PixelDoodle)\
**Post date:** [November 6, 2023, 7:45pm UTC](https://forum.makecode.com/t/state-machines/23847/8 "2023-11-06T19:45:02Z")

</div>

Ive seen this sort of stuff in the UNITY GAME ENGINE. Didn’t understand it though.

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [November 6, 2023, 11:43pm UTC](https://forum.makecode.com/t/state-machines/23847/9 "2023-11-06T23:43:51Z")

</div>

no, i did this in Godot but I was wondering if it was possible in makecode arcade

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [December 28, 2023, 6:46pm UTC](https://forum.makecode.com/t/state-machines/23847/10 "2023-12-28T18:46:03Z")

</div>

…is this MakeCode?

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [December 28, 2023, 6:46pm UTC](https://forum.makecode.com/t/state-machines/23847/11 "2023-12-28T18:46:10Z")

</div>

# BRO

Is it me, or do you like every single game I never hear anyone else talk about?!

I absolutely **LOVE** rain world!

---

<div class="post-metadata">

**Author:** ![Future\_Knight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/future_knight/32/22166_2.png) [@Future\_Knight](https://forum.makecode.com/u/Future_Knight)\
**Post date:** [December 29, 2023, 5:55pm UTC](https://forum.makecode.com/t/state-machines/23847/12 "2023-12-29T17:55:46Z")

</div>

I am a fan of a lot of these games like:

- Xenoblade Chronicles
- Stray
- The Finals
- Ratchet & Clank
- Big Walk (note: this game was announced during the game awards 2023 and is not coming til 2025. It will be made by the creators of the untitled goose game)
- Avatar: Frontiers of Pandora

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [December 29, 2023, 6:16pm UTC](https://forum.makecode.com/t/state-machines/23847/13 "2023-12-29T18:16:21Z")

</div>

nope, not at all. This is Godot

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [May 19, 2024, 4:00pm UTC](https://forum.makecode.com/t/state-machines/23847/15 "2024-05-19T16:00:59Z")

</div>

i published it on [itch.io](http://itch.io) in like Jan

[https://personalnote.itch.io/reflection](https://personalnote.itch.io/reflection)
