Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    116
  • comments
    7
  • views
    3641

About this blog

Announcements, stories and industry interest posts for users of Corona, the 2D game engine from Corona Labs.

Entries in this blog

 

From the Forum – Issue #186

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Going Indie? Many Corona developers start out as solo developers. Some may start as artists, others as programmers and some with skills in both. But when is it time to partner up with someone or work on a team? Should you use a publisher to help with marketing? In this thread, a developer asks these questions and got great responses. Into the Shadows Many 2D games don’t need dynamic shadows, but when you do, how do you go about it? Corona developer @XeduR has come up with a pretty unique approach. Learn more about what he’s doing in this thread. Old Game Dev vs. Modern Game Dev Corona community rock star @roaminggamer has posed a very thoughtful question: What modern dev tools make your life easier today that would have required a lot of code in the golden day of game development? Jump into this thread and add your opinion on the things that have impacted you the most. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Understanding Content Scaling in Corona

Content scaling can be a mystery even for some seasoned developers. Let’s try to demystify it. First, forget pixels. You are going to create a virtual content area that is measured in values that make sense for you to use. Your content area could be 1 x 1 if you want. Of course to position something on the screen you would need to use fractional values, which is probably pretty inconvenient. You could match your content area to some device standards like a width of 1080 and a height of 1920. This would provide a 1 to 1 mapping to the typical HDTV screen or computer monitor which also happens to be a common device resolution for many modern phones. This is all defined in the config.lua file. config.lua is always written assuming a portrait orientation That is, your width should always be the smaller value and the height the larger value that you specify, even if your game/app is going to run in landscape mode. Aspect ratios You shouldn’t care about pixels. Corona converts your “content area points” to pixels for you. You only need to care about what number of points you want to work with. However, aspect ratio matters. If you set your width and height to both be 1000, then you have a 1:1 aspect ratio, the width and height are the same. If you set your width to 1000 and height to 1500 then you have a 1:1.5 aspect ratio. There are many standard aspect ratios that are common among displays: 1:1.5 – Common to the iPhone 3 and 4 family, cameras produce 4×6 photos (which is 2:3 or 1:1.5), some laptop screens are 1:1.5 as well. 3:4 – Common to Standard def TV and computer monitors such as 1024×768, the Apple iPad and several Android tablets. This is also 1:1.33. 16:9 – This is the HDTV standard or 720p (1280×720) or 1080p (1920×1080). This is very common to many modern phones too. This works out to 1:1.777778 if you want to measure it based on a 1 point scale. Which aspect ratio should you use? Corona Labs recommends that you use the 2:3 or 1:1.5 aspect ratio. While this is common on older phones, using 16:9 may make more sense, however if you want to build apps that work both on more square iPads/tablets as well as more rectangular 16:9 or more extreme devices, the 1:1.5 aspect ratio fits nicely on all devices. Of course this means that you’re going to have extra screen space to use that is outside of your defined content area. It’s important to point out there is no “perfect” or “right” way to define the content area. You need to use what works for you and it may vary from app to app. This is recommended because it fits on all screens. In the graphic below, green is your defined content area in config.lua (based on a 1:1.5 aspect ratio). Blue is the typical 16:9 device, pink is the typical iPad/tablet. Does width and height matter? You should use what works best for you. But you will see that many Corona-produced samples seem to be stuck on an archaic 320 width and 480 height setting. This has not been a pixel match to any device since the iPhone 3 which makes it very old indeed. However, Apple still measures everything in points and they are using a 320 point base system. Android devices are based off of a 160dpi system so a 2″ widescreen, common to phones would be 320 as well. Finally Corona’s widget library is based on a 320 point system and many of the widgets are not designed to work with arbitrary sizes, so we continue to use 320×480. You should use what’s right for you, but 320×480 is a pretty good standard to base your app on. Aligning the content area By default, Corona will center your content area on the screen for you. This is the common use case for most games. You can use the xAlign and yAlign properties to change the default. For instance, if you’re making a portrait business app, it might make more sense for the very left, top spot on the screen be 0, 0 and you fill content down the page. These apps don’t do a lot of centering and having left, top be 0, 0 and right, bottom be display.actualContentWidth, display.actualContentHeight makes that simple. Games come in two basic configurations: Objects have to be the same distance apart regardless of the screen. Think about Angry Birds. The distance from the sling shot to the structure has to be the same on every device for the gameplay to be consistent. Space to the left of the sling shot or to the right of the structure is just filler. In this scenario having a centered content area makes sense. Objects should fill the screen and spacing isn’t critical. Think of a card game. The stacks of cards look best when they are spread out to fill the screen. In this case, you may want to left-align the content area and use display.actualContentWidth to determine how to balance your card stacks out. Corona’s display attributes There are several important values you can get in your Corona app based on your settings in config.lua: display.contentWidth = the value you set for “width” in config.lua display.contentHeight = the value you set for “height” in config.lua display.actualContentHeight = a computed value based on your width/height but adjusted for your screen’s aspect ratio. For instance if your portrait app has a height of 480, but you’re on a 16:9 device, display.actualContentHeight would be 568 (16/9 * 320) display.actualContentWidth = a computed value based on your width/height but adjusted for the screen’s aspect ratio. For instance an iPad would return 360 for a portrait app (3 / 4 * 480) display.screenOriginX, display.screenOriginY = for a centered content area and a bigger screen, some of the extra area will be to the left or to the top of the content area. These values provide you that offset These values are important for positioning their objects around the edges of your screen or to fill your screen. Consider this image: Given this config.lua: application = { content = { width = 320, height = 480, scale = "letterbox", fps = 60, }, } You are creating a centered content area (the green block). The blue area would be the typical 16:9 phone such as an iPhone 5 family. We will discuss the yellow block in a little bit. 0, 0 is the left, top corner of your defined content area. Your right, bottom corner is display.contentWidth, display.contentHeight. Both of these are exactly what you specified in config.lua. Corona will fill the screen either vertically or horizontally depending on the aspect ratio of the device. For phones, the 320 will fill the narrow width of the device. For tablets, the 480 will fill the device. The other value is computed based on the actual device. These values then become display.actualContentWidth and display.actualContentHeight. Corona also automatically adjusts these values based on your device’s orientation. The config.lua is always written for portrait, so on a portrait app, 320 width will be 320 (or 360 for iPads). If you rotate the device, the narrow edge of the phone is now the height instead of the width. Corona adjusts these attributes to match the orientation automatically. Back to the graphic above, you will notice that there are blue areas on the left and right of the display. That’s because the content area is 480 points, but the actual screen is 568 points, an 88 point difference. Since the area is centered, that means there are 44 points left of 0, 0 and 44 points of screen to the right of your defined height. Corona makes getting the left edge in this case very easy. The display.screenOriginX will in this case be -44 and display.screenOriginY will be 0. Flip the device to portrait and display.screenOriginY would be -44 and display.screenOriginX would be 0. If you want to position a button in the left, top of the display 25 points from the edge, you could do: button.x = 25 + display.screenOriginX button.y = 25 + display.screenOriginY Getting to the right side in this example is a little bit tricker. While display.actualContentWidth will return 568, which is the actual width of the content area, with the content area being centered, it will be 44 pixels too far to the right. To position a button at the right, bottom, you still have to use the display.screenOrigin* values: button.x = display.actualContentWidth - 25 + display.screenOriginX button.y = display.actualContentHeight - 25 + display.screenOriginY For your game critical items that need to be at predictable distances for each other, keep them inside the 0, 0 and display.contentWidth, display.contentHeight area and it will work on all devices. Then you can fill the background to fill the full screen and edge position scores, lives, User Interface (UI) buttons and such so they also fill the screen. iPhone X weirdness Apple introduced some features with the iPhone X that makes laying out your app a bit of a challenge. Corona has some alternate versions of display.screenOriginX, display.screenOriginY, display.actualContentWidth, display.actualContentHeight that takes these changes into account. If you plan on supporting the iPhone X, you should use display.safeScreenOriginX, display.safeScreenOriginY, display.safeActualContentWidth, and display.safeActualContentHeight for positioning UI elements into the safe zone. But you should still use the non-safe versions for filling the background. Filling the background Consider this game’s UI: This simple interface has a health indicator, lives indicator, score indicator and some other buttons along the bottom edge. The red ship is inside the config.lua's defined content area. When making your background, you want to try and use graphics that can extend beyond the screen edges. Then for the UI elements, don’t build them into the background, but have them be their own graphics so they can be edge positioned to fill the visible screen. Then you can draw your hearts, bars and score values inside those graphics. Before Samsung came out with the S8 and S9 and Apple the iPhone X, the most extreme screen was the 16:9 screens and the iPads (in the other direction). This made it a very easy formula for filling the background. Based on a 320×480 content area, you would want your backgrounds to be 360×570 for portrait or 570×360 for landscape. Center it on the screen and you would have no black “letterbox” bars to contend with. The S8 and S8 are a 1:2 aspect ratio which means your backgrounds need to be 640×360 to fully fill the screen. Then Apple went even more extreme with the iPhone X and its 19.5:9 aspect ratio (a 1:2.1666667 screen). You will need a 694 pixel wide image to fill the background on this device. Hopefully this will help you understand the config.lua a little better and propel you to success in your next #madewithcorona app!
View the full article

