Git Product home page Git Product logo

corona-docs's Introduction

Solar2D game engine documentation

Deploy to GitHub pages

This documentation gets deployed to: https://docs.coronalabs.com/

Engine source can be found here

Documentation lives in markdown/ directory. Note that it does not use GitHub flavored Markdown, but rather its own flavor.

Plugin documentation lives in a submodule. Mind it when checking out. Submodule documentation is auto-generated and not intended to be edited manually.

To build documentation yourself from bin directory run lua build.lua. Make sure Lua has LFS (Lua File System) accessible.

To build docs with docker (same as production) run

docker run --rm -it -v "$(pwd)":/src --workdir /src/bin --entrypoint /usr/bin/lua  coronalabs/docs build.lua

corona-docs's People

Contributors

alanthomson avatar ansh3ll avatar clang-clang-clang avatar daveyang avatar depilz avatar dimaundso avatar finickydesert avatar ggcrunchy avatar ilsui avatar lerg avatar mtexplorative avatar qwebltd avatar ricaragao avatar scottrules44 avatar sekodev avatar shchvova avatar sumtin avatar xedur avatar yosus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

corona-docs's Issues

Corona Simulator: Packaging app takes for Ever

I am new to the SDK, when I try to build apk of demo project corona simulator show progress bar window "Build Progress" it says Packaging app
and it takes for ever nothing even show in the console window
I don't know how to fix this issue . help is appreciated.

Some additional requirements in Solar2D documentation

As in the previous Google Play Games Services plugin, the addition of the following code is required in order to use the Google Play Games Services from Google, but the documentation of the new version of the plugin (plugin.gpgs.v2) does not contain this part:

Additionally, you must specify the Google Play Games App ID in the android table of build.settings as the googlePlayGamesAppId key:
`
settings = {

android =
{
    googlePlayGamesAppId = "YOUR_APPLICATION_ID",
},

}
`

Documentation for Using Plugins in Solar2D Native needs to be updated with correct procedure

https://docs.coronalabs.com/native/ios/usingPlugins.html states:

To use plugins with Solar2D Native builds through Xcode, you must include them in build.settings just like you would for Simulator builds, for example:

settings =
{
    plugins =
    {
        ["plugin.openssl"] =
        {
            publisherId = "com.coronalabs"
        },
    }, 
}

