I posted about this to Slack about 20 minutes ago, but I thought it’d be worthwhile to post here as well.
Over the past few weeks, I’ve been working on something really cool that we can use to promote how easy to use Solar2D is, how fast it is to develop with Solar2D, as well as how much fun it can be, and that is:
It is an interactive website where you can create and run Solar2D programs directly online.
Special thanks to Michael (Ponywolf) for the images and for creating a few sample projects. I’d also like to thank Jonathan (sporkfin) for his cool sample project.
Feel free to share that link. If anyone else comes up with a cool little project, preferably less than 50 or 100 lines, then let me know and I’ll add it there as well! Also, if you have any suggestions for the site, then please let me know.
This is a really good Idea! Though I am new to solar2D I already like it a lot
But this site is not working in my Browser (“Failed to load .bin file”), Chome Version 81.0.4044.138 (Offizieller Build) (64-Bit), behind company firewall.
Same problem with old Internet Explorer …
On your Chrome, if you press F12 and reload the page, then what messages do you specifically see in your console? I’d appreciate it if you could let me know so that I could look into the issues.
Not really. 403 just tells me that the server received the request, but didn’t fulfil it for whatever reason. It could be that your company’s firewall is blocking it, but whether or not that is the case or why, I have no idea.
Sorry, when I saw the playground website, I read the code and, because of prbly sleepiness, I decided that it can be written directly in the browser and this will have an effect on the example.
Solar2D Playground now remains active even if the user clicks outside of the app or leave the tab. Most browsers will, however, not let these events fire if the tab isn’t visible, so you may encounter some weird behaviour if you are using timers or enterFrame listeners and leave the app in inactive tab for a long time.
The Playground will also now run the sample projects upon selecting a new one.
The Playground features new Solar2D branded visuals on launch.
One new sample project, Prey Joystick, thanks to @sporkfin.
Other under the hood improvements and changes.
These changes aren’t yet live on the Solar2D subdomain, but only on the main Solar2D Playground site.
If you want to have your sample project on the Playground, then let me know and we’ll add it. I’m working on a few other features to the Playground over the weekend, but if you have any suggestions, at any time, please let me know.
Actually, I can see where stalxerhd is coming from. You can just write up a project and run it without having to build, which surprised me. It also gave me an idea. If you could create and link to projects via url a la repl.it, it would be a great way of spreading the word about solar2d. My own coding knowledge is largely limited to solar2d, so I have no idea how feasible that would be, but I might as well put the idea out there.
Solar2D Playground now features custom projects! You can either start with an empty project or upload your own .lua file from your computer. Your changes will be automatically saved for the duration of your session.
All projects, i.e. sample and custom projects, can now be downloaded. This will make it possible to save your progress and continue later.
Arrow key default behaviour is now blocked, so if you use them in your projects, your browser window will no longer scroll if the app window selected.
Added Spyric Font Loader for faster custom font preloading.
Added a link to Solar2D documentation.
Using print() will now also output the contents to browser console (in addition to display console, if it is open).
Improved error handling and other code performance and usability changes.
These changes are live on both the main site as well as Solar2D subdomain.
It’s been a busy weekend and here’s another big update.
If a mobile device is detected, the Playground app needs to now be manually started. This prevents the site from throwing an error upon initially loading the site on some mobile browsers.
The Playground is now enforcing a minimum window width of 960 pixels to ensure a “desired minimum user experience” by preventing the app frame from becoming too small and blurry and the editor frame from being too small to be of any real use.
New error handling system: Lua based error handling is removed and errors are now handled by the site. Playground will terminate on first error instead of getting caught in a loop. Errors will have a clearer stack trace and upon encountering an error, the Playground will restart itself (or let the user manually restart it, if they so choose).
New staging environment for Playground. Fixes, changes and new features will now be applied at www.solar2dplayground.com/beta before deploying to live. The Solar2D subdomain version doesn’t have this new staging environment.
Added noscroll = true to app Iframe to prevent scrollbars from appearing.
Playground is now prevented from trying to start if not run on a server.