Piecewise Devlog #6
Attention testers: Closed beta copies will be removed from your library before midnight Pacific tonight. Projects created using the beta version of Piecewise will be able to be opened with the release version, so make sure you have them saved! Thanks for testing Piecewise and for your feedback.
Hi everyone, happy Sunday! I can't believe release is less than two days away – I've spent the past nearly three weeks making sure Piecewise is ready for the first public release. In this final “dev log” before release I'll go over the biggest changes that have been made to Piecewise over the past couple of weeks, and what to expect in Early Access.
Various fixes and improvements to Mastodon support
There's too much to write a coherent paragraph here for, so here are the highlights:
- Added interacting with (favorite/repeat) statuses
- Added the ability to determine notification types
- Added listening to direct and public timelines
- Added the ability to determine the bot's relationship with another user (following, muted, etc.)
- Fixed replying to posts
- Added the ability to specify a spoiler for statuses and mark them as sensitive
- Added the ability to determine whether a post is a repeat of someone else's, and if so, determine the original poster
- Fixed “look up status” being hidden
Also, I went through and documented all of the Mastodon blocks.
Various fixes and improvements to Discord support
I also made some improvements to Discord support:
- Added “can start embedded activities” to “user has permission” block
- Added additional flags to “message is (publishable/pinnable/etc.)”: “is reply” / “is thread OP” / “is crosspost” and similar
- Added “message pinned” event
- Added “get reference message” block (to fetch the original message a message is a reply to)
- Added the ability to “send message as...” (send a message with a different author and avatar using webhooks).
- Added the ability to specify minimum parameter count for chat commands. Invocations that do not have the required number of parameters are ignored.
A few weeks ago, I implemented Blockly's “backpacks” into Piecewise.
Dragging blocks to the backpack allows you to save those blocks for later. The contents of the backpack save immediately and aren't project or workspace-specific. This is useful because, for example, you might put a login block or a function you frequently use into a backpack to use it across projects. For more info about backpacks, you can check out the dedicated documentation page here.
Block weighting and organizing
Blocks are now weighted properly within their categories to better reflect what you might be looking for. Blocks that you might use most are located closer to the top of the workspace, and blocks that might be used less are located at the bottom. Right now these are hard-coded values, but I've been considering tracking the blocks you use and tailoring the layout to the blocks you place.
If you have any feedback about the current layout, please feel free to reach out.
More pitfall warnings
Piecewise will now notify you when you're missing a block that's dependent on another (i.e. provider-specific blocks being dependent on their login/configuration), or trying to schedule tasks in a loop – both major pitfalls that may cause you headaches. Here are some examples of what these warnings look like:
Custom themes and renderers
The latest version of Piecewise allows you to create custom themes using CSS styling. Here is an example of a custom theme:
When themes are a little less buggy, I'll document further how they work.
You can also now change how blocks are rendered – Blockly comes with three renderers by default, the
geras (normal) renderer, the
thrasos renderer, and the
zelos renderer (which makes blocks look more like Scratch) – and you can switch between them from the “Piecewise –> Preferences” menu.
It's now possible to create “templates” that users can copy, edit, and create their own projects on.
Piecewise ships with a few templates by default, but feel free to create your own by saving a normal project with the “.pwt” extension.
Internal code and pipeline fixes
The less sexy part of these updates is the tons and tons (and tons) internal refactoring, bug fixing, and tuning I do – this made up at least half of the total work I've done in the past three weeks. However, the return on investment of these fixes allows me to work on Piecewise quicker and in a more maintanable manner.
Other small fixes
I've also made a bunch of other tiny fixes:
- Started requesting that your computer stays on when a bot is running
- Fixed various bugs in the ffmpeg downloader
- Added “this is taking longer than it should” to splash screen when Piecewise is taking too long to load
- Added trace logging, which allows me to further see what Piecewise is doing
- Started rotating logs every launch
- Updated Electron to 16.0.0-beta.3
- Shortened block names when linking to them in documentation if their names are too long
- Fixed block validity checker sometimes not checking blocks
- Added more documentation for extension blocks
- Added sad Blue when an error occurs
- Fixed demos ending immediately
- Fixed demo crashing on Linux
- Fixed options menu hanging
- Fixed windows flashbanging you when they open (sorry dark mode users!)
- Added block shadows to a bunch of toolbox items
What to expect during Early Access
Now that I've gone over what's changed in Piecewise, I want to quickly go over what to expect during Piecewise's early access period.
There will be one major Piecewise release every month, and it will be numbered with the year (i.e. 21) and month (i.e. 11). The first release will be 21.11.0. The current plan is that new features and breaking changes will generally come out at the beginning of every month – after the initial feature release, there may be a few bug fix releases.
I don't plan to do this often, but if I break compatibility with the current version of Piecewise in the next version, I plan to support it for at least a month after the new version with bug fixes, to give you time to move over to the new version. The latest version of old major releases should always be available via Steam beta branches or as separate downloads on itch.io.
aimer branch will continue to function and will be pushed to every time I submit a code change. If you like living on the bleeding edge, enter
dreamoflazurite in Piecewise's Properties –> Betas menu, but I make no guarantees that versions pushed to this branch will work or that compatibility will be kept between
aimer and stable releases (or even
Dev blogs will probably slow down to once a month. I'll definitely post a dev log when I announce the new release, but I may also post a new dev blog in the middle of the month if there's a feature I'm particularly excited about shipping in the next month.
Conclusion and looking ahead
I've already started working on Piecewise 21.12, and I'm already excited about first new feature I'll ship, which will be adding
piecewise:// URLs (i.e.
piecewise://jump/discord_login). These URLs currently allow you to jump to blocks and open online templates, but I'd also like to make it easier to share blocks this way by allowing you to give the person you're sharing with a URL.
I continue to surprise myself with the progress I've made over the past few months and I'm very excited to share Piecewise with everyone on November 2nd at 10am Pacific! If you haven't already, please add Piecewise to your Steam wish list and feel free to join us on Discord or on the Steam Community forums.