Jump to content
  • Advertisement
  • entries
    134
  • comments
    7
  • views
    4711

About this blog

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

Entries in this blog

 

There’s BIG open source news on our 9th birthday

Ten years ago, two guys got together with a goal to change the mobile development world. A year later, Corona SDK was born. My, how time has flown! Since those first days, we’ve frequently seen developers reach the #1 spot in various app stores. We’ve seen apps that have received millions of downloads, and app developers who have made a full time career out of mobile app development. But for many, it’s also a challenging time. The mobile app market has become over saturated. There has been a race-to-the-bottom in app pricing. New challenges extend up the development toolchain and impact the quality of top app engines. In this evolving industry landscape and these emerging challenges, change is good and necessary. With that in mind, we would like to introduce a big change for Corona. We have decided to get you — the developer community — more involved in Corona’s development, and open-source most of the engine. There are features you want, updates you need, and it’s simply time to get you more involved in Corona’s future. Corona Labs will continue to support the engine and going open source means more transparency to the process. We are certain you will have a lot of questions about how this will work, and as we have more to share, we will be continuously sharing new details with you. Also, feel free to discuss this in our community forums and in the CDN Slack. We’d like to assure you that our goal is to increase transparency by enabling access to the source, and allowing each and every one of you to add your unique contributions to Corona’s future. Any media questions should be directed to the Corona Labs Developer Relations team at devrel@coronalabs.com.
View the full article

CoronaRob

CoronaRob

 

Introducing the new Animation Plugin

Corona Labs is pleased to announce the immediate availability of a new plugin: Animations. This plugin was originally planned to be an extension to the existing transition.* library. During the design, there were sufficient changes that warranted it being a new library. We also decided to make this a plugin instead of a core feature to help keep the core lightweight. The plugin is broken into two main categories: tweens and timelines. Tweens are your standard transitions like moving an object over time, fading an object in and out, etc. Tweens have new features including scalable speeds and additional events. Timelines allow you to have more control over what happens to a tween over time. You can set timeline markers that you can advance or return to. You can have events fire when the timeline passes a marker. Since it’s a plugin, you will need to go to the Corona Marketplace and activate it. Next you will need to include it in your build.settings: plugins = { ["plugin.animation"] = { publisherId = "com.coronalabs" }, }, And require the plugin in modules where you will use it: local animation = require("plugins.animation") For normal transitions, the call is now: local myAnimation = animation.to( object, { x = 200, alpha = 0 }, { time = 1000, onComplete = whenDoneFunction } ) Notice there are two tables involved, the first table is for object parameters, the second one for transition parameters. For timelines, you can now program animations that can contain multiple sequential and/or overlapping tweens, each performing unique tweens on one or multiple objects. Additionally, you can set time markers anywhere across the span of the timeline as jump-to points. For example, you could: local function timelineListener( obj ) print( "Timeline completed; ID: " .. obj.id ) end -- Create a timeline object local timelineParams = { tweens = { { startTime=0, tween={ object1, { x=display.contentWidth-50 }, { time=4000, iterations=5, reflect=true } } }, { startTime=1000, tween={ object1, { y=400 }, { time=4000, easing=easing.outQuad } } } }, markers = { { name="marker_start", time=0 }, { name="marker_2000", time=2000 } }, id = "timeline1", onComplete = timelineListener } local newTimeline = animation.newTimeline( timelineParams ) Which will do a transition that moves an object back and forth on the X axis five times over four seconds. Then starting one second in, move the object down the screen over four seconds and setting markers to allow you to go back to the beginning of the timeline or jump to two seconds in. The animation plugin is free to use. You can learn more about the plugin and its new features by reading the documentation for the plugin. Like many of our other Lua based libraries, we are going to go ahead and make this open source so you can download the source code and make your own changes to the library. Let us know what you think about this new great addition to Corona in our Community Forums.
View the full article

CoronaRob

CoronaRob

 

