Code Monkey home page Code Monkey logo

coronalabs / corona Goto Github PK

View Code? Open in Web Editor NEW
2.4K 106.0 256.0 189.79 MB

Solar2D Game Engine main repository (ex Corona SDK)

Home Page: https://solar2d.com/

License: MIT License

Perl 0.15% Lua 6.19% Shell 0.79% Ruby 0.01% Python 0.04% AppleScript 0.01% Batchfile 0.15% C++ 60.95% C 9.16% Objective-C 1.87% CMake 0.21% Java 9.19% Makefile 0.86% HTML 0.58% Objective-C++ 8.42% Swift 0.01% Roff 0.01% C# 1.36% XSLT 0.01% CSS 0.05%
corona coronasdk cross-platform game-engine ios desktop mobile live-coding android engine

corona's Introduction

Solar2D Game Engine

Download the latest build from the Releases page and join the community on Discord and the forums.

Rebranded Corona SDK

Simple to learn and use, completely free and open source 2D game engine.

Solar2D Logo

Easy-to-learn & powerful

Solar2D is a cross-platform framework which is ideal for rapidly creating apps and games for mobile devices, TV, desktop systems and HTML5. That means you can create your project once and publish it to multiple devices, including Apple iPhone and iPad, Android phones and tablets, Amazon Fire, Mac Desktop, Windows Desktop, Linux, HTML5 and even connected TVs such as Apple TV, Amazon Fire TV, and Android TV.

Benefits of usage Solar2D

  • Free for everybody – Enterprise features for every developer.
  • The easiest development tool for 2D games and mobile applications.
  • Solar2D allows creating apps easily, up to 10 times faster than other frameworks.
  • Supported by a detailed documentation system.
  • Write the code once, run it many different places – Solar2D supports all major mobile platforms.
  • Constantly growing pool of first-party and community provided plugins and ready-to-go app assets.
  • A vibrant community of both application and game developers.
  • Simulator, which runs the app directly on PC/Mac, simplifies the prototyping process and helps quickly test ideas and concepts.
  • A logical and consistent API that covers over 1000 functions and allows to get things up and running very fast.

Feature highlights

Simulator and Live Builds

Solar2D speeds up the development process - update your code, save the changes, and instantly see the results in our instant-update Simulator. When you're ready to test on real devices, build and deploy your app just once and then see code/assets, update automatically, all over your local network. Just like magic.

Lua-based

Lua is an open source scripting language designed to be lightweight, fast, yet also powerful. Lua is currently the leading scripting language in games and has been utilized in Roblox, The Elder Scrolls Online, Don't Starve, World of Warcraft ™, Angry Birds ™, Civilization ™, and many other popular franchises.

Use with your favorite text editor

You can use Sublime Text(Editor), Atom(autocomplete-corona), Visual Studio Code(Solar2d-companion), ZeroBrane Studio and many others.

Plugins for all needs

Select from numerous plugins which extend the Solar2D core for features like in-app advertising, analytics, media, and much more. A vast variety of plugins is available via Solar2D free directory or third party stores, like Solar2D Marketplace and Solar2D Plugins.

Call any native library

If it’s not already in the core or supported via a plugin, you can call any native (C/C++/Obj-C/Java) library or API using Solar2D Native. It also allows to easily package your code as a plugin.

Cross-platform

Develop for mobile, desktop, and connected TV devices with just one code base.

Installation

The easiest and recommended way to get started with Solar2D is to download binary distribution from the releases page.

API documentation and guides

Exhaustive Solar2D API documentation, as well as getting started and more advanced guides are available on docs.coronalabs.com.

Source Code and licensing

Solar2D is licensed under MIT open source license.

This license gives you the full rights to customize the engine and distribute built apps on your own terms.

Note that Solar2D incorporates many libraries, both third-party and made by Solar2D developers. They may have different licenses.

Contributing

If you are willing to improve Solar2D by contributing code, fork this repository and create a pull request with desired improvements. The project uses git submodules, so to clone the whole source code tree run

git clone --recursive https://github.com/coronalabs/corona.git

Due to the open source nature of Solar2D distribution, all contributors would have to sign a simple Contributor License Agreement (CLA) to ensure that their code can be part of Solar2D ecosystem. For more details see CONTRIBUTING.md.

Entry points for each platform are located in the platform directory. Refer to README.md files in its subdirectories.

Governance and Code of Conduct

Solar2D is maintained by community, with principal developer shchvova. Our mission is to make Solar2D the best game engine ever.

To participate in the Solar2D community or development you must follow the Solar2D Community Code of Conduct (see CODE_OF_CONDUCT.md)

corona's People

Contributors

aergo20 avatar agramonte avatar bakeinflash avatar clang-clang-clang avatar coronarob avatar cublah avatar daisy1754 avatar dans2d avatar depilz avatar destiny-2048 avatar dimaundso avatar dyln avatar friedrich-eibl avatar ggcrunchy avatar jkirkwood avatar kan6868 avatar leonid-ganin avatar lfabreges avatar nefari0us avatar pouwelsjochem avatar schroederapps avatar scottrules44 avatar sekodev avatar shchvova avatar thespydog avatar ubulem avatar xedur avatar zdmitrynsk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corona's Issues

corona/platform/mac/build.sh

