Solar2D
Solar2D is a free and open-source, Lua-based 2D game engine designed for rapid development of cross-platform applications and games using a single codebase.[1][2] Originally developed as the proprietary Corona SDK by Corona Labs Inc., the project was forked by the developer community in 2020 following the company's closure, rebranded as Solar2D, and released under the MIT license to ensure its continued evolution.[1][2] It has been actively maintained for over a decade and powers hundreds of thousands of apps worldwide.[1] Key features of Solar2D include its lightweight Lua scripting language, which provides over 1,000 API functions for handling graphics, physics, audio, and user input; an instant-update simulator for quick iteration during development; and extensive plugin support for integrations like advertising, analytics, and media services through official directories.[2][1] The engine supports deployment to a wide range of platforms, including iOS and tvOS, Android and Android TV, Amazon Fire, macOS, Windows, Linux desktops, and HTML5 for web browsers, making it suitable for mobile, desktop, and connected TV environments.[1][2] Solar2D emphasizes ease of use with native library bindings for C/C++, Objective-C, and Java, allowing advanced customization without royalties or user tracking.[1] Its vibrant open-source community contributes to ongoing improvements via GitHub, forums, and Discord, fostering a ecosystem of free plugins and code exchanges.[2][1]Overview
Description
Solar2D is a free, open-source, Lua-based cross-platform framework designed for the rapid development of 2D applications and games.[2][1] It evolved from the Corona SDK as an official open-source fork, maintaining a focus on simplicity and efficiency for developers.[1] The framework supports deployment to a variety of platforms, including mobile devices on iOS and Android, desktops running macOS, Windows, and Linux, televisions via Apple TV and Android TV, and web browsers through HTML5.[3][2] This cross-platform compatibility enables the creation of a single codebase that can be published across multiple environments with minimal adjustments.[1] Solar2D prioritizes fast iteration cycles and ease of use, particularly appealing to beginners, while enabling the development of immersive 2D experiences such as games and interactive apps.[1] A distinguishing feature is its hot-reloading mechanism via Live Builds, which allows code and asset changes to update automatically on simulators or devices over a local network without requiring full rebuilds, accelerating the testing process.[4] Additionally, it offers access to plugins for extending functionality in areas like monetization and analytics.[5]Licensing and development model
Solar2D is released under the MIT License, which was adopted following its open-sourcing in 2020, permitting free use for both commercial and non-commercial purposes while providing full access to the source code hosted on GitHub.[6][2] This permissive licensing model enables developers to modify, distribute, and integrate the engine into their projects without restrictions on redistribution or proprietary use.[2] Development of Solar2D is community-led primarily through the GitHub repository at coronalabs/corona, where volunteers and former Corona Labs team members contribute code, plugins, and documentation to maintain and enhance the engine, with the Solar2D organization supporting related projects.[2][7] The project relies on user sponsorships and donations to fund ongoing work, fostering a collaborative environment that has sustained active development since the rebranding from Corona SDK amid financial challenges at Corona Labs.[8] The release process includes daily builds for testing new features and bug fixes, alongside periodic stable public releases to ensure reliability for production use.[9] For instance, the stable version 2025.3726, released on November 5, 2025, introduced stability improvements and several bug fixes across platforms.[10] Unlike the original Corona SDK, which featured paid subscription tiers for advanced features, Solar2D operates entirely without fees, subscriptions, or royalties, making it accessible to all developers.[11][12]History
Origins as Corona SDK
Corona SDK originated from the efforts of Ansca Mobile, a company founded in 2008 by Carlos Icaza and Walter Luh in Palo Alto, California, with the goal of simplifying cross-platform mobile app development. The framework was publicly introduced as a Lua-based tool for creating native mobile applications, with its first beta released in June 2009 for early adopters, followed by version 1.0 in December 2009, initially targeting iOS devices. By April 2010, Ansca unveiled version 2.0, which expanded support to include Android and iPad, enabling developers to build 2D games and apps using Lua scripting for rapid prototyping across platforms. In June 2012, Ansca Mobile rebranded to Corona Labs Inc., reflecting the product's growing prominence.[13] Under Corona Labs, the SDK initially operated as a commercial offering with a freemium model, providing a free basic tier for core development and paid Pro subscriptions starting at around $200 annually for advanced tools and builds. Key milestones included the launch of Corona Enterprise in August 2012, which introduced native Objective-C bindings for deeper platform integration. In March 2013, the company launched Corona Cloud, adding capabilities for monetization, analytics, leaderboards, achievements, and social integration to support professional app deployment.[14] These enhancements catered to the needs of game developers seeking efficient 2D solutions without the complexity of full engines like Unity. In March 2015, Corona Labs made the SDK completely free for all users.[15] In November 2015, the company was acquired by Perk.com for $2.3 million, which aimed to integrate Corona with its rewards platform.[16] In June 2017, following acquisition by Appodeal in March 2017, Corona Enterprise was also made free, eliminating all paid tiers.[17][18] In January 2019, Corona Labs announced plans to open-source the engine under the GNU GPLv3 license, making the core codebase publicly available on GitHub while retaining commercial options for certain features.[19] The framework gained significant traction, with over 500,000 developers worldwide using it to create mobile apps and games by the late 2010s. Its emphasis on Lua's lightweight syntax and quick iteration cycles made it particularly popular for indie 2D projects, powering titles in app stores and contributing to a community-driven ecosystem. However, by late 2019, Corona Labs faced mounting challenges, including intense competition from established engines like Unity and escalating costs of maintaining cross-platform compatibility amid evolving mobile OS requirements, which strained sustainability.Open-sourcing and rebranding
In February 2020, Corona Labs announced the shutdown of the company effective May 1, 2020, citing financial difficulties where operating expenses had outpaced revenue, with the final commercial update of the Corona SDK released in May 2020.[20] This decision came amid the emerging COVID-19 pandemic, which exacerbated economic pressures on many tech firms, though the core issues predated the global crisis. The original Corona SDK, which had powered thousands of commercial mobile games and apps since its inception, faced an uncertain future as the proprietary model ended. Following the company's closure, a group of developers from the Corona community initiated an open-source fork in May 2020, rebranding the engine as Solar2D to distance it from the "Corona" name—partly due to its unfortunate association with the ongoing COVID-19 pandemic—and to sidestep potential trademark conflicts.[21] The inaugural release under the new name, version 2020.3572, marked the project's independence and was distributed via daily builds on GitHub.[22] The migration involved transferring the full codebase to a public GitHub repository under the coronalabs organization, preserving the foundational Lua scripting core and APIs while establishing community-led governance through forums, pull requests, and volunteer contributions.[23] This shift to the MIT license enabled rapid iteration without corporate oversight, focusing on offline builds and plugin compatibility. The immediate aftermath saw robust community engagement, ensuring the project's survival and growth; by its fifth anniversary in May 2025, Solar2D had evolved into a mature open-source engine with consistent updates integrating support for the latest OS APIs on iOS, Android, and desktop platforms.[24]Core Architecture
Lua scripting and API
Solar2D utilizes Lua 5.1.3 as its primary scripting language, leveraging Lua's design as a lightweight, embeddable extension language to enable procedural programming within the engine's runtime environment. This integration allows developers to write scripts that interact seamlessly with the underlying C++ core, facilitating rapid prototyping and iteration for cross-platform applications. Lua's simplicity and efficiency make it ideal for real-time scenarios like games, where scripts handle logic without imposing heavy overhead on performance.[25] The scripting model in Solar2D is predominantly event-driven, where developers attach listeners to objects or the runtime to respond to events such as user input, collisions, and timers. For instance, a touch event listener can be added to a display object usingobject:addEventListener("touch", listenerFunction), enabling asynchronous handling of interactions without polling. This paradigm promotes modular code organization, as scripts react to system-dispatched events rather than relying on a traditional main loop for all updates. Collision events from the physics engine and timer callbacks further exemplify this approach, allowing precise control over dynamic behaviors like object interactions or scheduled actions.[26][27]
Solar2D's API is structured around modular libraries that provide high-level abstractions for common functionalities, organized into namespaces accessible directly in Lua scripts. Key libraries include display for creating and managing visual objects, such as loading images with display.newImage("path/to/image.png") to instantiate a textured rectangle; physics, which wraps the Box2D version 3.1 (as of April 2025) engine for simulations via functions like physics.addBody(object, "dynamic")[28]; and system, offering platform-specific information through properties like system.getInfo("platform") to query device capabilities. These libraries encapsulate low-level details, enabling developers to focus on application logic while maintaining portability across targets.[29][30]
Lua scripting in Solar2D benefits from the language's bytecode compilation at load time, ensuring fast execution suitable for performance-sensitive tasks, alongside a sandboxed environment that restricts direct access to the operating system for enhanced security in deployed applications. Scripts operate within a contained file system, where I/O operations are limited to designated directories like system.DocumentsDirectory, preventing unauthorized file or network manipulations outside the app's scope. This isolation supports secure distribution on app stores while allowing controlled persistence and resource management.[25][31]
Error handling and debugging are tailored to the event-driven nature of game loops, with runtime assertions providing immediate feedback on issues like invalid API calls or type mismatches, displayed as pop-up alerts in the simulator or logged to console in builds. Stack traces are generated for unhandled exceptions, tracing back through the call hierarchy to pinpoint errors in main.lua or modular scripts, often including line numbers and context from event listeners. Developers can customize error handlers via the global runtime object to suppress alerts in production or integrate with external tools, ensuring robust troubleshooting without disrupting the core loop.[32]
Runtime and platform abstraction
Solar2D's runtime is implemented as a C++ core, originally developed for the Corona SDK and forked into the open-source Solar2D project under the MIT license. This core orchestrates the application's execution, managing the life cycle from initialization in main.lua through the ongoing event and drawing loop that renders updates to the screen. The runtime environment operates within a secure sandbox, limiting access to files, memory, and network resources to those specific to the application, with paths generated via platform-agnostic APIs to ensure isolation across devices. Memory management in the runtime integrates Lua's automatic garbage collector, which periodically identifies and frees unreferenced objects, including display objects removed from the scene hierarchy. Developers must explicitly set global variables and unused objects to nil to avoid persistent references that could lead to memory leaks, as the collector does not immediately process them. The C++ core complements this by handling native resource allocation, ensuring compatibility with Lua's collection cycle without direct developer intervention in low-level deallocation. To support non-blocking operations, the runtime employs an event-driven model via the global runtime singleton, dispatching events like enterFrame without true multithreading in Lua scripts; instead, coroutines and timers provide cooperative multitasking to prevent UI freezes during long computations. Platform abstraction layers unify hardware and OS interactions, exposing consistent APIs for core functionalities: file I/O through system.pathForFile, which resolves sandboxed paths regardless of the underlying filesystem; device capabilities via system.getInfo, returning details such as model, architecture (e.g., ARM or x86), and environment type; and orientation handling with display APIs that normalize screen metrics across iOS, Android, macOS, and Windows. Performance optimizations target a configurable frame rate of up to 60 FPS, set via the frameRate key in config.lua, with the default at 30 FPS but commonly elevated to 60 for smooth rendering. Updates rely on delta time passed to enterFrame events, enabling frame-rate independent logic by scaling movements and simulations proportionally to elapsed time between frames, thus maintaining consistent behavior even if actual FPS varies due to device load. The runtime accommodates both 32-bit and 64-bit architectures, including ARM (for mobile) and x86 (for desktop), as detected by system.getInfo, allowing builds to target diverse hardware without code changes. Security is enforced through the sandbox, which prohibits arbitrary native code execution from Lua; access to platform-specific features requires plugins, which are C++ or native modules that expose controlled APIs via the runtime, mediating calls to prevent unauthorized system interactions.Features
Graphics and rendering
Solar2D's graphics system is built around the display library, which provides a suite of functions for creating 2D visual elements such as sprites, shapes, and text objects. Sprites and textured images are generated usingdisplay.newImage() or display.newImageRect(), which load bitmap assets and support mipmapping to optimize rendering quality and performance across varying distances and resolutions. Primitive shapes like rectangles, circles, and polygons are created via display.newRect(), display.newCircle(), and display.newPolygon(), respectively, allowing for vector-based drawing that scales without pixelation. Text rendering is handled by display.newText() for standard fonts or display.newEmbossedText() for stylized effects, with options for dynamic font loading and styling.[33]
The rendering pipeline in Solar2D leverages OpenGL ES 2.0 as the primary backend on mobile platforms like iOS and Android, enabling hardware-accelerated 2D drawing through GLSL shaders, while desktop builds on Windows and macOS use OpenGL with experimental support for Vulkan on Windows. A key aspect of the pipeline is the scene graph structure, implemented via display groups created with display.newGroup() or display.newContainer(), which establish parent-child hierarchies for organizing objects. These hierarchies facilitate efficient transformations—such as translation, rotation, and scaling applied via properties like x, y, rotation, and scaleX—and automatic culling of off-screen child objects to minimize draw calls and improve performance.[34][35][36][37]
Visual effects in Solar2D include a range of built-in filters applied directly to display objects through the fill.effect or stroke.effect properties, such as "filter.blurGaussian" for adjustable blurring or "filter.grayscale" for monochrome conversion, which leverage the GPU for real-time processing without custom code. For more advanced customization, developers can define shaders using graphics.defineEffect(), specifying vertex and fragment programs in GLSL ES to create effects like distortion or color manipulation, with access to uniforms such as CoronaTotalTime for animation. These shaders integrate seamlessly into the rendering pipeline, supporting time-dependent effects across platforms.[38][34][39]
Performance optimizations in Solar2D's graphics system emphasize texture atlasing through image sheets, created with graphics.newImageSheet(), which packs multiple assets into a single texture to reduce binding overhead and draw calls, particularly beneficial on resource-constrained mobile devices. The engine also handles high-density displays like Retina by automatically selecting @2x or higher resolution variants based on device capabilities, ensuring sharp visuals while maintaining vector shapes' scalability. These features collectively enable efficient rendering of complex 2D scenes with minimal developer overhead.[40][41]
Physics simulation
Solar2D integrates the Box2D physics engine through its physics library, enabling 2D simulations of moving and colliding objects influenced by forces such as gravity.[30] To initialize the physics system, developers require the library withlocal physics = require("physics") and start the simulation using physics.start(), which must precede other physics operations; the simulation can be paused with physics.pause() or stopped with physics.stop().[42] This setup leverages display objects to represent physical bodies visually, allowing seamless integration of physics with rendering.[30]
Physics bodies are created via physics.newBody(), specifying properties like body type (dynamic for simulated movement under forces, static for immovable objects with infinite mass, or kinematic for velocity-driven motion ignoring forces), mass derived from density and shape area (default density 1.0), and shapes such as circles (shape="circle", [radius](/page/Radius)=20) or polygons (via a clockwise table of up to eight convex vertices).[43] Fixtures are added to bodies using physics.addBody(displayObject, {density=1.0, [friction](/page/Friction)=0.3, [bounce](/page/Bounce)=0.2}), defining collision properties like friction and restitution.[43] Multi-element bodies support complex shapes, such as combining polygons for vehicle components.[43]
Collision detection operates through an event-based system, dispatching events in phases: "began" for initial contact, "ended" for separation, "preCollision" for pre-interaction modifications (e.g., disabling contact with event.contact.isEnabled = false), and "postCollision" for post-interaction analysis including force and friction values.[44] Local events attach to specific bodies (e.g., body:addEventListener("collision", handler) for player-enemy interactions), while global events use Runtime:addEventListener("collision", handler) for broader scenarios.[44]
Joints impose constraints between bodies, created with physics.newJoint(type, bodyA, bodyB, ...) and removed via joint:removeSelf().[45] Common types include revolute (pivot) joints for rotational connections at an anchor point, with optional limits (joint:setRotationLimits(-20, 20)) and motors (joint.motorSpeed = 100; joint.maxMotorTorque = 100000), and distance joints to maintain separation between anchors, adjustable for damping (dampingRatio=0.5) and frequency.[45]
Simulation parameters ensure stability and performance, with gravity set via physics.setGravity(0, 10) in meters per second squared (default: (0, 9.8)), scale adjusted by pixels per meter using physics.setScale(60) (default: 30) to match visual units, and time step controlled by physics.setTimeStep(1/60) for fixed-rate updates.[42] For optimization, bodies "sleep" by default after inactivity to reduce computational overhead, disabled globally with physics.start(true) or per body via body.isSleepingAllowed = false.[46]
Common use cases include platformers, where static bodies form immovable platforms and dynamic bodies simulate player jumps and falls under gravity, and ragdolls, assembled from multiple dynamic bodies connected by revolute joints to mimic limp, physics-driven limb movement.[43][45] Debugging is facilitated by physics.setDrawMode("hybrid"), which overlays wireframes and fills on bodies during simulation for visual inspection of shapes and interactions.[43]
Audio and input handling
Solar2D provides a robust audio library for handling sound effects and music playback, leveraging OpenAL for cross-platform compatibility across mobile, desktop, and TV platforms. Sound effects are typically loaded into memory usingaudio.loadSound(), which prepares short audio files for quick playback, while longer background music tracks are recommended to be loaded via audio.loadStream() to enable streaming and reduce memory usage.[47][48] The library supports up to 32 distinct channels, allowing developers to assign specific sounds to channels for independent control, with properties like audio.totalChannels and audio.freeChannels providing runtime monitoring of channel availability.[49]
Playback is initiated with audio.play(), which returns a channel number and accepts options such as loops for repeating audio indefinitely (e.g., loops = -1 for continuous looping) or a finite number of times, making it suitable for background music that loops seamlessly.[50] Volume management is handled through audio.setVolume(), which sets the master volume or per-channel levels as a decimal value between 0 and 1, enabling dynamic adjustments for effects like ducking music during gameplay. For smoother transitions, fade effects are available via audio.fadeIn(), audio.fadeOut(), and audio.fade(), which gradually adjust channel volumes over a specified time in seconds, preventing abrupt audio changes in user experiences.[51]
Input handling in Solar2D is event-driven, primarily through Lua listeners attached to the runtime or display objects, supporting multi-touch interactions essential for mobile and touch-enabled devices. The touch event provides detailed data including phase values—began for initial contact, moved for drag gestures, ended for release, and cancelled for interruptions—along with coordinates (x, y) and a unique id for tracking multiple simultaneous touches.[52] This structure facilitates gesture recognition, such as pinch-to-zoom, by monitoring distance changes between two or more touch points across moved phases, allowing developers to implement intuitive controls without external libraries.
Keyboard and gamepad inputs are unified under the key event, which dispatches on key presses or releases with properties like keyName for standardized US layout mapping (e.g., "a" or "space") and phase ("down" or "up") for precise timing.[53] Gamepads and joysticks extend this via the same event system, treating buttons as key inputs and analog axes as separate axis events with InputDevice objects to identify the controller, supporting multiplayer scenarios on platforms like Android TV and consoles.[54]
Haptic feedback enhances tactile responses on supported devices through system.vibrate(), which triggers device vibration patterns; for example, a simple call vibrates at default intensity, while options like {"impact", "light"} provide nuanced iOS haptics, with fallback beeps in the macOS simulator.[55] Microphone access for voice input is facilitated through third-party plugins, such as the Microphone plugin, which enables real-time recording, volume detection, and automatic gain control, integrating seamlessly into the build process via build.settings.[56]
For optimization, streaming audio via loadStream() is preferred for extended files to avoid loading entire assets into memory, balancing performance on resource-constrained devices while maintaining low latency for interactive sounds.[49] Input events are lightweight and processed efficiently in the Lua runtime, with touch phases enabling gesture detection without additional overhead, ensuring responsive handling in complex multi-touch scenarios.
Networking and persistence
Solar2D's networking capabilities are primarily handled through thenetwork library, which enables asynchronous HTTP and HTTPS requests via the network.request() function. This function allows developers to send GET, POST, or other methods to specified URLs, handling responses through listener events for success, failure, or progress. For more advanced or low-level connectivity, the socket library, based on LuaSocket version 3.0-rc1, provides TCP socket creation using socket.tcp(), supporting custom protocols beyond standard HTTP. Lua tables are commonly used as data structures for preparing payloads in these networking operations.
Data serialization and deserialization for networking are facilitated by the json library, which converts Lua tables to JSON strings with json.encode() and parses JSON back to tables using json.decode(), ensuring compatibility with REST APIs and web services.
For persistence, Solar2D utilizes the system.DocumentsDirectory constant in conjunction with system.pathForFile() and the io library to store files that persist across app sessions, such as game saves or user progress, by writing and reading data via io.open(), io.write(), and io.read(). Binary storage is achieved by directly writing raw bytes to files opened in binary mode. Simple key-value storage for preferences, like user settings, is managed through system.setPreferences() to write tables to device storage and system.getPreference() to retrieve values, with categories such as "app" for app-specific data.
Cloud integration is supported through marketplace plugins, including those for Firebase, which handle authentication, analytics, and real-time databases, and PlayFab, which provides backend services for leaderboards, multiplayer, and virtual economies. Multiplayer functionality, such as real-time synchronization, can be implemented using WebSocket plugins like the develephant WebSockets client, enabling bidirectional communication over ws:// or wss:// connections.
Security in networking is enforced by default support for HTTPS in network.request(), which uses the device's native TLS implementation to secure data transmission. Developers are recommended to encrypt sensitive user information, such as passwords, using Lua-compatible libraries like LuaCrypto before storage or transmission, following platform-specific guidelines to avoid cleartext exposure.
Development and Deployment
Simulator and tools
The Solar2D desktop simulator serves as the primary development environment for prototyping and testing applications on macOS and Windows platforms. It offers real-time preview capabilities, allowing developers to run Lua code directly on the host machine and observe immediate visual and behavioral feedback without needing physical devices. A key feature is hot-reload, which automatically reloads and updates the simulation upon saving changes to the source files, streamlining iterative development workflows.[57] The simulator emulates diverse mobile device characteristics to facilitate cross-platform testing, including various screen sizes, aspect ratios, and orientations configurable via the project's config.lua file. For instance, developers can specify content scaling modes such as "letterbox" or "zoomEven" to adapt visuals to different resolutions, ensuring consistent rendering across emulated iOS and Android form factors. Performance profiling is supported through built-in APIs like system.getTimer() for timing code execution and monitoring frame rates, helping identify bottlenecks early in development.[58] Debugging within the simulator relies on straightforward logging via the print() function, which directs output to an integrated console window for real-time inspection of variables, errors, and execution flow. For more advanced debugging, such as setting breakpoints, stepping through code, and inspecting variables, integration with external tools like ZeroBrane Studio is commonly employed; this Lua IDE connects to the simulator via debug flags (e.g., launching with "/debug" on Windows or "-debug YES" on macOS) to enable remote debugging sessions. Memory management features include manual garbage collection calls and monitoring via collectgarbage("count"), allowing developers to track Lua memory usage and detect potential leaks by observing incremental increases over repeated simulations.[32][59] Solar2D lacks a built-in asset or scene editor, emphasizing instead seamless integration with external integrated development environments (IDEs) for asset handling and code management. Popular choices include Visual Studio Code with dedicated extensions like Solar2D Editor, which provide Lua syntax highlighting, API autocompletion for over 1,000 functions, and project launching directly from the IDE to the simulator. This setup supports efficient organization of assets such as images, sounds, and scripts within project directories.[60] For testing, Solar2D leverages the Busted unit testing framework, a robust Lua library that enables writing and executing modular tests outside or alongside simulator runs. Developers can mock Solar2D APIs (e.g., display objects) to isolate logic and verify functionality, with tests invocable via command-line tools or simulator integration. To simulate resource-constrained environments, the framework dispatches memoryWarning events that trigger low-memory scenarios, allowing tests to validate application resilience without actual device deployment.[61][62]Build process and platforms
Solar2D facilitates the compilation and packaging of applications through its Simulator tool, which generates platform-specific binaries or exports while maintaining portability via the underlying runtime abstraction. The primary configuration occurs in thebuild.settings file, a Lua table placed in the project root that defines essential parameters such as application name, version, supported orientations, icons, splash screens, and plugins. For instance, orientations are specified under a table with keys like default and supported, allowing values such as "portrait" or "landscapeRight". Plugins are included via a plugins table, referencing publisher IDs and versions, e.g., ["plugin.gpgs"] = { publisherId = "com.coronalabs" }. Icons vary by platform: Android requires density-specific PNG files (e.g., Icon-xxxhdpi.png at 192×192 pixels), iOS uses asset catalogs in Images.xcassets, Windows employs Icon-win32.ico, and macOS utilizes Icon-osx.icns.[63]
Builds are performed locally using the Simulator to generate platform-specific projects, requiring tools like Xcode for iOS and Android Studio for Android. Live builds for device testing are available via cloud for iOS, Android, and tvOS, allowing real-time updates without full recompilation, but production builds must be handled locally. Optimization options in build.settings include flags like skipPNGCrush = true under the iphone table to disable PNG compression processing during iOS builds, reducing build time at the potential cost of larger file sizes.[4][64]
Solar2D remains actively maintained as of 2025, with recent releases such as version 2025.3722 in August 2025 introducing improvements to HTML5 builds and other features.[65]
| Platform | Output Format | Key Requirements | Signing/Deployment Notes |
|---|---|---|---|
| iOS | .app bundle | Apple Developer account, provisioning profiles, Xcode | Requires development or distribution certificates generated via Keychain Access and the Apple Developer portal; supports Ad Hoc for limited devices or App Store for submission. Local builds use Xcode for compilation and sideloading via USB or iTunes for testing.[66] |
| tvOS | .app bundle | Apple Developer account, provisioning profiles, Xcode | Similar to iOS; requires tvOS-specific icons and launch screens. Deployment via Xcode to Apple TV devices or App Store.[67] |
| Android | APK or AAB | Java package name, keystore, Android Studio | Debug signing uses a default debug.keystore; release builds require a custom keystore generated with keytool. AAB is optimized for Google Play, including app bundle signing. Local installation via Android Studio or adb install for sideloading.[68] |
| Android TV | APK or AAB | Java package name, keystore, Android Studio | Requires leanback launcher support; tested on Android TV devices. Signing and deployment similar to Android, via Google Play or sideloading.[68] |
| Amazon Fire | APK | Java package name, keystore, Amazon Developer account | Builds similar to Android; deployment via Amazon Appstore. Requires Amazon-specific testing on Fire tablets and TV.[69] |
| Windows Desktop | .exe executable | OpenGL 2.1+ driver | Builds directly from Simulator, producing a 32-bit .exe with DLLs and assets in a folder; no signing required for basic distribution, though code signing is recommended for security.[70] |
| macOS Desktop | .app bundle | macOS system | Generated via Simulator; includes bundle structure with assets. Notarization via Apple's tools is advised for distribution outside the Mac App Store.[71] |
| Linux Desktop | Executable binary | Linux system with OpenGL | Community-maintained support; builds via Simulator on macOS/Windows, experimental deployment on Linux distributions like Ubuntu. No official signing process.[72] |
| HTML5 | Web folder export | WebGL-compatible browser | Exports a self-contained directory with HTML, JavaScript, and assets for WebGL rendering; no compilation needed, deploy by uploading to a web server for browser access. Still in beta, with Lua-JavaScript interop supported.[73] |
Community and Ecosystem
Documentation and support
Solar2D provides comprehensive official documentation through its primary resource at docs.coronalabs.com, which includes a detailed API reference covering over 1,000 APIs for libraries such as display, physics, and audio, along with beginner-oriented guides like the "Getting Started" section that introduces project creation, Lua programming basics, and platform setup.[74][75][76] The documentation also features topic-specific guides on areas like distribution, monetization, and media handling, ensuring developers have structured paths for learning core functionalities.[76] Video tutorials supplement the written resources, with official and community-endorsed series available on YouTube, such as the "Solar2D Getting Started Tutorials" playlist that covers project setup, scene management, and deployment in step-by-step videos aligned with the documentation.[77] These tutorials, often referencing the docs.coronalabs.com guides, help visual learners implement concepts like physics simulations and audio integration from the outset.[78] Community support is facilitated through the official forums at forums.solar2d.com, where users engage in Q&A on technical issues, share code snippets, and discuss best practices, with active categories for announcements including 2025 releases like version 2025.3726 that detail fixes for audio and Android API compatibility.[1][79] Bug reports and feature requests are handled via the GitHub repository at github.com/coronalabs/corona, where issues are tracked and resolved by contributors, supporting the open-source development model.[2] Learning paths include sample projects bundled with the Solar2D Simulator, providing hands-on examples for features like sprite manipulation and physics, accessible in daily builds available through GitHub releases for testing upcoming changes.[80] Migration guides from the legacy Corona SDK are available primarily through forum threads, offering step-by-step instructions on transitioning from online builds to Solar2D's offline system, including plugin updates and build settings adjustments.[81] Support for Solar2D is entirely community-driven, relying on responsive maintainers and thousands of developers via forums, Discord, and GitHub, with no paid tiers but options for project sponsorship to aid maintenance.[1][82] This model ensures timely responses to queries, as evidenced by rapid discussions following 2025 release announcements.Plugins and extensions
Solar2D's plugin system enables developers to extend the engine's core functionality by integrating native code modules written in languages such as Objective-C for iOS, Java or C++ for Android, and wrapping them for use in Lua scripts. These plugins are loaded dynamically via therequire() function and configured through the build.settings file, where developers specify the plugin's publisher ID and version to include it during the build process. This architecture allows access to platform-specific APIs that are not natively available in Solar2D's Lua-based environment, such as advanced device hardware interactions or third-party services.[83][84]
Plugins are categorized by their primary function, with common types including advertising and monetization tools, analytics and attribution services, social networking integrations, and utility features for hardware or system-level tasks. For advertising, examples include the Unity Ads v4 plugin, which supports rewarded video and interstitial ads, and the Appodeal plugin, which aggregates multiple ad networks for optimized revenue. In analytics, the Firebase Analytics plugin provides event tracking and crash reporting, while social plugins like the Facebook SDK v4 enable sharing, login, and app invites. Utility plugins encompass NFC for near-field communication reading and writing, as well as haptic feedback via the Taptic Engine plugin for customizable vibration patterns on supported devices.[85][83][86]
The primary resource for discovering plugins is the Solar2D Free Plugin Directory at plugins.solar2d.com, which hosts a collection of community-contributed, open-source options available at no cost. For paid or premium plugins, developers can turn to marketplaces such as the Solar2D Plugins Marketplace or offerings from studios like Spiral Code Studio, which provide specialized extensions like QR scanners or text-to-speech capabilities. These directories ensure plugins are vetted for compatibility with Solar2D's build process and simulator testing.[85][87][86]
Developing custom plugins follows structured guidelines outlined in Solar2D Native documentation, starting with creating a shared library (e.g., .so for Android or .a for iOS) and exposing functions through Lua bindings. Plugins must adhere to naming conventions like "plugin.name" and include a build.settings integration template for easy adoption. Representative examples include the plugin.zip library for file compression and decompression tasks, and plugin.utf8 for handling UTF-8 encoded text processing in Lua. Self-hosted plugins can be built using Corona Native tools and tested in the simulator, allowing developers to distribute them independently or submit to directories for broader use.[84][85]