Search Unity

Visualize that! Behind the scenes with Bolt for Visual Scripting

March 23, 2018 in Games | 10 min. read
Topics covered
Share

Is this article helpful for you?

Thank you for your feedback!

Why would experienced developers care about visual scripting? It’s only for people allergic to code, right? We recently sat down with the author of Bolt and Chronos to hear how he got started, his ideas on code visualization, UX and the Asset Store itself.

The man behind popular Asset Store packages Bolt and Chronos is Lazlo Bonin, an award-winning 24-year-old, tool and game developer who works out of the collaborative, brightly lit GamePlay Space in downtown Montreal.

Bonin is passionate about contributing to the Unity community: “At some point when you spin off a tool from a game you’re working on – and it gets some level of polish and usability – it feels wrong to not share it. My first impulse is that I want other people to have it, and I think a lot of toolmakers have the same mentality. They don’t want their peers to have to reinvent the wheel, which is like Unity itself: Why would you code your own game engine when you have all these tools available?” And of course if your tool becomes popular, then it can help bootstrap the game that gave birth to it.

Long before he got started making tools, however, he was a self-taught game hobbyist: “When I was around 10, a cousin came over to my place, installed Visual Basic and left without any instructions.” While Bonin had been coding HTML, this was a completely new challenge for him. Fast-forward a couple of years and he was a super-intense hobbyist making numerous, unpublishable games that he laughingly describes as “crazily ambitious projects that I would discourage anyone from ever trying!”

When he was 19, he discovered Unity and began getting more serious about game dev. He gives shout-outs to assets like Full Inspector, which “was a godsend – it really supercharged the Unity Inspector and gave me much more flexibility in my designs. It was the first asset I imported on every project.” More recently, Bonin uses Odin – Inspector and Serializer a lot: “It’s one of the most useful, polished and amazing tools on the Asset Store.”

Bolt publisher Lazlo Bonin at GamePlay Space in Montreal.

Bolt: Forged in a game

While still a hobbyist, Bonin raised money for his education by designing websites and contributing to other people’s games, which led to the idea for his first asset, Chronos. “I was working on an unreleased tower-defense game and I wanted to slow my enemies down, keep them out of reach so I could have power over them. Then I realized that I should build such a tool for myself AND make it available for other people,” which he believes “is the spirit of the Asset Store” – taking shareable parts of the game you’re working on and package them for release to help other devs.

Like Chronos, Bolt was born while Bonin was working on another project. “I was on a small team doing a narrative, walk-around experience called Ephemera that takes place in Montreal, and we started looking for visual state machines that could help our artist and animator contribute to the scene structure and the gameplay while I focused on the core systems and coding. We looked at some solutions – and there were some really good ones on the Asset Store – but I’m a bit of a perfectionist so I really wanted it to be exactly the way I had in mind.”

While the Ephemera team sought funding, Bonin rolled up his sleeves and spent approximately nine months developing Bolt alone. “Once I got started on some of the features, I really wanted them to have an extra level of polish so I had some intense weeks! But it was worth it because it turned out the way I wanted it to be.”

Given his game-dev and design backgrounds, he did all the coding and design work.

“That was very important for me because I wanted to make a visual tool, a tool that’s meant to work for visual thinkers, people who enjoy good design and visual feedback, people who want to know what’s going on at a glance, know when and where there’s an error or warning, for example. These considerations were as important to me as the back-end engine. So, as well as all the possibilities of what you can do with it, I focussed a lot on how it feels to use it.”

A Bolt Flow graph in action.

Once he’d laid the groundwork, but before it was truly functional, he solicited important design feedback.

“After around six months I put some experienced Montreal game-dev people in front of Bolt and asked: ‘Is this intuitive to you? Do you understand what happened here when I connected these two things? When I show you this graph, is it clear what it does?’”

When they couldn’t tell or didn’t know what was happening in the interface, he retooled the GUI to make it more intuitive. In the last few months of development, he put together a small group of people and had them alpha-test Bolt thoroughly.

Why he thinks Bolt can help fellow coders

Bonin is used to pushback from some developers on the idea of visual scripting. When he first announced Bolt’s availability (in the summer of 2017) he got a few comments like: “I don’t understand why a programmer would ever use a visual scripting tool.” So, as an experienced coder, why did Bonin spend nine months of essentially unpaid work developing something he didn’t necessarily need?

“As programmers, we have to realize that there are people out there who think and learn differently than we do and need different tools. It’s okay to see the value of that.” As obsessed with good design and user experience (UX) as he is with coding, Bonin’s been reading design thinkers like Bret Victor who advocate for better tools and ways of teaching programming.

