(re?)-Introducing toybox.py - A Dependency Manager for the Playdate

There was a post on here once regarding toybox which I can't seem to find anymore but regardless, @jeremymcanally and I have joined forces on this project and toyboxpy is now full cross-platform (macOS, Linux, Windows).

It's early days but we already have many libraries available as toyboxes like AnimatedSprite, playbox2d, PlaydateLDtkImporter, TiledUp, PlaydateSequence and more...

Installing a toybox is as easy as:

toybox add NicMagnier/PlaydateLDtkImporter
toybox update

Best of all, you can very easily make and share your own toybox. toyboxes can depend on one another, provide Lua code, C extensions to Lua code C code, even just assets or any combinations of the above. The app handles all dependencies and makes it super easy to check for and install updates for the toyboxes.

There's a lot of amazing stuff posted in this forum that could really benefit being distributed, improved and maintained as a toybox for others to use. At the same time making code and assets easily accessible to others will give newcomers a leg up and keep the community thriving.

Let me know if I can help in any way. More info at https://toyboxpy.io

7 Likes

I have used a few of these libs in my first project already. Some (like Sequence) was just directly taken from the forum thread. It is a great initiative and I hope many libs will start popping up on Toybox. I haven't used it yet, but will definitely give it a go in my next project as I can see its huge value!

1 Like

That's awesome. I think you'll love how easy it is to put pieces together for a given project.

I'm going to continue putting together more examples for toybox creators so that more and more content can be made available.

Already you can find toyboxes that provide Lua code (AnimatedSprite or PlaydateLDtkImporter), extend Lua with C code (playbox2d), provide C code (pdbase) and I've also done a quick toybox that just provides a font asset (FontSample).

It's super flexible. Don't be shy if you have any feedback or questions.

1 Like

Will do! I have been using composer on the PHP/symfony side for a few years now and it makes everything so much easier! I hope I am not mistaking in imagining toy box becoming the same

We've gone gold! Super excited for what is ahead for this little tool. I couldn't do without it now that it's part of my dev workflow.

In windows for whatever reason I am getting this with tiled up when I do a toybox update.. not that I really know how to use any of this yet as I am just poking around.

Can't resolve version with 'main >=0.0.0 <1.0.0 >=0.1.1' for 'GitHub - DidierMalenfant/TiledUp: A Playdate toybox which lets you import and use Tiled levels.'.

Can't resolve version with 'main >=0.0.0 <1.0.0 >=0.1.1'

It looks like it's trying to install a branch version (main) and a specific version (major version 0 but more than 0.1.1) at the same time.

You'll have to pick one or the other. If you don't want to edit the Boxfile manually, just delete the dependency and re-add it:

toybox remove DidierMalenfant/TiledUp

and then either:

toybox add DidierMalenfant/TiledUp

which will always give you the latest commit of the default branch (usually main)

or:

toybox add DidierMalenfant/TiledUp "0 >=0.1.1"

which will give you the latest version with major revision of 0 but at least 0.1.1.

If any of this doesn't sound straightforward, please reach out and I'll be happy to find a way to make it easier.

Unfortunately once you've done that, you're still going to hit this issue with pdc on Windows which doesn't behave the same way as the one on macOS. I've got my fingers crossed that the folks at Panic can find a solution...

Don't hesitate to report any other issues with toybox.py on the bug tracker.

1 Like

:teddy_bear: toybox.py v1.1 shipped today! :tada:

I've added support for the toystore, a simple way to refer to toyboxes by name. toyboxes can now provide a Luacheck configuration that gets automaticaly added to yours (that is super useful if you are a luacheck user). A new command named setupMakefile can easily add a barebones makefile setup if you don’t already have one.

The new update has a lot more in there too. We have some new toyboxes too like librif from Resolvi Prod which is a really nice library to encode and read grayscale images.

Still waiting to hear back on the pdc bug causing issues for Windows users. Hopefully this can be fixed fairly easily.