Skip to content

cletusw/2d-platformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2d Platformer

Based on the Bolt - Platformer tutorial but with most of the "Flow Machines" written in C# instead :)

Setup

Requires the Bolt plugin.

What I learned

Unfortunately the Bolt <> C# integration isn't as nice as I'd hoped, so I don't think I would go this route in a real project.

Problems:

  1. Tedious to convert & forward Unity Messages or Events to Bolt's Custom Events and vice versa. Luckily it's just a (annoying) one-liner for the former, and Bolt supports calling C# script methods, which covers the latter. Except...
  2. Have to "Build Unit Options" every single time you add a script method you want to call from Bolt
  3. No way (as far as I can tell) to access the current state of a State Machine in script (so you end up duplicating state in C#, which is highly error prone).
  4. Bolt is "stringly typed", which makes refactors harder and leaves room for typos.
    • Bolt's Variables are very powerful (and easily accessible in C#), requiring Singletons, PlayerPrefs, static classes, etc. to replicate in code. However, due to the above, I still prefer handling this stuff myself in C#.
  5. Bolt doesn't play nice with WebGL

License

Tutorial assets licensed under the Unity Extension Asset license (basically, you have to go download them yourself from the Asset Store).

My code licensed under the MIT license.

Releases

No releases published

Packages

No packages published

Languages