Solar2D IDE on iPad

Quick update on the IDE: I’m been mostly busy with the new Swift interpreter the IDE uses for native app development. But Solar features will still come, they just aren’t a top priority as most users are iOS developers.

Stay tuned :slight_smile: and thanks for the positive comments

1 Like

Hi Joe, but you know, I’m an iOS developer, too, but I use Solar2D to make my apps. I have 4 on the App Store and there are hundreds by others, too. Please let us know when you can build in support for the plugins. You really have something great.

1 Like

I’m getting a repo up soon where you can add in your own plugins to the IDE—including Solar2D plugins via CoronaCards. This would allow you to customize your iPad IDE to support any Solar plugins your games need. :slight_smile: Ping me if I don’t update this thread in the next month.

1 Like

Another update: I got the custom build system for App Maker working. This means it’s possible to extend App Maker with plugins. I’m now adding CoronaCards as a plugin option. But I still need to figure out how to get native Solar plugins to build and integrate with CoronaCards though.

I’m fairly sure Vlad could be helpful. Are you connecting with him about this?

1 Like

Good idea! Once I get as far as I think I can, I’ll touch base with him if I need it. I know he’s probably very busy haha!

But I might be able to do it on my own. I had to take a break during this last week as I was both moving and busy with another project. But as of today I’m back on it :slight_smile:

Just a small kinda-big update on how the custom App Maker builds is coming along.

Here’s the folder that will be open sourced soon.

First thing of interest is the AppMakerCoreWrapper folder. It contains the majority of App Maker…precompiled! So you won’t have access to my source code :stuck_out_tongue:

Next is the setup.yml file. Here you can configure what you want included in your custom App Maker build.

Here’s how my setup.yml looks right now. You can see if have the ZipExport and Solar2D plugins set for the iOS and macOS builds. Meanwhile the GitProviders plugin is disabled by being commented out.

So now when I run build-xcode-project.py, I get a new AppMaker.xcodeproj project ready for building! The python build script automatically will add each plugin to the xcodeproject.

The last thing I want to mention is the folder PartiallyCompiledProject. This is a special folder where you can put whatever you want to be included with the build. It’s most likely going to be useful for including a googleservices.json file if you end up using a firebase plugin.

All of what I’ve shown above is currently working great. My current focus is getting a Solar build.settings file to automatically add your native plugins into the custom App Maker build. Hopefully this means that for most of you, all you have to do is copy your build.settings file, run build-xcode-project.py, and then build!

Anyways, I hope to have the first version ready in the next month. There’s still a lot of work to do but this is very exciting to me. I can’t wait to do actual game development on my iPad!

1 Like

Another update: I’ve switch from YML to Lua for the config file. This means you can just directly copy in your plugins section of your existing Solar2D build.settings!

The file is now config.appmaker.lua. Here’s an example

--
-- For more information on config.appmaker.lua, see:
-- https://docs.appmakerios.com/#/customConfig
--
local spiralcodestudio_patreon_email = 'YOUR_EMAIL'
local spiralcodestudio_key = 'YOUR_ACCESS_KEY'

local function spiralcodestudio_plugin(name)
	local plugin = {publisherId = 'com.spiralcodestudio', supportedPlatforms = {}}
	local platforms = {'android', 'appletvos', 'appletvsimulator', 'iphone', 'iphone-sim', 'mac-sim', 'win32-sim'}
	for i = 1, #platforms do
		local platform = platforms[i]
		plugin.supportedPlatforms[platform] = {url = 'https://build.spiralcodestudio.com/' .. spiralcodestudio_patreon_email .. '/' .. spiralcodestudio_key .. '/solar2d/' .. name .. '_' .. platform .. '.tgz'}
	end
	return plugin
end

settings =
{
    --
    -- See the Plugin directory for all App Maker plugins.
    --
    appMakerPlugins =
    {
        ["GifPreviewer"] =
        {
            isLocal = true
        },
        ["GitProviders"] =
        {
            isLocal = true
        },
        ["MarkdownPreviewer"] =
        {
            isLocal = true
        },
        ["Solar2D"] =
        {
            isLocal = true
        },
        ["ZipExport"] =
        {
            isLocal = true
        },
    },

    --
    -- See http://plugins.solar2d.com for all a list of all Solar2D
    -- plugins. To add support for a Solar2D plugin in App Maker,
    -- make sure that you have included the Solar2D plugin in
    -- appMakerPlugins above.
    --
    solar2DPlugins =
    {
        ['plugin.nfc'] = spiralcodestudio_plugin('nfc'),
        ["plugin.example"] =
        {
            publisherId = "com.example"
        },
        ["plugin.example2"] =
        {
            publisherId = "com.example",
            marketplaceId = "asdf"
        },
        ["plugin.example23"] =
        {
            publisherId = "com.example",
            marketplaceId = "asdf",
            supportedPlatforms = {
                yo = false
            }
        },
    },


    --
    -- When you make a custom build of App Maker, you have the option of
    -- making one of your projects partially compiled. This is useful for
    -- doing things like adding a Firebase GoogleServices.json file or
    -- other things your app needs to have processed at compile-time. All
    -- you have to do is put files you wish to be compiled with App Maker
    -- into the folder "PartiallyCompiledProjects/{partially_compiled_project_to_include}".
    -- Everything will be compiled with your custom App Maker build. Note
    -- that due to the nature of the fact that we are compiling your project
    -- specific stuff at compile time WITH App Maker, what you put in in
    -- the folder will effect ALL projects, so be mindful of how this might
    -- affect things.
    --
    -- partiallyCompiledProjectFolder = "MyApp", -- i.e. PartiallyCompiledProjects/MyApp
}

