Plugins source

Hello.

Some time back I made public a few utilities (just renamed “solar2D_native_utils”) that I was using to help build plugins.

I’m now doing the same with the plugins themselves.

This is slightly curated from a private Bitbucket repository and might not be quite ready to go as of this posting, but should take form over time. I’ll first try to get Windows and Android squared away.

When the offline builds process is ready we should be able to move to Visual Studio 2019. It also looks like the Android NDK has come along since I last checked. These ought to open up the more recent versions of C++, letting me both update my own code and entertain plugin ideas I had to dismiss in the past.

I still need to get up to speed with the way the whole plugin delivery process will now go. I might try posting binaries in this repository (releases but probably also snapshots) in addition to the marketplaces. Time will tell.

Here and there I’m hoping to stream some of my future development. There are a few things I want to do with impack, for instance.

I’m sure I’ve forgotten other details as well, but will leave it there. :slight_smile:

4 Likes

These sound great. Keep us posted!

I’ll hopefully have similar announcements coming up in the near future.

1 Like

I’m not sure if we’re talking about the same thing but @vlads mentioned in Slack that current source is VS2019 compatible.

It all needs “little” polish, but yeah. Everything now vs2019 and Android studio cmake-ish

1 Like

@bgmadclown Yep, I am indeed referring to these improvements. These plugins are not the Solar2D source, of course, but everything must be more or less compatible. The comment about the process being ready is just some caution per what @vlads said above and in Slack.

1 Like

A few quick updates here. In my old code repository I made (and pushed) some updates to impack, using GIFLib instead of the bits from stb seen in the source, since the latter were falling down on a few GIFs. I do intend to bring that in, but I think I’ll do so as a new dedicated GIF plugin, probably including the writer as well.

I spent yesterday afternoon setting up some new plugins (now building with VS2019 right from the outset), bringing in the libraries they’ll be binding and ensuring they compiled on Windows. All were listed as ideas on the plugins page, three of them being: Blend2D, OAML, and Polylidar.

This afternoon was spent binding the last in the batch, TheoraPlay. I now have some decent Theora video playback working. This is provided via external textures, and so can be assigned to display objects and be well-behaved within the hierarchy, have effects applied on top, and so on. (I am in fact trying to deliver the output in a rawer form, not as RGBA–as an option, anyway–so that a shader could be called upon for the decoding itself. At the moment I’m stumped, though.)

My testing sample:

-- Permission is hereby granted, free of charge, to any person obtaining
-- a copy of this software and associated documentation files (the
-- "Software"), to deal in the Software without restriction, including
-- without limitation the rights to use, copy, modify, merge, publish,
-- distribute, sublicense, and/or sell copies of the Software, and to
-- permit persons to whom the Software is furnished to do so, subject to
-- the following conditions:
--
-- The above copyright notice and this permission notice shall be
-- included in all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--
-- [ MIT license: http://www.opensource.org/licenses/mit-license.php ]
local tp = require("plugin.TheoraPlay")
local video, err = tp.decodeFromFile("360.ogv")
print("?", video, err)
local image = display.newImageRect(video.filename, video.baseDir, 640, 360)
image.x, image.y = display.contentCenterX, display.contentCenterY
local prev
timer.performWithDelay(20, function()
	local now, diff = system.getTimer()
	if prev then
		diff = now - prev
	end
	video:Step(diff or 0)
	video:invalidate()
	prev = now
end, 0)

Tested with videos from here.

There are some audio needs that arise in this and presumably OAML, as well as other projects I’ve dabbled in or have in mind. I have an open source enhancement in mind here, ideally something akin to what you see in the above sample with the video object and its use by display.newImageRect().

2 Likes

I’ve now put a dent in the Blend2D plugin, with enough implemented to reproduce examples 1-6 (“Getting Started” link, above). I’ve been going through most of the development on stream (also linked above), with at least one more part planned for the final two examples and making it possible to use Blend2D images as “files” for Solar2D display objects.

There are other samples I’m also hoping to visit.

Anyhow, it’s a large library, but I’m now posting snapshots of certain not-yet-complete plugins. At the moment these are Windows-only, but I mean to flesh them out.

With build 3596 I can point to those GitHub URLs, so here are tests of blend2d (blend2d.zip (387.7 KB) ) and TheoraPlay (theoraplay.zip (1.7 KB) ), respectively.

In the Blend2D project, you can set Example to a value from 1 to 6 to see the corresponding sample.
With TheoryPlay, set the filename; I didn’t include the videos themselves, but see the last post. As already mentioned, I only have Windows binaries ready at the moment.

I am also trying to adapt some “fast path” code for loading WebP files, but this is still a work in progress.

1 Like