Update on the new GPGS v2 plugin

Corona Labs would like to update you about our recent plugin for Google Play Games Services. This plugin is known as GPGS v2 and there is a breaking change to be aware of. We’ve worked hard to make it call compatible with the older GPGS v1 plugin, however Google has changed their initialization and login process significantly. We had to make a change that you will need to adapt to so that you can successfully login and know if your app is connected. Simply remove any calls to the gpgs.init() API and instead call gpgs.login() directly: gpgs.login( { userInitiated=true, listener=gpgsLoginListener } ) Where gpgsLoginListener is the name of your function to handle a successful login. If you have questions about the plugin, please joins us in our community forums.
View the full article

CoronaRob

CoronaRob

 

#madewithcorona: Mission Me!

Periodically a game comes along that breaks out and does something different. Corona Labs would like to introduce you to Mission Me by Sillysoft Games. Mission Me is a lifestyle game. In this game, you get missions that you frequently have to do in real life and may require you to get off of your device for a while to accomplish. As you complete missions, you gain experience and move up to more missions. Example missions include things like “Clean up your desk and add a decoration” or “Say something nice to a cashier”. You start with “Self” missions and move to “Family” missions and so on. This game is engaging and helps you with your own self-esteem. The game is available as a free app on Apple’s App Store and Google Play. Check it out! If you want you can leave feedback to the developer in our Community Forums!  
View the full article

CoronaRob

CoronaRob

 

A different approach to game difficulty

The concept of game difficulty is always a challenge for developers. Games that are too easy won’t get played. Games that are too hard will frustrate the users and they will quit. You have to find that right balance of difficulty where the player feels challenged yet feels as if they are progressing. To compound matters, no two players are the same. Some need an easier game, others need a lot more challenge. How do you strike that balance? Alex Vu, pixel artist and game designer working for Fine Monkeys, LLC has contemplated the problem, and discusses some solutions in his blog post A Different Approach to Difficulty. In this post, he talks about the problems with simple difficulty modes as well as Dynamic Difficulty Adjustment (DDA) and offers a deep dive into Organic Difficulty and Effectiveness-Ludoaesthetics Spectrum. This advice might just make your game more interesting to your players. Read: A Different Approach to Difficulty   View the full article  

CoronaRob

CoronaRob

 

Steamworks plugin is now open-source

Corona Labs is pleased to announce that the Steamworks plugin is now open-source. The Steamworks plugin is used by PC and macOS games published to Valve’s Steam service that allows support for leaderboards, achievements, user profile data, and microtransaction support. Now you can download the repository for the plugin and add your own features and extensions to it. You will have to have a Steam developer account to be able to test the plugin. Follow Steamworks documentation (available on Steam’s developer portal) to learn how to enable Steamworks debugging and development for your game. You can get the plugin source at our GitHub repository. You can learn more about the Steamworks plugin in our previous announcement.
View the full article

CoronaRob

CoronaRob

 

New Google Play Games Services plugin

Corona Labs is pleased to announce the immediate availability of a new, updated Google Play Games Services plugin. This plugin in a complete rewrite of the version one of the plugin using the latest GPGS core libraries and dependencies. One of the key reasons for the GPGS v2 plugin, besides staying with modern underlying SDK’s is support for preventing Google rejections for using invalid login scopes. The previous version of the underlying GPGS SDK contained Google Plus login scope which has been deprecated. The new version has this removed. The GPGS v2 plugin should be a drop in replacement for the GPGS v1 plugin. First, visit the Marketplace and activate the plugin, then simply update your build.settings to include the plugin using: settings = { plugins = { ["plugin.gpgs.v2"] = { publisherId = "com.coronalabs", supportedPlatforms = { ["android"] = true, } } } } And where you require the plugin in your lua code: local gpgs = require( "plugin.gpgs.v2" ) This is a completely new version of the plugin and you should fully test your app against the code. If you have questions about the new plugin, please check out our documentation. Join us in the community forums to discuss this new plugin.
View the full article