That just doesn't work that way anymore. This generates an error:
ERROR: plugin could not be validated: plugin.openssl (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/plugin.openssl
ERROR: exiting due to plugins above not being activated.

which points to an old coronalabs url and not a way to activate the plugin.

Code formatting in docs now contains hidden characters

Seems that some recent change may have broken the code formatting on the docs. I noticed this some days ago already, but today I double checked and it seems to affect every code block in the documentation.

There is some invisible character in place of empty lines, tabs, etc. that will prevent the code from being run. These invisible characters become visible when using tools like Luacheck in Visual Studio Code.

See: https://docs.coronalabs.com/api/library/json/decode.html
image

App Keystore Not Working in Solar SDK

When i try and build my app it asks for my keystore but even if I input a valid password and keystore i still receive error saying "Keystore password not valid"

Please fix this

GPGSv3 docs should mention that using Google to roll out is required

On the page:
https://docs.coronalabs.com/plugin/gpgs3/index.html

I think it's worth mentioning that deploying locally using "Copy to device and launch" will not work. Instead, developers must use one of Google's testing tracks (ie: internal testing) to roll out the app to testing devices.

The hyperlink at the top of the page to "Sample" is broken, and could either be removed or pointed to:
https://github.com/solar2d/com.solar2d-plugin.gpgs.v3/tree/master/src/Corona

Broken and outdated links in documentation

In https://docs.coronalabs.com/guide/html5/plugins/index.html, there are two references to a VK Direct sample plugin in Bitbucket, but the link is dead. On the same page, there are also support links to the old forums and Slack.

In https://docs.coronalabs.com/api/library/display/loadRemoteImage.html, the sample codes reference an image on Corona Labs' website that no longer exists. This'll result in crashes once the network listeners try to manipulate the images (that don't get created).

Шумы Перлина

Как можно добавить и присвоить изображения к коду, где создан шум Перлина для того, чтобы шум Перлина был выведен присвоенными изображениями на эмулятор смартфона в движке Corona на языке lua? Если есть шаблон, прошу скинуть его или показать. Формат шума Перлина, 2D.

ERROR: configuring 'shared.google.play.services.ads_com.coronalabs' failed! on Android

We integrated AdMob plugin https://marketplace.coronalabs.com/corona-plugins/admob on Android. Build is successful on iOS with Corona SDK Corona-2020.3577/Corona-2020.3583. However, build fails for Android with following error:

ERROR: configuring 'shared.google.play.services.ads_com.coronalabs' failed!

FAILURE: Build failed with an exception.

  • Where:
    Build file '/private/var/folders/fv/ncmkw66n02g3j471fmv4nd9h0000gp/T/CLtmpwAmei4/template/app/build.gradle.kts' line: 275
  • What went wrong:
    Could not open dsl remapped class cache for ey6ny8s8m4znsvsu606cxnn4z (/Users/laxmansahni/.gradle/caches/5.4.1/scripts-remapped/corona_41juodkgpmcwy5xg30fkn0jt0/ey6ny8s8m4znsvsu606cxnn4z/dsldcd040730888da95d185715568c9cc57).
    > Could not open dsl generic class cache for script '/private/var/folders/fv/ncmkw66n02g3j471fmv4nd9h0000gp/T/CLtmpwAmei4/template/app/build/corona-plugins/shared.google.play.services.ads_com.coronalabs/corona.gradle' (/Users/laxmansahni/.gradle/caches/5.4.1/scripts/ey6ny8s8m4znsvsu606cxnn4z/dsl/dsldcd040730888da95d185715568c9cc57).

Our build.settings file
settings =
{
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight

	default ="portrait",
	supported = {"portrait"},
},

android =
{
    applicationChildElements =
    {
        [[
            <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-xx~xx"/>
        ]],
    },
},

 iphone = 
{
    plist = 
    {
         GADApplicationIdentifier = "ca-app-pub-xx~xx"  
    },
},

plugins =
{
    ["plugin.admob"] =
    {
        publisherId = "com.coronalabs"
    },
},

}

A broken link

Hello!

I was happily learning about 2.5D when I came across a helpful video that has a broken link. Perhaps you are already aware, but in the case that you are not, I thought it prudent to inform you.

Here is the page in question: https://docs.coronalabs.com/guide/graphics/3D.html

Thank You for an amazing SDK!

Update Needed to Amazon IAP Documentation for Native Builds

I just received an email from Amazon that they have updated the syntax for the AndroidManifest.xml related to IAP, and in looking into the issue I noticed that the IAP documentation would need to be updated as well.
The old code reads:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver">
    <intent-filter>
        <action android:name = "com.amazon.inapp.purchasing.NOTIFY"
            android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY"/>
    </intent-filter>
</receiver>

Amazon's updated code moves android:permission out of <intent-filter>:

<receiver android:name = "com.amazon.device.iap.ResponseReceiver"
      android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY">
    <intent-filter>
      <action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
    </intent-filter>
  </receiver>

Error in AdMob Plugin Documentation

In the AdMob Plugin documentation, under Project Settings>plist>GADApplicationIdentifier, there is a value filled in for the GADApplicationIdentifier. This might be confusing to new users since they should be placing their own AdMob App ID there.
I suggest replacing the existing AdMob App ID with "[YOUR_ADMOB_APP_ID]" so it is consistent with the instructions in the Android section of the Project Settings.

Android Google IAP Subscription Purchase

For subscription purchases, calling 'store.purchase()' will return an error (see below).

Null data in IAB result (response: -1002:Bad response received)

Will need to use 'store.purchaseSubscription()' which isn't documented, but was seen in the forums. I have tested it on android subscription and it works. Also note that calling 'store.consumePurchase()' on a subscription item will return an error (see below)

Items of type 'subs' can't be consumed. (response: -1010:Invalid consumption attempt)

No more need for Java

We should remove mention of installing Java from documentation, since it is bundled with Solar2D now

Documentation of Samsung IAP

This is an issue I discovered with the documentation for Samsung IAP on this page:
https://docs.coronalabs.com/plugin/samsung-iap/index.html

Towards the bottom of the page there is a note that says this permission will automatically be added: "com.samsung.android.iap.permission.BILLING".