A neat side effect is that plugin providers which use Lua functions as part of their setup work perfectly. i.e. Documentation Spiral Code Studio

I think I’m on track to have a version with native plugin support ready in 2 weeks.

Another update: It’s now downloading plugins! I just need it to have them link against the IDE and we’ll be on our way!

3 Likes

Yes, I disappeared for awhile. I had a lot of rework to do with the core of the IDE. Long story short, the Solar2D feature had to be put to the side for a minute.

But now I’m happy to say this Wednesday I’m going to publish the first beta version of the IDE with Solar2D! And I’m doing weekly updates from here on out too.

The repository is here. http://github.com/App-Maker-Software/AppMakerProfessional

The App Maker IDE is already published on this repo, but it only supports pure Lua projects. So you can give it a spin if you want to…or just wait until Wednesday for the Solar2D support :slight_smile:

5 Likes

Okay something really odd happened. The Lua binding used to read the config.lua and build.settings files is colliding with the Lua library embedded in CoronaCards. Long story short, I’m going to publish a version tomorrow without the plugin support and fix this symbol collision issue in an update.

Off to a rocky start…oh well :man_shrugging:

1 Like

Happy Saturday everyone!

So I finally fixed it. I had to learn a lot about symbol tables and C++ name mangling to get it working. If that’s interesting to anyone, here’s my two commits which got the IDE’s Lua source to not conflict with the Lua engine embedded in CoronaCards.

Might seem overkill, but this was needed to be able to do plugin resolution and other things.

So I’m going to post the 0.9.1 update on GitHub today. Hopefully future updates aren’t late like this one was!

1 Like

Okay App Maker 0.9.1 is up with Solar2D support

3 Likes

0.9.2 is going up this week. New features include:

  • Git support reintroduced as a plugin
  • iPad supports multi-windows and opening multiple projects in different windows
  • Simulator renderers can project separate instances onto different surfaces i.e. a different instance for each editor’s sidebar
  • Performance improvement for text editor
  • Bug fixes

The Solar2D Plugin has some new features as well include:

  • Parsing config.lua for setting the game’s FPS
  • Parsing config.lua for setting the game’s scale mode i.e. letterbox vs adaptive
  • Solar2D simulator (powered by CoronaCards) will receive resize events when the simulator’s view is resized in the editor
  • Use of accelerometer is disabled (CoronaCards currently causes iOS crash when using accelerometer)
  • Calls to print appear in the App Maker console
  • Runtime errors supported in the App Maker console

Here’s some screenshots. The big visual difference is that it’s scaling properly. The game I have in there is from an old test project that I cloned from my GitHub.

And when you select a “top bar” (sidebar on iPad) you get the simulator as a live preview.

Stay tuned! I’m seeing so much potential with this and it’s a joy to work on!

1 Like

Version 0.9.2 is up!

Edit: just a note that Corona Cards seems to have a major bug with touch events which cause the location of the event to be offset. Right now the best way to avoid that in App Maker is to use adaptive scaling, but even then it is a little messed up. I’m planning on either forking Corona to fix it or finding a hack in pure Lua to compensate the touch offset.

Also if anyone wants to see how Solar2D fits into App Maker, the plugin is open source here

2 Likes

I’m trying to get this week’s update out today–version 0.9.3!

New features:

  • Plugins can now create their own editors
  • AppMakerCore includes ProjectSyncedText interface for more easily interacting with string contents of files while maintaining state with the rest of the project
  • New plugin for Firefly–an iOS text editor with Syntax highlighting created by Zach

App Maker is using a slightly modified fork of Zach’s but I will work with him to get those changes upstream. My fork of Firefly is here. https://github.com/joehinkle11/Firefly

Here’s a screenshot of the syntax highlighting in action.

Edit: 0.9.3 is now live!

1 Like

More good news! I found where CoronaCard is mapping the UIKit touch events to CoronaCards coordinates!

And currently the Solar2D plugin for App Maker is manipulating the stage scale and position to implement Solar2D’s dynamic scaling features like “letterBox.” It also does this to prevent stretching when the CoronaCards view is resized.

So my thoughts are that I could add a ObjC block to the CoronaView class which would allow us to overwrite the default mapping logic in locationInCoronaView. This way any existing CoronaCard users (if there are any out there) will not be affect, and App Maker can meanwhile use that block to handle the coordinate mapping itself.

And just to show the issue a bit more clearly. The circle is supposed to be centered on the mouse as I drag, but it’s offset very far off to the bottom right.

Quick update: I’m taking a hiatus from App Maker development for awhile to work on another venture (that actually is making me enough money to pay the bills :sweat_smile:). I’ll update this thread again when I resume work on this IDE. Thanks to everyone who provided feedback and tried my app! It’s been very encouraging to see everyone’s responses.

3 Likes