CoronaRob

CoronaRob

 

Monetization best practices (and a new Ad Tutorial!)

New tutorial! First, we would like to take this opportunity to let you know about a new tutorial on implementing advertising in your Corona apps. The tutorial covers code and common code to implement an ad plugin in your app. You can view it here! Read the Implementing Ads tutorial Monetization best practices A great question was asked in our Community Forums about using in-app purchases (IAP) to turn off advertising. It may seem like a simple idea but there is more to it. When you sell your app for a fixed price, that person pays you once, ever. When you use ads, you get a continuous stream of income as long as your app or game is being used. If someone uses IAP to turn off ads, you get continuous income until they pay for the IAP, then you get the one-time fee and that’s it. For some apps, IAP subscriptions can provide ongoing income, but an app has to be pretty special, with lots of new content to convince users to continuously pay for it. Let’s look at the financial considerations in answering this question. Let’s say that you end up setting the IAP fee to turn off ads at $0.99 (or an initial purchase price with no ads). Because the app stores take 30% of your sales, that means you will make $0.69 from that user when they make the purchase. But the question is: Will you make more from advertising? Using Appodeal as an example and information from Appodeal’s E-Book “Monetizing Casual Games”, banner ads typically pay about $0.43 per thousand banner ads shown. To earn that same $0.69 from app sales, you need to display over 1,600 banner ads to your app user. Assuming your banner ads rotate every 45 seconds, it will take over 1,200 minutes or about 20 hours of view time to earn that same amount of money from the user. Note: eCPM values for the United States and Europe were averaged together from numbers in the e-Book. Banner ads may not be the best way to implement ads. If you’re using other ad forms, like interstitials which pay an average of $4.59 per thousand ads, you need to show about 150 interstitial ads to earn the equivalent purchase income. Note, video interstitials pay more than static interstitial ads. Let’s say you can show 2 interstitial ads per session on average, the user only has to play about 75 times to make up that income. You don’t want to over-show ads to keep it from becoming an annoyance causing your user to just quit your app. Rewarded video pays about $10 per 1000 rewarded videos. That means the user only needs to view 7 rewarded videos to earn you that same $0.69. How do you get to that many ad displays? Most users tend to play a game a lot at first, then over time, they play less and less. All games have a usage “tail”. If you view this generic usage graph, it looks like a dinosaur: Picture by Hay Kranen / PD The left side is your initial usage spike (the head) and then as time passes it gets used less and less (the tail). Some games will have a long tail, but many will have a short tail. No one can really predict in advance how long your game’s tail will be. Successful apps will have a longer tail and a taller tail. It indicates that you are retaining users longer. Games and apps with a long tail will make more money from advertising. If your game doesn’t have any longevity to it, you want to convert them to paid as soon as possible. This combination of retention and revenue is your game’s LTV or Lifetime Value. If your game is too short, offering an option to disable ads won’t be effective because you won’t have any retention to motivate them to disable ads. If your ads are too annoying, people may get turned off to your app and give up on it early. You have to strike a proper balance between advertising and entertainment or utility value of your app. Even short-lived apps can monetize successfully by … Using Rewarded Video Rewarded video is clearly the winner in the eCPM value for you, but you have to use them wisely. Rewarded video is the user volunteering their time in exchange for some in-game reward. You can’t just throw a rewarded video in front of a user automatically. That’s the job of an interstitial ad. If you force the user to watch an ad, even if you reward them, it’s still forcing them to watch the ad. Consider they have played your level and lost. Your game logic shows them an ad and resets back to the beginning. That is an Interstitial ad placement. If you prompt them “Would you like to view an ad to continue to the next level?” and if they agree, you should show them the video and let them move on to the next level. If they choose no, simply take them back to the beginning, but don’t force them to watch the ad. Rewarded ads encourage players to continue playing, either by not losing progress or by gaining some in-game feature which can extend your app’s LTV. Using these techniques, even games with shorter tails can be quite successful. Conclusion Every app is different. You should make the most entertaining game you can or the most useful business or utility app that brings real value to the user, then balance your advertising, in-app purchases and in-app currency to maximize your income.
View the full article

