No description, website, or topics provided.
HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_layouts
camera
engine
entityLayer
img
lightingModel
lineOfSightModel
module
objectSystem
regionManager
spriteInfo
tile
tileLayer
utils
viewControl
FUNCTION.markdown
Instructions.markdown
PROPERTY.markdown
Readme.markdown
_config.yml
loadTable.markdown
luaOopPrimer.markdown
oldQuickstart.markdown
physicsExample.markdown
printTable.markdown
quickstart.markdown
regionManagerExample.markdown
saveTable.markdown
tiledExample.markdown

Readme.markdown

Wattage Tile Engine: Plugin API Docs

Wattage Tile Engine Logo

 
Type Library
Corona Store wattageTileEngine
Keywords Tiles, Tile, Tile Engine, Engine
See also

Quickstart

Find screenshots of the tile engine in action here, and a video of the tech demo here.

The Wattage Tile Engine is easy to use. Check out the quick start guide here to get up and running fast. Or download the template and start your own project. Be sure to check out the variety of sample code below.

Overview

The wattageTileEngine plugin can be used in your Corona project. It enables the display of a large number of tiles and includes the following features:

  • Support for a large number of tiles.
  • Support for very large worlds which are too large to load entirely into memory through the use of the RegionManager. See the RegionManager guide below.
  • Dynamic lighting effects.
    • Tiles may be configured as opaque to cast shadows.
    • Opaque tiles may be added/removed arbitrarily and their effects on shadows will be realized in real-time.
    • Lights may be added and removed arbitrarily and their effects are realized in real-time.
    • Ability to specify ambient lighting. This is useful for outdoor scenes.
    • Ability to specify whether a tile is affected by ambient light. This is useful for indoor tiles in an outdoor environment.
    • Lights may be moved with smooth transitions between their states.
    • Entities are affected by the lighting in each tile.
  • Dynamic line of sight. Useful for hiding tiles that would not be visible to the player.
  • Dynamic tile definitions. Useful for representing a dynamic world.
  • Multiple layers.
  • Multiple layer types (Tile, Entity)
  • Parallax scrolling between layers.
  • Camera which supports arbitrary viewing positions and different levels of zoom.

Guides

Syntax

local wattageTileEngine = require "plugin.wattageTileEngine"

Libraries

Types

The following types are exposed by the Wattage Tile Engine library:

Project Configuration

Corona Store Activation

In order to use this plugin, you must activate the plugin at the Corona Store.

SDK

When you build using the Corona Simulator, the server automatically takes care of integrating the plugin into your project.

All you need to do is add an entry into a plugins table of your build.settings. The following is an example of a minimal build.settings file:

settings =
{
	plugins =
	{
		-- key is the name passed to Lua's 'require()'
		["plugin.wattageTileEngine"] =
		{
			-- required
			publisherId = "com.blindprophetsoftware",
		},
	},		
}

Enterprise

If you have activated this plugin, you can download this plugin from the corresponding plugin page in the Corona Store.

Platform-specific Notes

None.

Resources

Sample Code

The template serves as a bare bones example.

The Quickstart Guide walks through all of the following sample code:

Additional Examples

Support

More support is available from the Blind Prophet Software, LLC team:

Compatibility

Platform Supported
iOS Yes
Android Yes
Android (GameStick) Yes
Android (Kindle) Yes
Android (NOOK) Yes
Android (Ouya) Yes
Mac App Yes
Win32 App Yes
Windows Phone 8 Yes
Corona Simulator (Mac) Yes
Corona Simulator (Win) Yes

Screenshots

Racing Game

Racing screenshot 1

Racing screenshot 2

Racing screenshot 3

Roguelike

Roguelike screenshot 1

Roguelike screenshot 2

Roguelike screenshot 3

Tech Demo

Tech deom screenshot 1

Tech deom screenshot 2

Tech deom screenshot 3

Tech deom screenshot 4

Videos

Release Notes

7-11-17

Version 1.0.4

This release consists of non-breaking changes. It adds functions to RegionManager which allow it to handle non-resource entities.

5-8-17

Version 1.0.3

This release consists of non-breaking changes. No changes should be necessary in your code.

  • Added RegionManager type to assist in creating very large worlds.
  • Fixed memory leak occurring when tiles are dynamicaly updated outside of the visible area.

4-25-17

Version 1.0.2

This release consists of non-breaking changes. No changes should be necessary in your code.

  • Fixed bug where entities in an EntityLayer could be visible on the first frame before they were moved into correct positions.
  • Minor Performance Improvements.
  • SpriteInfo.new() has been deprecated. We have found that calling new() repeatedly is noticeably more costly than just creating a table with the same properties. The new() function has been left in the engine for now, but it may be removed in the future. It is recommended that a table be used instead. For example, instead of this:
local spriteInfo = SpriteInfo.new({
    imageRect = displayObject,
    width = 100,
    height = 100
})

It is slightly better performance wise to do this:

local spriteInfo = {
    imageRect = displayObject,
    width = 100,
    height = 100
}
  • Introduced lighting mode NONE for layers. This will skip any light processing to improve performance for games which just want to display unlit tiles.

2-1-17

Version 1.0.1

This release consists of non-breaking changes. No changes should be necessary in your code.

  • Fixed bug where tiles may be added twice when scrolling diagonally.
  • Fixed bug with non-resource entity ID assignment. Resource and non-resource IDs are managed separately. It is now possible that the same ID could be assigned to a resource entity as well as a non-resource entity.