When I build the APK for the Samsung store and uploaded, the store did not find that permission above and would not allow IAP items to be added. I resolved this by manually adding that permission to the project build.settings.

Either the build system should be adding this in and is not doing that, or consider changing the note in the documentation so users know to manually put that permission in the build.settings file.

Just incase this is not happening to other users, I am building on a MacBook Pro (16-inch, 2021) Apple M1 Max, using Solar2D build 2022.3664

Thank you.

Documentation missed in Apple IAP

According to the documentation in the Apple IAP https://docs.coronalabs.com/plugin/apple-iap/init.html the store.init() will call listener with the "init" event like Google IAP, but that event it is not included in the documentation for Apple IAP in event.name. Due to a recent post I posted in our forum I've noted that some developers understand that that event does not exist for Apple and due to that they implement a function who is called every frame in order to wait for the store to be initialized and then call the load of the products.

The code style is not displayed correctly

The code style is not displayed correctly, perhaps because the CDN cannot pull the JS file? It started about three days ago.

The JS that failed to load are:

  • docs.js
  • shCore.js
  • shAutoloader.js

All three have the domain name corona-cdn.coronalabs.com.

alpha

https://docs.coronalabs.com/api/type/DisplayObject/alpha.html

According to the doc alpha is a DisplayOblect's feature, but I see that it also works with native objects and only on certain platforms.

Example:
sn_TB = native.newTextField(x, y, R_width_int, TB_height_int)

E.g. in emulator on Windows this will not work:
sn_TB.alpha = 0

This will not work too:

transition.to(
	sn_TB,
	{time = 250,
	alpha = 1}
	)

It gives an error:
WARNING: D:\a\corona\corona\subrepos\transition\transition.lua:XXX: Native UI objects on Windows do not support the "alpha" property.

But, on Android device the transition works smoothly! I guess, this is undocumented feature of alpha which got to be added to the official docs. (I am not sure about iPhones...) Thanks.

Update Docs for Social Popup plugin not intended for iOS 8+

Consider adding a note to developers in the Social Popup plugin page that this plugin is not for use in Apple iOS 8+. As quoted by Rob further below in the forum, Apple recommends using the Activity plugin.

I coded in the Social Popup not knowing this, and had an error on device that on iOS it never recognizes social apps are installed with native.canShowPopup() method. I am going in now to add code to recognize if Android or iOS and use either depending.

Docs for Social Popup plugin:
https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_social/index.html

Mention by Rob to use Activity plugin for Apple iOS 8+ by Rob:
The social popup on iOS is really a pre-iOS 8 feature. Starting with iOS 8, Apple wants you to use the “Activity” plugin. It’s possible that iOS 11 has in some way broken the the API that canShowPopup depends on.
https://forums.solar2d.com/t/native-canshowpopup-always-returning-false/348130

Thanks

Dead documentation pages

I've been on a spree with updating the docs and while doing so, I've run into several pages that I believe to belong to plugins/features that are no longer supported by either Solar2D and/or the other party.

Before I start removing such pages, I wanted to double check that these pages are indeed "dead":

  • Airpush: Seems like a very old plugin that has references to Starter, Pro and Enterprise tiers. Their website, airpush.com, also seems to be down and the company doesn't have any activity since 2016. They may be known these days as Airnow Media, but it seems unlikely that the plugin or service works, or am I wrong?
  • FusePowered: The company is defunct and surely their service is dead with them?
  • Hockey/HockeyApp: The listed URL: http://hockeyapp.net/ redirects to https://appcenter.ms/, i.e. the original company has been acquired by Microsoft. Is the plugin active anymore?
  • MediaBrix: May have once been an ad provider, but now they seem to just be a Dutch web marketing business that does SEO, etc. See: https://www.mediabrix.com/
  • Ouya: The company was acquired by Razer, which ended the platform in 2019.
  • PeanutLabs: Their last Twitter post was in 2017, last blog post in 2016. The company seems to be dead.
  • Gamehouse Promotion Network: The company seems to be dead too. If you go to their page, https://partners.gamehouse.com/app-promotion-and-app-monetization/, and try to log in, sign up, get started, etc. then nothing works.
  • Any references to Windows Phone (WP): Windows Phones, and by extension CoronaCards for WP, are all dead and buried, and can be removed, right?
  • rcssdk: A Rovio SDK? Seems to just be empty without any functionality, something was supposed to happen but nothing did.
  • RevMob: Last Twitter post in 2017. Their website doesn't work. Seems to be another dead and buried company?
  • TrialPay: They were acquired by Visa in 2015 and their site no longer exists.
  • apsalar: They were acquired by Singular. Does their plugin still work or is it dead?