cd corona/platform/mac
./build.sh

gives the following error (but perhaps this is again an internal script who must not be used ?):

Build system information
warning: ignoring duplicated output file: '/Users/larpoux/projmac/corona/platform/mac/build/Release/Corona Simulator.app/Contents/Resources/AppSettings.lua' in shell script build phase 'Run script (write AppSettings: customBuildID, buildBucket, etc if defined)'. This warning represents an extremely serious project misconfiguration and will likely cause some shell scripts in your project to be skipped entirely, leading to other build failures or missing files in the build directory. This will be a hard error in the future. (in target 'rttplayer')

apkFiles option in build.settings not coppying files - building for android

I tried to use "apkFiles" directive to create values-xx folder in aplication root directory as described here:
https://docs.coronalabs.com/guide/distribution/advancedSettings/index.html#android-directives

I created 3 test files in main project folder (where main.lua) is located:
"testfile2.xml",
"res/values/testfile.xml",
"res/values-cs/strings.xml",

I also added apkFiles to build.settings:
`settings =
{
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", },
},

--
-- Android section
--
android =
{
	usesPermissions =
	{
		"android.permission.INTERNET",
	},
	
	--this part is ignored for some reason !!!
	apkFiles =
    {
        "testfile2.xml",
        "res/values/testfile.xml",
        "res/values-cs/strings.xml",
    },
},

...`

When I unpack file created by Corona simulator, files I specified above are not in the folder.

Here is example:
https://www.dropbox.com/s/53o0xx9nrhzj6k7/apkFiles_bug_report.zip?dl=0

Repro steps:

  1. load example mail.lua in simulator
  2. build for android
  3. use "apktool" (included) to unpack .apk created in step 2.
    apktool d .apk
  4. observe that files specified in build.settings are missing in unpacked .apk folder

display.safeAreaInsets does not detect soft navigation bar on Android 10+

A typical business app on Android sits above the software defined navigation bar at the bottom of the screen.

Actual result:
When running Android 10+ on the Google Pixel 3, display.safeAreaInsets does not take into account the bottom soft navigation bar. As a result, the app UI is blocked by the navigation bar.

Expected result:
display.safeAreaInsets should account for the bottom soft navigation bar because it is NOT a safe area to place UI elements.

This issue is only evident when testing on the device itself and cannot be reproduce in the Corona simulator.

2020.3590 Corona Simulator - Windows fails zip uncompress

A simple unit test to uncompress a zip failed in Corona simulator of Windows 2020.3590. Mac is OK.

test_zip.zip

P.S.
I tried to build plugin-source-zip with VS 2017 but failed and I don't see how to solve it yet.

  • lua_wremove is redefined in corecrt_io.h
  • lua_wrename is redefined in corecrt_io.h

When I put the lua.dll and plugin_zip.dll of 2018.3326 into my win32 app built with 2020.3590, it seems working but the combination of lua.dll of 2020 + plugin_zip.dll of 2018.3326 is not working.

GPL compatibility

Hello

First I must emphasis that I am not a layer.