CoronaRob

CoronaRob

 

Cool things in the Marketplace 9/28/18

If you haven’t peeked into the Corona Marketplace recently, it now offers dozens of plugins and assets, from art packs to audio tracks to useful utility plugins. Periodically, we will highlight a few exciting products which can help you develop your dream app using Corona. Qiso Isometric Tilemap Engine Qiso is an isometric tilemap engine for Corona SDK. It handles the complexity of converting between screen, Cartesian and isometric co-ordinates, allows you to programmatically add or remove tile layers at any time, and add player or machine controlled characters. It takes care of map rendering, camera movement/zoom, and has built-in A* pathfinding algorithms. Check it out! Wild West assets from Beatheart Artist Beatheart has created a series of “Wild West” assets for you to use in a cowboy themed game. Each character has multiple animations available. DataViz With the DataViz plugin, you can create Arcs, Polygons, Stars and Circle segments that are popular in many types of business and utility apps. You can manipulate colors, set palettes and named colors and more. Check it out!  
View the full article

CoronaRob

CoronaRob

 

Linux builds for Corona

Corona Labs is pleased to announce early beta testing for Linux builds. With this feature you can use the Corona Simulator either on Windows or macOS to produce a Corona build that should run on Debian and generic x86-64 Linux platforms. This feature is currently in a limited beta test. You will need to enable building before the option appears in the simulator. Information on enabling the Corona Simulator to make Linux builds can be found in pinned posts either on: Our community forums ( https://forums.coronalabs.com/forum/662-linux/ ) or Our community Slack’s #linux channel ( https://coronalabs.com/slack/ ) We request that any observations, comments and issues be reported at those two locations. Note: This is using Windows and macOS to make apps that run on Linux. This feature is not running the Corona Simulator on Linux to make Android builds.
View the full article

CoronaRob

CoronaRob

 

Cool things in the Marketplace 9/14/18

If you haven’t peeked into the Corona Marketplace recently, it now offers dozens of plugins and assets, from art packs to audio tracks to useful utility plugins. Periodically, we will highlight a few exciting products which can help you develop your dream app using Corona. Lama Chef This is a new “tap to play” exclusive arcade game template made with Corona. It is easy to re-skin and modify to your needs and has Appodeal ads integrated. Check it out! Old Movie Effects Combine the Old Movie Effects with Corona’s image effects to create an amazing retro feeling for your app. In the demo video, the old movie effects are used together with Corona’s duotone image effect. Cartoon & Comedy Sounds ‘Cartoon & Comedy Sounds‘ by Cinematic Sound Design features a collection of more than 250 hand-crafted , 100% royalty-free cartoon and comedy sound effects.  
View the full article

CoronaRob

CoronaRob

 

The struggle of retention with casual games

One of the struggles with building simple “casual” free-to-play (F2P) games is how to keep the player engaged and playing for the long term. Having a lot of initial downloads is great, but you need the app users to keep playing your game so they engage with your advertising and take advantage of your in-app purchases. In this blog post by Josh Bycer, he discusses the problems with short game-play loop games and how late game play turns into a painful grind to keep income coming in and how more complex games address additional content. Factoring these issues into your game design can go a long way to helping you build more sustainable games. Click here to read: How Free to Play Design Runs out of Steam
View the full article

CoronaRob

CoronaRob

 

Finding playtesters for your game

One of the challenges in building successful games comes down to one simple, but hard to answer question: Is it fun? We all need to know that answer. Compounding the problem is the fact that what you might find as fun, someone else may not enjoy. In this blog post by Joost van Dongen, a lead programmer and co-founder of Ronimo Games, talks about how they go about finding playtesters for their games. He also discusses the differences between QA (Quality Assurance) and playtesting. Fun games lead to more successful games. How do you find playtesters? Let’s discuss playtesting further in the Corona community forums! Click here to read: The challenge of finding enough playtesters
View the full article

CoronaRob

CoronaRob

 

Cool things in the Marketplace 8/31/18

If you haven’t peeked into the Corona Marketplace recently, it now offers dozens of plugins and assets, from art packs to audio tracks to useful utility plugins. Periodically, we will highlight a few exciting products which can help you develop your dream app using Corona. AppsFlyer AppsFlyer is the world’s leading mobile attribution & marketing analytics platform, helping app marketers around the world make better decisions. Check it out! 5 Fruit Monsters 2D Game Character Sprite 5 Fruit Monsters is a set of cartoon sprites that can be used in 2D games like platformers or endless runners. Hud Interface Sounds Hud Interface Sounds by Cinematic Sound Design delivers a huge collection of user interface, computations, readouts, glitches, Sci-Fi sounds and more.  
View the full article

CoronaRob

CoronaRob

 

The 10 secrets to indie game success

We all want to make successful apps, but how do we get there? There are many different ideas of how to reach success and many different ways to get there, but it’s a challenging path. Think about Fortnite’s “Battle Royale” format. You start with 100 players and at the end only one person has climbed to the top and can claim “Victory Royale”.  Now imagine that but on a much grander scale. Your indie title is competing against thousands of other indie titles and of course the “pro” AAA titles that come out as well.  Luck will sometimes favor you to the top. Hard work will sometimes propel you and other times it’s perseverance. There are plenty of things for you to think about. Paul Taylor, the Joint Managing Director of Mode 7 Games, an indie studio based in Oxford, UK provides ten things for you to think about as you start building your next Indie title. Read over this blog post which just might be the key to your next hit. Click here to read: The 10 Secrets to Indie Game Success
View the full article

CoronaRob

CoronaRob

 

Building in-game tutorials

Some game designs make it obvious as to how you should play. Some games are so complex the entire game may feel like it needs a constant guide to play. But in most guides a simpler tutorial is usually called for. The staff at Game Career Guide has produced a handy tutorial guiding you through some basics on building effective tutorials for your games.  They offer six concepts that can make your in-game tutorials more effective for your players.  Head on over to their tutorial to get this great advice. Read Tutorial
View the full article

CoronaRob

CoronaRob

 

Cool things in the Marketplace 8/17/18

If you haven’t peeked into the Corona Marketplace recently, it now offers dozens of plugins and assets, from art packs to audio tracks to useful utility plugins. Periodically, we will highlight a few exciting products which can help you develop your dream app using Corona. High Climb 2018 – Cool Corona Template High Climb 2018 is a challenging tap-to-play template for Corona. You swing your gorilla back and forth as you climb the rock wall picking up goodies along the way. Check it out! TVShader TVShader is a shader from Dave Bollinger for Corona SDK that implements old-school retro-style full-screen CRT effects. The shader supports many different settings to give you a variety of different effects. WebSockets The WebSockets plugin from Develephant provides a WebSocket client for your Corona projects with a simple-to-use API. Supports both secure and standard connections using the RFC6455 WebSocket protocol.  
View the full article

CoronaRob

CoronaRob

 

Social media assets guide

Image by Milky – Digital Innovation, from The Noun Project [CC BY 3.0 us], via Wikimedia Commons Every app and game developer needs an online presence if they expect to have success. Aside from a website, social media is a huge area for helping market your app. Getting started is simple enough, create a Twitter account, create a Facebook page and other sites as well. One daunting challenge is artwork. Each social media site has their own requirements. It can take hours to figure out just what you need in addition to creating the work. But never fear, Laura Bularca has created a guide to the art assets needed for a social media presence. Click on over to her website for her handy list of sites and what you need to set up that presence.    
View the full article

CoronaRob

CoronaRob

 

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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!