Screen Melt Plugin for Corona

      

About the Plugin

The Screen Melt Plugin for Corona extends Corona's built-in Composer library with a scene transition effect inspired by id Software's classic DOOM. If you've ever played the original DOOM, you'll instantly recognize the effect:

 

Adding the Plugin to your App

  1. Activate the plugin at the Corona Marketplace
  2. Add an entry into the plugins table of your project's build.settings file. Below is an example of a minimal build.settings file with the required entry for the progressRing plugin:
settings = {}

settings.plugins = {
  ['plugin.screenMelt'] = {publisherId = 'com.schroederapps'},
}

 

Requiring the plugin

To enable the "screenMelt" transition effect, simply require the plugin into your app, preferably early on in your main.lua:

require('plugin.screenMelt')

Now, simply pass in the string screenMelt where you'd normally indicate the transition effect you want to use when calling composer.gotoScene(). There are 2 different ways you can do this:

composer.gotoScene('someScene', 'screenMelt')
composer.gotoScene('someScene', {effect = 'screenMelt'})

 

Customizations

By default, using the screenMelt transition effect will result in a 1 second (1000ms) melt effect, with the screen divided up into 320 vertical "slices" of equal width. This is in keeping with the original DOOM, which as far as I could tell split up a VGA screen (640 pixels wide) into 2-pixel slices.

If desired, you can specify the speed of the transition by including a time parameter in the options table of your composer.gotoScene() call:

composer.gotoScene('someScene', {effect = 'screenMelt', time = 2000})

Likewise, you can specify the width of the vertical "slices" in Corona content units by including a sliceWidth parameter in the options table of your composer.gotoScene() call:

composer.gotoScene('someScene', {effect = 'screenMelt', sliceWidth = 66.6})

Gotchas