CoronaRob

CoronaRob

 

Cost-effective QA for your mobile games

Everyone loves 5-star ratings for their apps and games and hates getting 1-star ratings. Bad ratings and reviews are a death sentence for a new game. One way to help prevent these bad ratings is to thoroughly test your app. Many new developers are in such a rush to get published, they don’t spend as much time testing their apps as they should. In this blog post by Kaushal Singh, a QA manager at Keywords Studios, he goes over basic testing strategies you should employee during your development. It covers testing that should be done during various development and release states before you make your game public. Hopefully, armed with this information you can improve your app testing which will result in higher rankings and your success. Read the post
View the full article

CoronaRob

CoronaRob

 

Game design: Adding consistency to your games

Designed by Freepik Corona is of course popular for making 2D games. But it takes more than a great engine and a great idea to be successful. There is a lot that’s needed to bring that great idea to a complete product that will be well received by your audience. In this blog post on Gamasutra, Richard Atlas, dives into the concept of consistency. Consistency comes in many forms from marketing consistency to the expectations of genre pieces. Perhaps some of this advice will help you make the next rockstar game that brings you fame and fortune.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #185

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Life Bars Many games allow the main hero (or the enemy spawn) to take incremental damage and as a game developer you need to communicate the current health of the character to the player. There are many ways to do this and there are many stylistic choices for the developer to make. But how do you go about updating the life bar and show damage taken? Several community developers jumped into this thread to show the way. Corona on Linux? No doubt, many developers want to use Corona on Linux. It’s been on the wish list for a long time. While our engineering team looks for time to work on this platform, an enterprising developer figured out how to get Corona working with WINE on Linux. This thread documents his process for opening up our awesome engine to the Linux world Using Tiled Tiled (https://www.mapeditor.org) is a great tool to layout many styles of games that can be made with Corona. There are several third-party, community-made libraries for using Tiled content, one of the most popular being PonyTiled from @ponywolf. This thread helps users figure out why they’re having issues with Tiled and gets them on the right path to building games with this really great tool. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Corona Labs releases a new public build

Corona Labs is pleased to announce the availability of our latest public release of Corona: 2018.3326. This build contains significant bug fixes and new features that we hope you will appreciate. Google Play One of the biggest changes in this public build is addressing changes required by Google. Since the last public build, Google has changed their Vitals detection methods and have gotten considerably more aggressive with their detection. To support these changes, we’ve updated all of our support plugins for Android to bring them up to modern standards. We have also increased our Android API level to 27 (Android 8.1) in preparation for Google’s August, 2018 requirement to have API level 26 support. Google is also pushing new app signing procedures. As such, Corona can now employ the modern encryption methods used by the latest Java keytool built keystores as well as older keystores. HTML5 You will notice that a majority of the updates in this build are involving HTML5. That’s right – HTML5 builds are now in Open Beta! HTML5 is becoming a considerably more stable product. We now include the base code needed to build Facebook Instant Games as well as support for the VK social media site’s version as well. HTML5 builds are already having an impact on other platforms. Developers have prototyped HTML5 versions of game ideas and pitched them to publishers to build mobile versions of the games. Being able to quickly give someone a look into your prototype is a great way to market your content. GDPR The European Union’s General Data Protection Regulation went into effect on May 25, 2018. This public release of Corona does not collect data considered personal in nature. Also, Corona Labs doesn’t collect any personal data in Corona-managed advertising plugins. The third-party SDKs used in the plugins have their own GDPR requirements.. Apple On the Apple side, we have updated to support iOS 11.4 and Xcode 9.4 and implemented additional features to support iOS 11 edge gestures that impact the iPhone X. One breaking change that comes with iOS 11 is that getting the default language of the device is now dependent on additions to the iOS plist. iOS 11 only returns supported values that your app supports. You must include an entry in your build.settings file to list the supported languages by the app. For example: settings = { iphone = { plist = { CFBundleLocalizations = {"en", "fr", "pt", "zh", "de", "it", "ja", "es", "ru", "uk"}, }, }, } You can look at the sample app: SampleCode/GettingStarted/HelloWorldLocalized for an example of this requirement or see our localization guide. Open-source libraries In addition to these changes, Corona Labs is open-sourcing the following libraries: timer.* easing.* transition.* composer.* You can download the Lua source for these libraries from the Corona Labs GitHub account. In addition, the widget.* library was updated to be in sync with our internal library. Facebook Facebook has recently changed their permission requirements for apps. You now have to submit your app to Facebook for review and get approved to use the user_friends permission. We have removed the default addition of the user_friends permission from the login process. Starting with this release (2018.3326) plugin facebook_v4a only asks for public_profile by default. This may be a breaking change if your app depends on the user_friends permission. If this is a case, add the permission when requesting login, like facebook.login( { 'user_friends' } ). Check it out! You can see a full list of changes in our release notes for 2017.3326. If you have questions or comments on this release, join us in our community forums. Download Corona
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #184

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Need really big numbers? Lua supports numbers up to 2^53 in value. That’s 9,007,199,254,740,990 or 9 Quadrillion. While this may be plenty for most apps, it creates a problem because after a number gets to be a certain value, it either displays in scientific notation (with a visible loss of precision) or when trying to use string.format(). But what if you need to display bigger numbers? Several Corona developers joined this thread to come up with ways to manage massive numbers. Old-school dialog displays If you’re played any old school role-playing games where your hero interacts with non-player characters (NPCs) to get quests or information you’re used to having text displayed and scrolled words on a small screen where dialog space is a premium. Today’s devices give us quite a few more pixels to work with, but how do you go about doing that scrolling dialog in Corona? This thread offers up a few different approaches to providing these cool old-school dialogs. Finally… Corona offers a really cool event that can be attached to objects, including Corona display objects that triggers when an object is being removed. An example of where this is useful, is you might create an enemy that moves on a platform using an enterFrame listener. When you go to remove the enemy, you have to remember to remove the enterFrame listener. Instead you can set up a finalize event where you can remove the enterFrame listener when the object is removed using display.remove() or object:removeSelf(). There is some under-the-hood mystery about when this event actually fires. This thread goes into detail about how to figure out exactly when the finalize event triggers. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Featured #MadeWithCorona Game: OverRapid

Corona can be used to make many different kinds of apps, but undoubtedly it’s a great tool for games. There of course are many different types of games too. We would like to introduce you to OverRapid, a musical puzzle game. OverRapid, created by Byeong-Su Kang of Team ArcStar, is a mobile rhythm action game similar in style to famous titles like Rock Band and Guitar Hero. OverRapid lets you select songs and you’re sent notes down rows and tap on the various lines to have the note counted in your score. You have notes you have to just touch to count and other notes you have to “scratch” to have counted. The game has over 250,000 installs on Google Play and over 116,000 installs on iOS. It also made the Google Indie Game Festival Top 20 in Korea. The game is available as a free download on both Google Play and the App Store with in-app purchases.  
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #183

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Custom Timers Several Corona developers are starting deep discussion topics that you may find interesting. This topic dives into taking an OOP (Object Oriented Programming) approach to using timers based on objects. Take a chance Game designers have to make quite a few decisions when designing games and those decisions could mean the difference between success or not. In this thread, the question of how much randomness should a game have is discussed and a link to a great resource on skill vs. chance was shared that every game developer should read. Cool retro TV shader Our community is great. They love to share. In this post, see a great new shader that lets you add a retro-TV look to your game. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Students using Corona are BAFTA finalists

The British Academy of Film and Television Arts (BAFTA) has announced the finalists of this year’s Young Game Designer competition: http://ygd.bafta.org/winners-nominees/2018 Three students taught by Corona developer Ian Masters entered their Corona-made apps and all three were selected as Top-10 finalists in the 10-14 year old “Game Making” category. There were around 3,500 submissions. A fourth student was selected as a Top-10 finalist in the 10-14 “Game Concept” category. Ian Masters, an indie developer and the creator of QuizTix (an acclaimed series of quiz games made in Corona), teaches these students part-time using Corona. Masters said “Lua is such a great learning language for kids, and thanks to powerful development tools like Corona they can use it to make releasable cross-platform games”. Check them out: “T-rex Need Eat: Type Real Weird Words” for Windows by Maximilian Robinson, age 13 “Paddle Boat Panda” for Android, by Alex Robinson, age 11 “Bee Simulator” for Windows by Ariyan Hormoz, age 11 Note: “T-rex Need Eat: Type Real Weird Words” is also available for MacOS and HTML5 from itch.io at: https://whisked.itch.io/trex
View the full article

CoronaRob

CoronaRob

 

Corona’s updated roadmap

Corona Labs has updated the 2018 roadmap for Corona. You can view it here! View the roadmap We have added a section to include completed items and those that are currently in an open beta test which should be complete soon. We’ve juggled a few items around and also marked items as started that are currently in progress.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #182

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Custom runtime events Forum super-star @roaminggamer has been bringing up some great topics of discussion in the forums lately. This topic covers a cool item called custom runtime events. These are great ways to easily access code in a module without having to set up complex data passing schemes. Using Tiled with Corona Tiled (https://www.mapeditor.org/) is a great tool for building 2D game maps and levels. Corona doesn’t have direct support for it, but that hasn’t stopped our community developers and there are several systems you can include in your projects that make using Tiled maps easy. This thread discusses some of the more popular and some of the “need-to-know” items to make use of this fantastic tool. Saturation blending mode? In this post, the user is wanting to simulate the Adobe Photoshop™ Saturation bending mode. Corona supports many of these options through texture filters. Corona developer @sporkfin and graphics wiz jumped into the thread with some additional suggestions to attack this problem. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Tomorrow is GDPR day. Are you ready?

Tomorrow, May 25th, the European Union’s General Data Protection Regulation (GDPR) becomes legally enforceable. Basically, for app users in the EU, you have to allow them to choose if you can collect private data on them. While you might not personally be collecting information, the services you are using may. Prior to daily build 2018.3286, Corona has collected users’ IP addresses, the iOS ID for Vendors, and the Android equivalent. Starting with 2018.3286 and later, the data we collect does not contain any personally identifiable data. Regardless, you need to either update your apps to ask for permission to collect data (if you need to use an older version of Corona) or build with a newer version since we don’t collect data that you need to get permission for. Our friends at Appodeal have produced another great Q&A on how they are handling GDPR and things you need to do to meet the requirements. It’s worth looking over these questions and answers to help you understand what you need to do.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #181

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Do you use a game module? Corona community developer extraordinaire @roaminggamer, posed an interesting but simple question in the forums: “Do you use a game module?” Asking about how you organize your code. This active thread covers how many of our experienced developers handle placing their game code in their projects. It’s well worth the read! Need sprites? While there are efficiencies in using sprite sheets (or image sheets), do you have to use them? Not always. This thread jumps into circumstances about when you need them and when you don’t. Taps or touches? And when to use them. This thread originates around the question of how to get a ship to fire a laser continuously. How do you get the event listener to make that effect possible? Learn more from our community developers! Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Getting your Corona apps ready for GDPR!

Great news Corona developers! Starting with daily build 2018.3286, metrics collected by Corona-made apps are now GDPR safe. We no longer collect any ID’s or data points that would be considered personal data under these data regulations. We will be updating our privacy policy to reflect these changes. Keep in mind that builds of Corona pre-2018.3286 are not GDPR compliant and if you have apps for sale in the EU they will need to be updated with 2018.3286 or later. Q. What is GDPR? A. GDPR stands for “General Data Protection Regulation“. It’s a law affecting businesses established in the European Union or has end users based in the EU that requires you to get explicit permission from users to collect private data and manage that data. Businesses that don’t comply can face heavy fines.   Q. What if I want to continue to use a public build or older daily build? A. Then you will still need to update your apps and present the user a dialog box asking for permission for Corona to collect data in addition to any other services that you need to also ask permission for.   Q. What is the best way to know if my user is in the EU? A. Because users travel or may use technologies like VPNs, there is no reliable way to determine if a resident of the EU is in the EU. Also, other privacy laws are changing to be more stringent in additional areas. It’s best to ask all users for this permission.   Q. What do I need to do to get permission from our app users? A. There are several steps you need to complete to give your users the opportunity to control their data. Present a dialog to your users explaining that you’re using third-party services that collect private data. Make sure to include a link to your privacy policy. To save space in your dialog, your privacy policy should link to the privacy policies of any service you’re using. Your dialog can present the user an on/off switch for each service to allow the end user to choose which services they want to grant permission to or decline permission. That switch should default to off since the intent is to get “opt-in” from the end user. See the UK’s Information Commissioner’s Office document on GDPR Consent Store the settings locally so you can remember their choices. Saving the settings online will require you to store personal data and you would have to ask permission for that. On a settings screen, include options to allow the user to select to turn on or off permissions. When the user changes their mind, then your app can react to those changes. For now, if a user declines to use a service, simply use “if” statements to not initialize the plugin or call any methods of that plugin. If they later change their mind, then you can initialize the plugin and call it’s methods. As services update their SDK’s to offer GDPR management API’s and we update our plugins to support them, you can update your apps to add support. As an example, Appodeal’s new SDK will support showing non-targeted ads to users who don’t grant permission and higher quality ads to those who grant permission. There will be a way to let Appodeal’s SDK know if the user has granted permission or not.   Q. What changes do I need to make to take advantage of a plugin’s GDPR features? A. Unfortunately every plugin provider is implementing this in radically different ways. Some will require you to pass a consent parameter on an initialization call, others are handling their own permission, others will have methods in their SDK to manage data. As we update the plugins to be GDPR compliant, we are also updating each plugin’s documentation. There should be a yellow note near the top of each plugin’s page that points you to GDPR additions to be aware of.   Q. How will I know when a plugin has been updated? A. The best way is to check the documentation page and look for the GDPR note at the top of the document.   Q: Where I can learn more about GDPR compliance? A: See the following: The EU’s official site – https://gdpr-info.eu/ Appodeal’s primary GDPR page: https://www.appodeal.com/home/gdpr/ Appodeal’s GDPR guide – https://blog.appodeal.com/blog/2018/05/08/appodeal-gdpr-guide/ Appodeal’s Blog – https://blog.appodeal.com/blog/2018/05/16/gdpr-qa-getting-closer-date/ Corona is committed to making sure you can be compliant with these laws. If you have questions about this, please ask in our Community Forums.
View the full article

CoronaRob

CoronaRob

 

Welcome to the new Corona Marketplace

Today, Corona Labs is pleased to announce that our new Marketplace is online and ready for use. Since opening our original Marketplace in 2016, hundreds of plugins and assets have been submitted to the store and is powering many Corona made apps. In addition to an all new look, the new marketplace supports a new submission form, giving you more control over your promotional images and information. This will help speed up submission approvals. This will also help us promote your products better through featuring and social sharing. If you haven’t looked at the Marketplace recently, please drop by https://marketplace.coronalabs.com and give the new site a look!
View the full article
 

From the Forum – Issue #180

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Console log themes If you’re a Mac user, you can create custom themes for the Corona Console Log window. This is a somewhat hidden feature, but Corona developer @LeoApprope shared a custom theme with the community in this post. The computed config.lua vs fixed config.lua Understanding what the config.lua does for you can be intimidating for new and experienced Corona developers alike. Developers (including this one) always look for an answer they can write once and use repeatedly. This leads to various attempts where the config.lua just magically works, but there are no shortcuts here. This thread dives into the pros and cons of trying to find that perfect config.lua. Math anyone? “I’ll never need to use algebra again“. Many people say that, but at the end of the day, if you’re going to be making games, you’re going to be using math. In this thread, what started as a simple “How do I aim and shoot?” question, led to a great discussion on how Corona treats coordinates and some example code for aiming and shooting too. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article
 

Corona and GDPR

GDPR – or General Data Protection Regulation is a requirement from the European Union to assure that user’s data is able to be managed by users. This requirement becomes legally enforceable on May 25th, 2018. There are many questions about what data Corona collects and how that data can be managed by developers and end users going forward. We are working closely with our lawyers and a team of experts from Appodeal to make sure we are legally compliant and update all of our various policies. We suggest you take a few minutes and read Appodeal’s recent blog post on the actions we are taking. Stay tuned for more updates as they become available.
View the full article
 

#GlitchJam 1 kicks off on the 4th of May!

Welcome to #GlitchJam! What is #GlitchJam? It’s a game jam, hosted by long time Corona developers Glitch Games. Early in their past, Glitch games ran their first #GlitchJam’s after some time off and with modern game jam management tools, they are ready to resume this awesome Corona based game jam. “At Glitch we love jams, be they game or strawberry, and we’re incredibly excited to be able to run #GlitchJam for all Corona developers.” said Graham Ransom of Glitch Games. #GlitchJam will be held every 6 months and will always follow the same format; 72 hours long, open to all Corona developers, a theme will be announced upon commencement, judging will be done by both Graham and Simon Pearce of ​Glitch Games​ and a pair of guest judges that change every jam, plus prizes for the top three submissions. Each jam will have some great prizes from our sponsors, including Corona Labs. The next #GlitchJam is scheduled for May 4, 2018. To learn more, please visit ​the jam page​, and if you have any questions you can reach out to Graham and Simon on the forums or on Twitter​.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #179

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. HTML5 server awesomeness Corona mega-developer @develephant has gone full overdrive creating some great tools to go along with HTML5 builds. In his latest creation, he’s created a plugin to let HTML5 builds work with his Coronium Core server product. In addition he’s created some command line tools to speed up your HTML5 development. Check out the goodness here! Converting numbers in Lua Most people work in Lua with base 10 or decimal numbers, i.e. everything you do is with digits between 0 and 9. But there are other times where you might want to display numbers in different formats, such as hexadecimal or base 16 numbers where digits range from 0 to F. In this thread, @roaminggamer addressed an easy way to convert Lua numbers to other representations other than normal numbers. Things that go “Bleep” In this post, a Corona user was getting odd sounds every time Corona generated a run-time error. After a little investigating, the sounds were being generated by the operating system. On Windows, it’s standard for apps with errors to play a system sound. On macOS a notification is generated. Both of these sounds are controlled by the operating system. The solution? This forum post has you covered! Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

HTML5 for Corona update

Our HTML5 team has been quite busy and HTML5 builds are progressing nicely. There is a recent change that we hope you will find exciting. We’ve found a way to get HTML5 builds down to around 1 megabyte. Of course the more art and audio assets you add, the more your app will grow in size. We’ve accomplished this by temporarily removing the SQLite3 and socket modules and compressing the engine code. Starting with daily build 2018.3055, these modules have been removed for HTML5 builds. We will bring them back in a future build as optional modules. If you haven’t given HTML5 a try, now’s a good time to start experimenting with it. We have even simplified testing. Instead of starting up your own local web server, we do that for you with the use of our Live Server. Simply build your HTML5 app and it will open in your default web browser automatically. As always, while it’s in open beta, please report any issues you run into in our HTML5 forum.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #178

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Spamming buttons Sometimes repeated button presses are okay, but frequently they’re not. How do you defend against them? In this thread, our developer community chimed in with some different ways to prevent rapid button presses. Wow, that was fast! We just announced HTML5 builds in open beta this week and our ever-diligent community developer @develephant has already started creating useful plugins. Check out this thread to get an easy to use Cookie Set/Get/Delete plugin. Daily quests? Many games offer players daily tasks to complete. That’s a great way to get players to engage with your app daily and keep them involved with your app. But how do you implement them? Learn a couple of ways of approaching the task in this thread. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

 

Making HTML5 plugins for Corona

HTML5 opens up some great opportunities for developers and one of those is plugin development using JavaScript. While most Corona developers will only use Lua in a cross-platform manner like they are currently using, it’s super easy to add JavaScript features to extend your app. You need two things: a .lua file that tests to see if your platform is HTML5 or some other platform and the actual JavaScript .js file. If you detect you are an HTML5 build, then you require the JavaScript plugin, else provide default functions that prevent those calls from creating errors for the non-HTML5 builds. Consider this code: -- -- myplugin.lua -- Copyright (c) 2018 Corona Labs Inc. All rights reserved. -- local lib local platform = system.getInfo("platform") if platform == 'html5' then -- use native JS plugin lib = require("myplugin_js") else -- wrapper for non web platforms local CoronaLibrary = require "CoronaLibrary" -- Create stub library for simulator lib = CoronaLibrary:new{ name='myplugin', publisherId='com.mydomainname' } -- Default implementations local function defaultFunction() print( "WARNING: The '" .. lib.name .. "' library is not available on this platform." ) end lib.set = defaultFunction lib.get = defaultFunction lib.addEventListener = defaultFunction end -- Return an instance return lib If you’re on HTML5, it includes the JavaScript plugin. If not, it simply lets the app know the function isn’t available. Plugins have to have a unique namespace and that’s accomplished by this line in the .lua file: lib = CoronaLibrary:new{ name='myplugin', publisherId='com.mydomainname' } Obviously if you intended to publish this to the Corona Marketplace, or if you want to use multiple plugins in your code, the name needs to be unique. Change “myplugin” to a proper name. Then set publisherId to the reverse domain name you use to publish with. For instance, Corona Labs made plugins would have a publisherId of “com.coronalabs“. Then you create a plugin with the same name except with an _js as part of the name. For instance if your plugin is “awesometimer.lua“, you would create “awesometimer_js.js“. This file will contain your JavaScript code. Here is an example: // // myplugin_js.js // Copyright (c) 2018 Corona Labs Inc. All rights reserved. // // JS plugin is an child object of 'window' window.myplugin_js = { // all the 1st-level functions are available to call from Lua // so 'get' and 'set' functions are available to call from Lua data:{}, // function may use up to 10 args; use Object or Array if you want to pass more than 10 args // arg maybe a Number, String, Boolean, Array or Object set: function(bool_arg, number_arg, string_arg, table_arg, array_arg) { console.log('js set() is called'); var data = window.myplugin_js.data; data.bool_arg = bool_arg; data.number_arg = number_arg; data.string_arg = string_arg; data.table_arg = table_arg; data.array_arg = array_arg; // Lua callback // you can pass to Lua a Number, String, Boolean, Array or Object args this.dispatchEvent({ name: 'onData', data: { arg1: bool_arg, arg2: number_arg, arg3: string_arg, arg4: table_arg, arg5: array_arg }}) console.log(typeof(bool_arg)); console.log(typeof(number_arg)); console.log(typeof(string_arg)); console.log(typeof(table_arg)); console.log(typeof(array_arg), array_arg.length); }, get: function() { var data = window.myplugin_js.data; console.log('js get() is called', data); return data; } }; console.log('myplugin_js is loaded'); We of course can’t teach you JavaScript in this tutorial and there are plenty of examples on the Internet to see. The main point is that you add your plugin to the JavaScript window object, provide your functions as part of the plugin namespace and add your methods to your plugin object. Then in your .lua modules, i.e. main.lua, you can require the plugin and call the functions as necessary. -- -- main.lua -- Copyright (c) 2018 Corona Labs Inc. All rights reserved. -- -- A sample of using JS native plugin for Corona local widget = require( "widget" ) local json = require( "json" ) local myplugin = require("myplugin") local label = display.newText( "output", 50, 220, native.systemFont, 16 ) label.x = display.contentCenterX local data = native.newTextBox(160, 360, 320, 250) data.isEditable = false -- JS event listener. local function pluginListener( event ) local str = json.prettify(event) str = 'got event from JS plugin:\n' .. str print(str) data.text = str end local setData = function() -- call JS native plugin -- arg value maybe boolean, number, string, table -- local bool_arg = true local number_arg = 123 local string_arg = 'abc' local table_arg = {key1='key1value', key2={1,2,3}} local array_arg = {1,2,3,4,5,6,7} myplugin.set(bool_arg, number_arg, string_arg, table_arg, array_arg) end local getData = function() -- call JS native plugin local tbl = myplugin.get() if tbl then local str = json.prettify(tbl) -- Important: use index-debug.html if you want to see print output print('Data: ', str) data.text = str end end -- event listener, it's an option myplugin.addEventListener(pluginListener) widget.newButton { onRelease = setData, left=60, top=60, width=200, height=50, label = "Save Data in JS", labelColor = { default={ 1, 1, 1 }, over={ 0.6, 0.6, 0.6 } } } widget.newButton { onRelease = getData, left=60, top=120, width=200, height=50, label = "Read Saved Data", labelColor = { default={ 1, 1, 1 }, over={ 0.6, 0.6, 0.6 } } } -- This example shows you how to call functions to get data, set data as well as dispatch events from JavaScript back to your Lua code. You can download the complete sample project from our GitHub repository. If you have questions please reach out on our HTML5 forum!
View the full article

CoronaRob

CoronaRob

 

HTML5 builds are now in “Open Beta”

Good news! Today Corona is pleased to announce that HTML5 builds are in “Open Beta”. That means starting with daily build 2018.3238, you can now have Corona output a folder with the various HTML files and content necessary to run your Corona game or app in a web browser. Simply upload the entire folder to your web server and access that folder through your HTML5 compatible browser. Due to JavaScript security restrictions, HTML5 builds only work if they are served from a web server. If you have Python installed you can test locally by starting a web browser on your computer and accessing your HTML5 build folder in your browser. The easiest way to get it served on macOS is to drag your build folder on to Terminal.app then paste python -m SimpleHTTPServer into the terminal window. Then open http://localhost:8000/index.html in you web browser. For Windows, with Python installed, run cmd.exe and then use the cd command to change directories to your build folder and run the same Python command and then open your browser to the above URL. If you need to see the console log, please open http://localhost:8000/index-debug.html instead. If your app makes calls to web servers, using API’s like network.request(), because of JavaScript cross-domain scripting rules, you can’t directly call REST type APIs. Instead you will need to write a local web script on the same domain that will make your REST API calls and then echo the returned data back to network.request(). We have opened a forum to discuss HTML5 builds. Please discuss your observations in the HTML5 forum. Because this is still a beta product, we don’t recommend releasing your game the public yet. If you do, you should heavily test your game or app before releasing it. HTML5 build behavior is subject to change as we continue to work to bring it to a release status. Most all current Corona-made and third-party plugins are not HTML5 compatible at this time. Many of our ad providers do not offer HTML5 SDK’s for us to build plugins against. Other plugins will take time for us to build HTML5 compatible versions where possible. For plugins in our Marketplace built by our community developers, it will be up to them to offer HTML5 plugins where possible or update existing plugins with HTML5 stubs where not possible. A tutorial on creating HTML5 plugins is coming soon. This is a huge milestone for Corona. It will open the door for you to reach more consumers. It will make it easier to show your work off to early testers, prospective clients and more. Even game jams will rock even more. Our goal is to get this out of beta by the next public release where we will be including some other great features. Please let us know your thoughts in our HTML5 forum.
View the full article

CoronaRob

CoronaRob

 

From the Forum – Issue #177

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Physics and groups Groups are a wonderful way to organize your display objects but sometimes this can create issues for developers using physics. @roaminggamer and @horacebury contributed to a thread that explains the problem and offered up some solutions. Loading large scenes Doing tasks in Corona can take time. When you do many tasks in a row, your user interface will block. This can make loading large scenes appear as if your app has frozen. A standard tactic would be to show a progress bar. However, Lua is a single-threaded language that can make it difficult to avoid blocking and allow your progress bar to update. In this thread, several Corona developers jumped in and offered suggestions on how to manage loading a large number of assets. Making an accordion widget There are many different ways to present data to users. A popular web technique is an accordion style display where you click on an item and it expands to show more information. Building this in Corona can be a bit tricky since you need to know the height of other objects to move them around to open space for the added info. In this thread, our wonderful community of developers joined to solve the problem. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.
View the full article

CoronaRob

CoronaRob

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!