“Victor says things like: ‘We innovate for the end users but not for our fellow devs. We don’t spend enough time improving their experience.’ He asks: ‘Why are we still coding blindly in text editors and have no idea what’s going on? How am I supposed to know that this value has an impact somewhere else and how am I going to visualize that?’”

Unity’s free Space Shooter demo after Bonin converted it to use Bolt.

Flow graphs vs state graphs

While one of Bolt’s features is flow graphs, Bonin is honest about the usefulness of them for adept developers.

“Look, if you’re a coder, you probably won’t need the flow graphs because Bolt gives you pretty much a one-to-one translation of code. However, state graphs can be quite beneficial even when you know how to code because they let you structure your logic in a way that’s not easy to visualize in code.

“For example, you could be looking at a gameplay scenario and thinking ‘This character is in an idle state, and while it’s in that state I will call other functions. And when an enemy comes nearby I will go into chase state, and in that state, I will call a bunch of other functions. . . . so it can be hard to visualize the code in all those states. That’s where a higher-level visualization can really help some people.”

Sample State graph showing AI behaviour for an NPC: Idle, patrol, chase, attack, etc.

Another area that he feels appeals to developers is that everything in their Unity code base is directly available in Bolt, as there is no integration layer between Bolt and Unity, which also simplifies maintenance. “You have immediate access to your own character classes and your own item classes, etc. You can just call functions from these inside Bolt and set properties. And an advantage for me is when Unity releases a new version with new components, etc., I don’t have to do anything nor do my users: Bolt just automatically picks it up. It directly analyzes and reads the entire code base and gives you options.”

Different aptitudes in the team sandbox

Bonin also sees Bolt – which has a user base of nearly 3000 – being employed by teams that have a mix of skill levels.

“If you have a diverse team with coders and artists, you can have the coders focus on some core systems, major C# classes, and how they interact, and still give your designers and artists access to them in Bolt. They can just play around with the parameters, figure out the structures, etc., without having to worry about how they actually work on a code level.”

In fact, he encourages that kind of approach for people just starting out. Even though he has provided extensive documentation, including tutorials, some people just want to jump in and see what happens.

“I have some artist and designer friends who when they first saw Bolt said, ‘We don’t know where to start,’ so I told them, just add a Bolt component to one of your GameObjects and press Play. And while it’s playing, you can keep adding nodes to it to see what they do. That’s one advantage to Bolt – you can do live editing and see everything in real-time. You can add, remove, change anything you want – it’s a kind of sandbox for you getting to know the engine, getting to know the tools that are available to you and hopefully trigger your creativity.”

2D platformer from a Bolt tutorial – A good sandbox for visual scripting.

A day in the life of an Asset Store publisher

So with thousands of users, more than 500 of whom are members of the Bolt community hosted on a Discord server, what’s Bonin’s typical day like?

“I start by reviewing private tickets, requests for education licenses, etc. Then I check to see what the community is saying, what they’re suggesting for ways to improve Bolt. And some of their ideas make a lot of sense, because when you get deep inside your own project you can sometimes lose perspective – so the community really helps me stay on track. Then I move on to fixing bugs. And with my free time I start working on the new features.

Being a one-person operation requires managing user expectations. “I recently had to stop referring to Ludiq as ‘we’ and only use ‘I’ so that the community understands why some things don’t get done as quickly as they might like. And I think a lot of the users understand that because my road map is public. While I get a lot of people drooling over new features, I still have to be careful about what I promise to deliver and when,” he says.

Ludiq’s headquarters in Montreal.

Advice for people creating their own tools

Finally, what would Bonin say to anyone, like himself, working on a game when they suddenly realize that they could spin some of their IP into an asset to assist others and possibly help finance their own passion project.

“On the design side, I suggest mocking up your tool, planning your UX and interactions, studying how the Unity Editor works and what its design language is. Familiarity is key for a good Unity tool, and I think a lot of people overlook that step. And on the technical side, if you're just starting, I would recommend doing this tutorial for scripting custom tools, processes and tasks in the Editor, and you can also familiarize yourself with the Editor GUI API and its intricacies (check out this post on the Unity blog).”

Free for new Unity Plus subscribers until April 5

If you sign up for a new Unity Plus subscription until April 5, you'll get Bolt for free. Our Triple Boost with Unity Plus campaign also includes a full year of Unity Game Dev Courses at no additional cost and 20% off selected Asset Store products.

Get Unity Plus

More about Visual Scripting

Learn how to get started using Bolt in this recent live session hosted by Unity's own Ethan Bruins:

This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.

Go to our Visual Scripting page to learn about similar packages available on the Asset Store.

March 23, 2018 in Games | 10 min. read

Is this article helpful for you?

Thank you for your feedback!

Topics covered