Are there some documentation pages that I missed? Are some of these still fully functional and shouldn't be removed?

Discussion: Should "Revision" be removed from docs?

Currently most, if not all documentation pages, have a reference to Revision, which should refer to the last version of Solar2D where a particular API was updated/revised.

The reality, however, is that Revision doesn't mean anything. For instance,

  • timer framework was last updated in 2021.3642
  • system.getInfo() was apparently updated in 2021.3639
  • scrollView widget was updated in 2021.3636
  • There have also been several ad plugin updates across the recent version

But all pages state that the last revision was in Release 2020.3619.

Shouldn't we remove reference to Revision in the docs since it does actually do what it is supposed to, but instead it points to a very old build, which will result in numerous issues if someone were to actually download it. It provides no information or value, just a risk for new users.

Failed to compile plugin Lua scripts ( in an excluded platform )

I'm trying to create a build for Windows(from a PC machine) and in my build.settings the reviewPopup plugin is configured only for iphone, but my console receive this error:

ERROR: Could not complete build because there were compile errors in Lua file: C:\Users\Acer\AppData\Local\Temp\Corona Labs\Win32 Build a13472\obj..\Plugins\PaxHeader\plugin_reviewPopUp.lua

my build.settings file look lilke this:
["plugin.reviewPopUp"] = {
publisherId = "tech.scotth",
marketplaceId = "3u65hy",
supportedPlatforms = { iphone=true }
},

build.sh in project template for Solar2D Native — iOS fails out of the box

To reproduce:
Follow first instruction from this page: https://docs.coronalabs.com/native/ios/index.html
Within the /Applications/Corona/Native/ folder, double click Setup Corona Native. This will create the symbolic link required for the project templates

Copy that template, and run build.sh. It fails with this error:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /path_to_app/App/ios/build/Release-iphoneos/libplugin_library.a and /path_to_app/App/ios/build/Release-iphonesimulator/libplugin_library.a have the same architectures (arm64) and can't be in the same fat output file

This is Corona version 3677 with Xcode 12.1.

Documentation mistake

Hi,
In the page about the plugin GPGS V3, when you click on the isConnected event link, the next page show two properties: event.name and event.isError, and when you click on event.isError you get the page related to the isConnected event. It should be event.isConnected istead of event.isError. Please, fix these because it seems there is a confusion about the listener gpgs.isConnected(listener)

Bug in sample code of gameControllers documentation

Hello.

In section
Handling Controller Input

in the sample code, the two lines

Runtime:removeEventListener( "axis", onAxisEvent )
Runtime:removeEventListener( "key", onKeyEvent )

are useless because onAxisEvent and onKeyEvent are not yet defined in the script.

They should be placed into the event themseves to work correctly

local function onKeyEvent( event )
    setDevice( event.device, event.device.displayName )
    Runtime:removeEventListener( "key", onKeyEvent )
end

local function onAxisEvent( event )
    if ( math.abs(event.normalizedValue) > 0.5 ) then
        setDevice( event.device, event.device.displayName )
        Runtime:removeEventListener( "axis", onAxisEvent )
    end
end

Google Play Billing plugin

The store.finishTransaction function is not included in the documentation for the new Google Play Billing plugin, nevertheless it is included in the In-App Purchasing guide from the documentation ()

"plugin.notifications.v2" is generating error

"plugin.notifications.v2" is generating error "OneSignal has detected that your application delegate implements a deprecated method (application:didReceiveLocalNotification:) Anyone know how to get hold of the plugin developer?

Plugins - Zip - uncompress - Android - not working

No error description while starting this method on Android.
In the Emulator all files correctly uncompressing and it shows in the C:\Users\Admin\AppData\Local\Corona Labs\Corona Simulator\Sandbox\src-0BAC7529E8B1EB90888EA242419F7D9A\TemporaryFiles