The file sdk/dmg/Corona3rdPartyLicenses.txt lists some licenses that are (I think) not compatible with the GPL. I cannot say why licenses are incompatible, although I suppose it's about advertising clauses or relicense and covered work compatibility. This page lists some incompatible licenses without saying the reason of the incompatibilities.

  • The OpenSSL license (unless you use the system's provided OpenSSL distribution, and not your own, see this), but newer releases use the Apache 2 license
  • DirDialog.h, .cpp: the page linked contains:
    ALSO, IN MAKING THE RESOURCE AVAILABLE TO OTHER SITE VISITORS FOR DOWNLOADING, QUINSTREET WILL INFORM SUCH OTHER VISITORS THAT, ALTHOUGH THEY MAY DOWNLOAD ANY RESOURCES FOR COMMERCIAL OR NONCOMMERCIAL USES, THEY MAY NOT REPUBLISH THE SOURCE CODE SO THAT IT IS ACCESSIBLE TO THE PUBLIC WITHOUT FIRST OBTAINING THE COPYRIGHT OWNER'S PERMISSION.
  • Microsoft Public License (Ms-PL)

Android build errantly requires internet permissions

My app does not require the internet and uses no plugins. Internet permission is not requested in build.settings. Yet in the apk, internet permission is requested. Why?

This is inherited from Corona, experienced the same over there.

Native TextField events numDeleted and newCharacters fail on Android

example.zip

The events numDeleted and newCharacters do not behave as described in the docs on Android (4.3). Please see the attached demo project for a working example. When run, you can see that

  • newCharacters returns ALL characters, not just the newly typed.
  • numDeleted returns string length -1 every time a new character is entered (i.e. not deleted)

When run on iOS, all works acording to the docs.

To reproduce, just run the attached project, enter characters one by one in the text field and watch the output in the console window.

Code sign problem

I found an issue

ERROR: code signing embedded frameworks failed: /Applications/Corona-3592/Corona Simulator.app/Contents/Resources/codesign-framework.sh: line 47: echo: write error: Bad file descriptor

Corona Version: 2020.3592
for MAC & iOS SDK: 13.4

I try to use the old official Corona to build it. It will ask me to give the permission to use keychain.app After that the 3592 works fine. So I think 3592 maybe missing this part?

framework not found social when building for ios.

Hi, I tried to build my game with version 2020.3590 but failed. it says that 'framework not found social ..'. this is the log, how to solve this:

Program starting as '"/Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator" -no-console YES "/Volumes/Work/MyGames/1359Friends/main.lua"'.
Program 'Corona Simulator' started in '/Volumes/Work/MyGames/1359Friends' (pid: 1951).

Copyright (C) 2009-2020 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2020.3590
Loading project from: /Volumes/Work/MyGames/1359Friends
Project sandbox folder: ~/Library/Application Support/Corona Simulator/1359Friends-B18AF56A2FE9A82414EB7882F3400D7E
Platform: iPhone / x86_64 / 10.14.6 / Intel Iris Pro OpenGL Engine / 2.1 INTEL-12.10.12 / 2020.3590 / en-CN | CN | en_CN | en
WARNING: Accelerometer events are only available on the device.
WARNING: Gyroscope events are only available on the device.
WARNING: disabling the idle timer can reduce battery life on the device
WARNING: Cannot create path for resource file 'TitleScene.ccscene'. File does not exist.
ERROR: certificate: 'iPhone Distribution: Unijem LTD (U9LA2TNAN6)' expired on 2020-01-30T13:41:23+08:00
Warning: no valid private certificates found for profile "AHoc_Unijem (Unijem)"
Public certificate: iPhone Distribution: Unijem LTD (U9LA2TNAN6) [2642E9D3AED9D460B088BCFA12708391BCFE7D60]
Profile expired: 2020-01-30
Provisioning file: ~/Library/MobileDevice/Provisioning Profiles/f807ce05-f4c1-42e5-9996-5555beb34674.mobileprovision
ERROR: certificate: 'iPhone Distribution: Unijem LTD (U9LA2TNAN6)' expired on 2020-01-30T13:41:23+08:00
Warning: no valid private certificates found for profile "10may2019appstore (Unijem)"
Public certificate: iPhone Distribution: Unijem LTD (U9LA2TNAN6) [2642E9D3AED9D460B088BCFA12708391BCFE7D60]
Profile expired: 2020-01-30
Provisioning file: ~/Library/MobileDevice/Provisioning Profiles/6de9589a-b08a-447b-a1bb-de01ee5e91a9.mobileprovision
Warning: no valid private certificates found for profile "guolin_color_math_2014 (ouguoliniosapps)"
Public certificate: iPhone Distribution: ou guolin (6E9TCTB88Y) [609545DBF5CBB0CC41E3518B92D0EEC86BD06E64]
Profile expired: 2020-02-12
Provisioning file: ~/Library/MobileDevice/Provisioning Profiles/39bb2d67-2586-40b9-a822-d28e279ebd5c.mobileprovision
ERROR: certificate: 'iPhone Distribution: Unijem LTD (U9LA2TNAN6)' expired on 2020-01-30T13:41:23+08:00
ERROR: certificate: 'iPhone Distribution: Unijem LTD (U9LA2TNAN6)' expired on 2020-01-30T13:41:23+08:00
Warning: no valid private certificates found for profile "Adstore_unijem (Unijem)"
Public certificate: iPhone Distribution: Unijem LTD (U9LA2TNAN6) [2642E9D3AED9D460B088BCFA12708391BCFE7D60]
Profile expired: 2020-01-30
Provisioning file: ~/Library/MobileDevice/Provisioning Profiles/67e7556f-ba76-48ca-8b71-f53e2331d3e8.mobileprovision
Warning: no valid private certificates found for profile "iosdevikugo (ikugoreskin)"
Public certificates: iPhone Developer: ou guolin (SAERRS5B5G) [23A08A32EF3BD3E0250D213CEEA99A73E90CDA3A], iPhone Developer: ou guolin (SAERRS5B5G) [13AD524E4F06143D2D31B029C5BB3A5265CF6911], iPhone Developer: ou guolin (SAERRS5B5G) [B3C6F4A7D25C76D38A99EF2D0C1FF424DE6C3FDE], iPhone Developer: ou guolin (SAERRS5B5G) [E3C677FEECC329808FD56F98031092DE5C16D36B]
Profile expired: 2020-02-13
Provisioning file: ~/Library/MobileDevice/Provisioning Profiles/5cb627d7-154c-47b6-bb08-755e44bc5b99.mobileprovision
UNSUPPORTED iOS SDK Mismatch
The version of iOS SDK (13.2) that's installed on this computer does not match the target iOS version (13.4). You may encounter issues building or incompatibilities at runtime.

You should consider updating your version of Xcode or using xcode-select to enable a compatible version.

Do you want to proceed with a build?Using additional build settings from: /Volumes/Work/MyGames/1359Friends/build.settings
Building: Copying app resources
Building: Unpacking build with plugins
Building: Adding plugins
Analyzing plugins...
Found native plugin: /Users/ouguolin/Desktop/1359Friends.app/.build/CoronaProvider.native.popup.social
Done.

Analyzing Lua plugins...
Examining plugin: CoronaProvider.native.popup.social
Done.

Compiling Slices...
Compiling architecture: armv7
cd "/var/folders/hh/qwy5pdq175n7gpygtp969gsr0000gn/T/CLtmpztaW5T/armv7";unset LIBRARY_PATH; export IPHONEOS_DEPLOYMENT_TARGET=8; export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin";"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" -stdlib=libstdc++ -arch armv7 -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk" -ObjC -all_load -fobjc-link-runtime -miphoneos-version-min=8 -std=c++11 -stdlib=libc++ -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -L"/Users/ouguolin/Desktop/1359Friends.app/.build/libtemplate" -L"/Users/ouguolin/Desktop/1359Friends.app/.build/CoronaProvider.native.popup.social" -F"/Users/ouguolin/Desktop/1359Friends.app/.build/libtemplate" -F"/Users/ouguolin/Desktop/1359Friends.app/.build/CoronaProvider.native.popup.social" -framework AudioToolbox -framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreMotion -framework CoreVideo -framework CoreText -framework GameKit -framework GLKit -framework ImageIO -framework MapKit -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenAL -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -weak_framework GameController -weak_framework AssetsLibrary -weak_framework Photos -weak_framework Foundation -weak_framework Twitter -weak_framework social -lobjc -lsqlite3 -ltemplate -lnative-popup-social -o "/var/folders/hh/qwy5pdq175n7gpygtp969gsr0000gn/T/CLtmpztaW5T/armv7/1359Friends"
ld: framework not found social
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: Builder failed: ld: framework not found social
clang: error: linker command failed with exit code 1 (use -v to see invocation)
BUILD ERROR: There was a problem linking the app.

Check the console for more information.
iOS build failed (12) after 6 seconds
ERROR: Build Failed: There was a problem linking the app.

Check the console for more information.

Make on Linux (Branch Gradle!)

The command line 👍

cd corona/platform/linux
make

give the following error 👍
----------Building project:[ linux_rtt - Debug ]----------
gcc -c "../../external/tremor/Tremor/dsp.c" -g3 -O0 -Wall -DRtt_LUA_COMPILER -DLUA_DL_DLOPEN -DwxUSE_MEDIACTRL=1 -DwxUSE_WEBVIEW=1 -D__WXGTK__ -DHAVE_SSIZE_T -DwxUSE_XTEST -DwxHAS_INOTIFY -DwxUSE_SELECT_DISPATCHER -DwxUSE_LIBMSPACK -DWXWIN_COMPATIBILITY_3_0 -DwxUSE_TASKBARBUTTON -DwxUSE_DBGHELP -DwxUSE_WINRT -DwxUSE_PRIVATE_FONTS -DwxUSE_ACTIVITYINDICATOR -DwxUSE_ADDREMOVECTRL -DwxUSE_UNSAFE_WXSTRING_CONV -DwxUSE_STD_CONTAINERS_COMPATIBLY -DwxUSE_SECRETSTORE -DwxUSE_GLCANVAS -D_DEBUG -DRtt_LINUX_ENV -DRtt_EXPORT= -DFT2_BUILD_LIBRARY -DALMIXER_COMPILE_WITHOUT_SDL -DSOUND_SUPPORTS_WAV -DSOUND_SUPPORTS_MPG123 -DSOUND_SUPPORTS_OGG -DLINUX_LIB -DOPT_GENERIC -DHAVE_STRERROR -DNO_REAL -DENABLE_ALMIXER_THREADS -o ./Debug/up_up_external_tremor_Tremor_dsp.c.o -I. -I. -I../../external/lua-5.1.3/src -I../../librtt -I../ -I../../external/rsa -I../../plugins/shared -I../../librtt/Corona -I../../external/Box2D -I../../external/ALmixer -I../../external/ALmixer/Isolated -I../../external/openal-soft-1.12.854/include/AL -I../../external/LuaHashMap -I../../external/b2Separator-cpp -I../../external/luafilesystem\src -I../../external/opengl -I../shared -I../../external/smoothpolygon -I../../external/freetype-2.9/include -I../../external/ALmixer -I../../external/ALmixer/Isolated -I../../external/mpg123-1.13.1/src/libmpg123 -I../../external/luafilesystem/src -I../../external/tremor/Tremor -I../../modules/simulator -I../../librtt/Core -I./curl-7.61.0/include -I./wx/include -I../android -I../../external/hmac
In file included from ../../external/tremor/Tremor/dsp.c:20:
In file included from ../../external/tremor/Tremor/mdct.h:22:
../../external/tremor/Tremor/misc.h:25:11: fatal error: 'endian.h' file not found

include <endian.h>

            ^~~~~~~~~~

1 error generated.
make[1]: *** [Debug/up_up_external_tremor_Tremor_dsp.c.o] Error 1
make: *** [All] Error 2

2020.3590 Corona Simulator - Build for Windows Desktop

Offline build did not show Build dialog after selecting Build > Windows

It needs the same if-condition change as OnBuildForAndroid to build for Windows Desktop app.

Applied the same change to CSimulatorView::OnBuildForWin32() and the offline build is succeeded. The build dialog appears now.

VS2017 there are some caveats to build through

  • external/ALmixer/Isolated/DirectX.cpp added #include <mfidl.h>
  • Rtt_PlatformAppPackager.cpp saved as UTF-8 with BOM
  • Rtt_winPlatformServices.cpp saved as UTF-8 with BOM
    • #include <dpapi.h>

P.S.
I use tinyfiledialogs plugin. I put it data.tgz in the following folder and the simulator works fine but the build does not copy it to myApp.Win32 folder, so I manually copied the dll to the folder.

  • ~\AppData\Roaming\CoronaPlugins\com.xibalbastudios\plugin.tinyfiledialogs\win32-sim\data.tgz

Live build server crashed.

/Applications/Corona/Corona Simulator.app/Contents/Resources/Corona Live Server.app crashed when add a project. I'm using MacOS, version 2020.3598.

Dependency issues on Debian 10 (buster)

After running the install-dependencies.sh script, there are still some missing dependencies. When trying to run, the following error occurs:

error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

openssl pkg's "encrypt" aborts simulator when called with nil key

The following two line program will crash the Corona SDK simulator.
Replacing 'nil' with a quoted string avoids the crash.

openssl = require ("plugin.openssl") e = openssl.get_cipher ('aes-256-ecb'):encrypt ("now is the time", nil)

(The second parameter is the encryption key ... a bad coding path in an app could
result in it being nil, triggering an app crash.)

Weird value for contentBounds.yMax during sprite animation

I have a sprite with multiple frames..
Whenever there is a frame change in the sprite, the value of sprite.contentBounds.yMax changes to a weird value during that frame.
In the next frame, it reverts back to the actual value

How to reproduce:

sprite_bounds_bug.zip
(have attached a plug-and-play project )

  1. Run project
  2. Monitor console logs.. When there is no frame change, yMax is ~630
  3. When there is a frame change, yMax changes to ~570 for a frame and in the next frame it reverts back to the old value.
    (see below for sample output)
23:05:22.260  frame : 1;yMax : 633.5	1
23:05:22.276  frame : 1;yMax : 633.5	1
23:05:22.323  frame : 1;yMax : 633.5	1
23:05:22.364  -------------------------------------------------------------
23:05:22.364  frame : 2;yMax : 570.5	1
23:05:22.364  When changing from 1 to 2, yMax changes to a weird value temporarily
23:05:22.364  -------------------------------------------------------------
23:05:22.395  frame : 2;yMax : 632.5	1
23:05:22.426  frame : 2;yMax : 632.5	1
23:05:22.458  frame : 2;yMax : 632.5	1
23:05:22.489  frame : 2;yMax : 632.5	1
23:05:22.520  frame : 2;yMax : 632.5	1
23:05:22.551  frame : 2;yMax : 632.5	1
23:05:22.583  frame : 2;yMax : 632.5	1
23:05:22.614  frame : 2;yMax : 632.5	1

Any idea what is happening here?

Launching from command line does not open project

When launching from the command line the simulator window does not open specified project. There do not seem to be any appropriate error message. This used to work until recently.

I saw the following in Console: LSExceptions shared instance invalidated for timeout.. However I am not seeing any specific errors or warning pop up.

I am using the following command:
/Applications/CoronaSDK/Corona\ Simulator.app/Contents/MacOS/Corona\ Simulator /project/path/main.lua -no-console YES

build.sh on MacOS

The following command lines on MacOS 👍

cd corona/subrepos/enterprise
./build.sh

gives the following error 👎

CLEANING java files...

  • ant clean
    Buildfile: /Users/larpoux/projmac/corona/platform/android/sdk/build.xml

BUILD FAILED
/Users/larpoux/projmac/corona/platform/android/sdk/build.xml:49: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var

macOS Title bar icons not working properly

When starting a built app in fullscreen mode, only the green maximize icon is enabled. The Close icon is not even shown, therefore Apple is rejecting the app. If you tap the green icon to shrink app to standard size then ALL 3 button icons appear enabled on the title bar. If you then tap the green icon again to maximize, the close (red) and maximize (green) icons are then enabled...

Steps to reproduce: Launch the app in fullscreen mode.

Corona version: 2018.3407 > 3459

Installation problem

lack dll file
vcruntime140.dll
msvcp140.dll

Show after making up
(0xc000007b)

Deprecated and non-supported parameters when calling Google Maps JavaScript API

While investigating an error related to the Google Maps Javasctip API, I found these warning messages in the Android device logfile:

12-30 20:46:38.185 31943 31943 I chromium: [INFO:CONSOLE(219)] "Google Maps JavaScript API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version", source: https://maps.googleapis.com/maps-api-v3/api/js/35/6/intl/sv_ALL/util.js (219)
12-30 20:46:38.186 31943 31943 I chromium: [INFO:CONSOLE(219)] "Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required", source: https://maps.googleapis.com/maps-api-v3/api/js/35/6/intl/sv_ALL/util.js (219)

When asked, this is what Google support answered about these warnings:

The "RetiredVersion" means that the application is making a request to a version of Google Maps JavaScript API that is already retired. A way to fix this is to replace the version in the request URL. The request URL can also be found in the logs that you have sent:

https://maps.googleapis.com/maps/api/js?v=3.9&sensor=false&key=[your_map_key]

The v=3.9 is not an updated version. But, this has to be fixed by the Corona team, since they are the ones who set that up.

Another error says "SensorNotRequired". This means that the request URL is also using a deprecated parameter which is "sensor". This parameter is no longer working and should no longer be used. This can also be fixed only by the the Corona Team.

In other words: none of this causes any harm but one parameter is deprecated and the other is no longer supported. These should be changed and removed respectively.

Dependency Issues on Ubuntu 20.04

After running the install-dependencies.sh script, there are still some missing dependencies for CoronaSimulator. When trying to run, the following error occurs:

error while loading shared libraries: libwebkitgtk-3.0.so.0: cannot open shared object file: No such file or directory

It appears that libwebkitgtk v3 is not available as a package in the Ubuntu 20 fossa repos. Need to replace this dependency or manually port it to 20 for this to work,

Apple Distribution certs are not working

when i try build with "Apple Distribution" certificate and upload in Appstore get error.

ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Corona SDK build version 2020.3582 (2020.4.19) / Xcode Version 11.4.1 / iOS SDK 11.4
when build with "iOS App Distribution" everything fine.

Update XmlRpc4Win to a more recent version

Currently merged XmlRpc4Win version contains some bugs which were fixed in upstream repo. For example, compare

static bool tmEq(struct tm const& t1, struct tm const& t2)
{
return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min &&
t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday &&
t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year;
}

and

https://github.com/drtimcooper/XmlRpc4Win/blob/72564d4c3e98dd1b01610e81974237944211d528/TimXmlRpc.cpp#L677-L682 (fixed in drtimcooper/XmlRpc4Win@0d42da5).

attempt to index global 'coronabaselib' (a nil value)

Build 2020.3593
My app simulates fine, but when I attempt an Android build, I get the following:

FAILURE: Build failed with an exception.
15:54:31.084
15:54:31.084 * Where:
15:54:31.084 Build file 'C:\Users\Fritz\AppData\Local\Temp\Corona Labs\CLtmpa14892\template\app\build.gradle.kts' line: 515
15:54:31.084
15:54:31.084 * What went wrong:
15:54:31.084 Error while fetching plugins: PANIC: unprotected error in call to Lua API (d:\a\corona\corona\platform\resources\CoronaBuilderPluginCollector.lua:9: attempt to index global 'coronabaselib' (a nil value))
15:54:31.084 PANIC: fatal Lua error: d:\a\corona\corona\platform\resources\CoronaBuilderPluginCollector.lua:9: attempt to index global 'coronabaselib' (a nil value)

(I've been trying to divine the current state of the project, but so far been unable to tell if it should be able to do an Android build... so apologies if I'm getting ahead here...)

Chinese (Traditional) Translation inquiry

Hello,
I'm Michael Tsao, a staff member of the Open Source Software Project under the supervision of the Ministry of Education in Taipei, Taiwan. I've tried to contacting y'all via Corona website Contact page on 4/23 and also post on the forum on 4/27, but haven't received a reply and my post on the forum was never approved. Therefore, I've wrote an email to [email protected] and posting here in hope this message will reach y'all.

My team and I are compiling a list of open-source software to localize for the Taiwanese community and think Corona is a great software.

Is there currently anyone translating the software interface into Chinese (Traditional) language?

If not, my team would be interested in the Translation role.
I'm fully aware that Corona labs will close on May 1, 2020. Therefore, who will be able to help us implement the Chinese (Traditional) language translation into the software once we've completed the translations.

Hope to hear back from y'all soon. Have a great day!

Kind regards,
Michael

Chinese Culture University, School of Continuing Education
曹晉維 (Michael Tsao)
E-mail:[email protected]
Address:No. 231, Section 2, Jianguo South Road, Da’an District, Taipei City, 10659
Tel:(02)2700-5858 ext. 8630

Any support for 120fps or more?

Recently, iOS devices got 120Hz panel their own iPad lineup.

I think support for 120fps or more isn't hard at all. I've managed to made setFPS function on the Android Native project. (Using Java Reflection interface)

I hope Solar2D to get more fps options to use.

I'm sorry for my bad English.

The Java code of mine is below :

NamedJavaFunction setFPS = new NamedJavaFunction() {
	@Override
	public int invoke(LuaState luaState) {
		int fps = luaState.checkInteger(1);
		try {
			if(fps > 0) {
				Field pmController = runtime.getClass().getDeclaredField("fController");
				pmController.setAccessible(true);
				Object mController = pmController.get(runtime);
				Class.forName("com.ansca.corona.Controller").getDeclaredMethod("setTimer", int.class).invoke(mController, 1000 / fps);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return 0;
	}

	@Override
	public String getName() {
		return "setFPS";
	}
};

TableView & isVisible interact to yield spurious touch events for tableview rows

There are two bugs in Corona SDK's handling of TableViews and isVisible.
(Duplicated on simulator (2020.3575, and Android)

In the attached app, we create a tableview, and then a button in the same screen area.
The button is set invisible.
If you tap on a row of the table, we make the table invisible and make the button ('Tap Me') visible.

NOW ...if you tap on 'Tap Me', you will usually see a spurious event passed to the tableview touch handler (bug 1)! (See about line 409, in middle of 'handle_touch_row'
Note that handle_touch_row has code to notice and workaround the spurious touch (using time-of-day, which is a kludge).

The spurious touch will be noted on the Corona console, and in the app's text message area.

The spurious touch will report the row that was "under" the 'Tap Me' button. Since the button slightly overlaps two rows, you'll see a different row being tapped depending upon whether you tap the top or bottom half of the button. The row number also depend upon whether or not you scrolled the table before tapping.

Sometimes, the tableview doesn't even become visible (bug 2).
And, in fact, sometimes, you can tap dozens of times before the tableview becomes visible!

The app has in-app help to assist in testing.

Note: this app does not ever test the value of isVisible, because there is a known bug (reported 2 years ago) in that (i.e., sometimes an incorrect value is returned.)

App and project at www.sieler.com/corona
(The app is: bug_tv.apk, the project is bug_tv.zip)
And, the project .zip file is attached to this bug report.

The probable cause is that setting a tableview visible causes Corona to say "we're in the middle of handing an event, since this is now visible, we'll add it to the queue to receive the event" ...
but it shouldn't be triggered because the initial handler returns 'true' to terminate the event chain.

thanks,
Stan

bug_tv.zip

Adding the ability to handle 'characters' instead of just 'keys'

At the moment Corona is able to listen to "key" events from all of the supported OS's. This works perfectly fine when for example it is being used for controlling your in-game character. But doesn't work well when you're trying to catch actual keyboard input from the user.

The problem is that there's only a keyCode property, but no mapping to the device-independent character which takes modifier keys and keyboard layout (AZERTY, QWERTY, QWERTZ, etc..) in consideration. All of the supported OS's can do this in native code though. MacOS & Windows support this in their KeyUp/Down events, but Linux and HTML would require listening to an additional event type which triggers when a printable character is pressed.

I'd suggest implementing a new simple character event with the following properties.
name: which would always resolve to "character"
device: which would resolve to an InputDevice object
character: which would resolve to the localised character, taking keyboard layout and modifier keys in consideration.

Transition.cancel(whatToCancel) | Not working as intended.

If 'whatToCancel' is a reference to an object and it becomes nil right before calling transition.cancel(whatToCancel) then this call cancels every active transition.

Assuming a reference was passed to the function, nil or not, it was meant to cancel that transition only.

A fix suggestion would be to first check if a reference passed is nil and end execution there and change:

elseif nil == whatToCancel then
   cancelType = "all"
   cancelTarget = nil
end

to:

else
	cancelType = "all"
	cancelTarget = nil
end

This would still cancel all current transitions if called without passing a reference, cancel the intended transition if it's not nil, and do nothing if the reference is already nil.

Update GLM to a more recent version

Currently merged GLM version contains some bugs which were fixed in upstream repo. For example, compare

template <typename T, precision P>
GLM_FUNC_QUALIFIER bool operator!=
(
detail::tdualquat<T, P> const & q1,
detail::tdualquat<T, P> const & q2
)
{
return (q1.real != q2.dual) || (q1.real != q2.dual);
}

and

https://github.com/g-truc/glm/blob/280ba0238216d8d6846428950152c10f368045e7/glm/gtx/dual_quaternion.inl#L210-L214 (fixed in g-truc/glm@2834d73).

add method to get audio position

Hi,

It'll be great if there's an API to get precise playing position from audio. Currently I'm using timers, but I'm afraid they are not precise enough regarding the music being played.

Runtime Error in LFS when build for android

While it works fine in the simulator, when build for android, the code returns a runtime error:

The (simplified so that it has only the error) project is at: https://github.com/koyan/dirtest
Steps to reproduce:

  1. Open the project in the simulator
    You should see the contents of the directory cards appear in the simulator screen
  2. Build for Android
  3. Install and run
  4. The the runtime error

Folder structure

cards/file1.lua
cards/file2.lua
main.lua

main.lua:

local lfs = require( "lfs" )
local doc_path = system.pathForFile( "cards" )

textY = 100

for file in lfs.dir( doc_path ) do
    -- "file" is the current file or directory name
    local filenameText = display.newText( file, display.contentCenterX, textY, native.systemFont, 40 )
    filenameText:setFillColor( 1, 1, 1 )
    textY = textY + 50
    print ("The file is: " .. file)
end

In the simulator it lists the files in the folder as expected, showing them on the screen.
When build, installed and run on android, it gives the following error:

Runtime Error

/full/path/for/the/folder/in/my/computer/dirtest/main.lua:8 bad argument for #1 to 'dir' (string expected, got nil)

Corona Simulator reports: Version 2020.3582 (2020.4.19)
Build with a macOs Catalina

I haven't tested on other platforms

Solar2D build: 2020.3595 won't start on windows 10 64bit

Solar2D build: 2020.3595 won't start on windows 10 64bit

I installed solard2d 2020.3595 on a new pc with windows 10, the installation does not give any problems but when I try to start the simulator I get the message: "

the application failed to start correctly (0xc000007b)
click ok to close the application.

The system is an hp stream notebook with windows 10 in 64 bit (Italian) and 4gb of ram.
I tried to start it also from the command line but I don't get any additional information.

2020.3591 Corona Simulator - iOS build error

i have error when i try build

2020-05-15 22:41:54.014 ibtoold[53376:1056275] DEBUG: Added to environment: {
    TMPDIR = "/var/folders/fw/s9f9m614lxg2qkttn_wkqw0000gn/T/7CA5787D-6F3B-486B-B546-81904BC40B13";
}

Corona Version: 2020.3591
iOS SDK: 13.4
P.S. i do not have any plugin

Install failed no matching abis

When trying to execute the Corona HelloWorld Demo (with a Corona Simulator build) and run on an Android Simulator we get this error message 👎

Installing and running HelloWorld on Android SDK built for x86
46837 KB/s (7882444 bytes in 0.164s)
ERROR: Failure [INSTALLFAILEDNOMATCHINGABIS: Failed to extract native libraries, res=-113] Error found during installation!

This bug is possibly tied with a similar bug that we have when building a Native Plugin for Android : the directory /Applications/Corona/Native/Corona/android/lib/Corona/libs contains only :

  • armeabi-v7a

and does not contain the following libraries :

  • arm64-v8a
  • x86
  • x86-64

requestLocation from map api is not working

The requestLocation method don't use the mapsKey value (https://docs.coronalabs.com/api/type/Map/requestLocation.html). The result is an error from the api:

{
   "error_message" : "You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

Moreover it's using http protocol instead of https to request a location from google maps api. The result of all queries ends with an error if we use http instead of https:

{
    "error_message": "Requests to this API must be over SSL. Load the API with \"https://\" instead of \"http://\".",
    "results": [],
    "status": "REQUEST_DENIED"
}

In the android log we get:

W/System.err:     at org.json.JSONArray.get(JSONArray.java:293)
        at org.json.JSONArray.getJSONObject(JSONArray.java:521)
        at com.ansca.corona.NativeToJavaBridge.getLocationFromName(NativeToJavaBridge.java:3062)
        at com.ansca.corona.NativeToJavaBridge.access$000(NativeToJavaBridge.java:255)
W/System.err:     at com.ansca.corona.NativeToJavaBridge$2.run(NativeToJavaBridge.java:2989)
        at java.lang.Thread.run(Thread.java:818)

Reconsider more opensource licenses like MIT, otherwise pointless?

When facebook released React it released it with all sorts of provisions on the license eventually it realized that opensource expectations are of permisive licenses, and GPL is yesterdays expecations now days Permisive ( perhaps with GPL compatibility ), I think the general expectations are for MIT or similar. MIT is very simple and compatible to use and contribute.

Facebooks 'React' license

https://github.com/facebook/react/blob/master/LICENSE

Modern Game Engines for 2D and 3D, notice there is an expectation among modern game developers use Unity OR something with permisive license:

https://github.com/Kode/Kha/blob/master/license.txt
https://github.com/armory3d/armory/blob/master/LICENSE.md
https://github.com/HeapsIO/heaps/blob/master/LICENSE
https://github.com/openfl/openfl/blob/master/LICENSE.md
https://github.com/HaxeFlixel/flixel/blob/dev/LICENSE.md
https://github.com/openfl/away3d/blob/master/LICENSE.md

Really no point in releasing another 2D engine if it's old school opensource only, there are plenty of good tools that are MIT.

Please note as a Haxe user I have no specific interest in Corona, seems there are already very good solutions that are better licensed - Heaps, NME, OpenFL, Kha to name but a few. But since Haxe compiles to Lua it might be interesting to take a look. My point is that I think it's a shame to go to effort of cleaning up code for opensourcing and then going halfway, better to release most of it and then charge for components, but it's your choice if you want to attract developers.

Add support for preferredQuality in media.selectVideo

Right now media.selectVideo is loading all videos with the lowest resolution. Function IPhoneVideoProvider::Show() inside Rtt_IPhoneVideoProvider.mm needs to be updated to read the preferredQuality property from the table passed to it from the lua side.

PS: I can do that and make a pull request if that is okay

Map requestlocation returning neither valid error info, nor latitude/longitude

Map requestLocation is working incorrectly. It is not returning the latitude / longitude NOR is it returning valid error information (it must, of course, do one or the other).

I'm not the first reporter, please see:
https://forums.coronalabs.com/topic/76856-requestlocation-errorcode-0/

In my handler for requestlocation, I get the following event structure:
{
["type"] = "request";
["name"] = "mapLocation";
["request"] = "10800 Torre Ave, Cupertino, CA 95014";"
["errorCode"] = 0;
["isError"] = true;
["errorMessage"] = "";
}

Of course, one should never get "no data" (i.e., no "latitude", "longitude") unless errorCode is non-0 and errorMessage is non-empty :)

BTW, I also don't get taps on the map, even though I've requested them like in the sample code :(
(I'll submit a separate report on that, with a demo program)

(Yes, I have a Google Maps API key)
(Android, Samsung Galaxy S7 Edge; Corona 2020.3575)

Console window reports time-of-day incorrectly, mismash of AM/PM and military style

When I run the Corona simulator on my Mac, the console window reports the time as 04:05:42 on Mar 23.
That's not my local time (which would be PDT, 16:05), nor GMT.

It appears that it's incorrectly putting a leading zero on AM/PM time AND omitting the AM/PM suffix (double bug :)

Suggested fix: use military time (16:05:42). ... this is preferred over deleting the "0" and appending an AM/PM as it saves screen space.

2020.3590 Corona Simulator - Missing Console.

On Mac OSX Catalina since I activated offline builds, the console seems to have disappeared. Clicking on "console" from the menu displays has no affection.
Starting the app from the terminal I get:
"2020-05-05 14: 39: 27.817 Corona Simulator [1582: 120051] CoronaConsole seems to have vanished ... switching to syslog"

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.