09-06 19:48:34.099: I/Corona(24832): zipListener() >>
09-06 19:48:34.099: I/Corona(24832): Error:
09-06 19:48:34.099: I/Corona(24832): type uncompress
09-06 19:48:34.099: I/Corona(24832): name zip
09-06 19:48:34.099: I/Corona(24832): errorMessage
09-06 19:48:34.099: I/Corona(24832): isError true
09-06 19:48:34.099: I/Corona(24832): response table: 0x7f6c7f7740
App console data:
09-06 19:48:35.325: I/Corona(24832): doc_path: /data/user/0/com.app/cache/tmp/system.png
09-06 19:48:35.325: I/Corona(24832): Starts os.rename: move file [/data/user/0/com.app/cache/tmp/system.png] to [/data/user/0/com.app/cache/tmp/file.png] =>
09-06 19:48:35.325: I/Corona(24832): result=nil
09-06 19:48:35.325: I/Corona(24832): (x) File not renamed /data/user/0/com.app/cache/tmp/system.png: No such file or directory
09-06 19:48:35.325: I/Corona(24832): reason=[/data/user/0/com.app/cache/tmp/system.png: No such file or directory]

Documentation: customFont extension not used for loading fonts.

https://docs.coronalabs.com/guide/system/customFont/index.html

-- Standard text object -- font in the same folder with main.lua
local displayText = display.newText( "Hello World", 150, 80, "CoolCustomFont.ttf", 24 )
 
-- Standard text object -- font in a folder named "fonts"
local displayText = display.newText( "Hello World", 150, 80, "fonts/CoolCustomFont.ttf", 24 )
 
-- Font for native text input field
local inputText = native.newFont( "CoolCustomFont.ttf", 16 )
local textField = native.newTextField( 150, 150, 180, 30 )
textField.font = inputText

In my testing, using the .tff extension in the file name does not work. It appears to only work without the extension.

Windows 11
2022.3681 (2020.10.8)

Cant remove it

When I try to remove it it says preparing to uninstall and how long I wait nothing basicly happens,Is this a problem with my PC or am I somehow doing deletion wrong?

Error using Flurry Analytics plugin on Samsung store

Flurry Analytics plugin uses the Google Play Services on Android and this causes a blocking error to occur when the app is built for Android on Samsung Store.
https://docs.coronalabs.com/plugin/flurry-analytics/index.html

Note: Flurry Analytics mentions they use the Google Play services to "check for and respect the user's ad tracking preference": https://developer.yahoo.com/flurry/docs/analytics/gettingstarted/android/

The error is an Alert that appears just after the launch screen and prevents the app from continuing to run:
"Corona: Developer Error
[App Name Here] does not target the Google Play store,
but includes Google Play Services.
This is adding unnecessary bloat to your app as
Google Play Services depends on the Google
Play store.
Please remove Google Play Services from builds
that do not target Google Play.
Exit"

I am wondering if the Flurry plugin can be updated to not use the Google Play Services when publishing for Samsung, and not show the error message and work on the Samsung store? The Flurry plugin does work on Amazon which makes me think it can work without Google Play Services.

Best regards.

Documentation should contain warnings about Vungle regarding Google Play

The main Vungle plugin and the Appodeal Vungle plugin are both outdated and contain a side-loading loophole that violates Google Play Store policy. Including either of these plugins in a build that is uploaded to the Play Store, even in an internal testing track, results in the app being removed entirely from the Play Store and the developer receiving a strike on their account. (I just found this out the hard way when I was alpha testing Appodeal with one of my apps.)
This has the potential to do real harm to a developer and should be mentioned in the documentation. I recommend adding a "Gotchas" section to the Vungle plugin page and the Appodeal plugin page mentioning this.
Suggested text for the Vungle plugin:
WARNING: The Vungle plugin contains a side-loading loophole that violates Google Play Store policy and should not be used in builds targeting the Google Play Store. Uploading a build to the Google Play Store that contains the Vungle plugin will result in the app being removed from the Play Store.
Suggested text for the Appodeal plugin:
WARNING: The Vungle plugin contains a side-loading loophole that violates Google Play Store policy and should not be used in builds targeting the Google Play Store. Uploading a build to the Google Play Store that contains the Vungle plugin will result in the app being removed from the Play Store. Make sure to comment out plugin.appodeal.Vungle or plugin.appodeal.beta.Vungle from your build.settings file when building for the Play Store.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.