Hello people, i’m new here, i’m really impressed with the power of Corona. I’m making my first game, and i want to have animated background (two images-one of them transparent, moving with different speed which will look like its going from top to the bottom). Can you guys tell me how to make this background effect? [import]uid: 193035 topic_id: 32751 reply_id: 332751[/import]
Are you talking about parallax scrolling where you have multiple background layers moving at different speed?
If you are new to Corona, the tutorial below at mobiletuts may be of interest. The author Tyler King does a good job laying out his tutorials so they are easy to understand.
http://mobile.tutsplus.com/tutorials/corona/build-a-side-scroller-from-scratch-background-motion/ [import]uid: 135255 topic_id: 32751 reply_id: 130245[/import]
Are you talking about parallax scrolling where you have multiple background layers moving at different speed?
If you are new to Corona, the tutorial below at mobiletuts may be of interest. The author Tyler King does a good job laying out his tutorials so they are easy to understand.
http://mobile.tutsplus.com/tutorials/corona/build-a-side-scroller-from-scratch-background-motion/ [import]uid: 135255 topic_id: 32751 reply_id: 130245[/import]
Also check out the sprite demos in Corona, a couple of them have different scrolling backgrounds.
Dave [import]uid: 117617 topic_id: 32751 reply_id: 130276[/import]
Also check out the sprite demos in Corona, a couple of them have different scrolling backgrounds.
Dave [import]uid: 117617 topic_id: 32751 reply_id: 130276[/import]
Yeah i guess thats called paralax scrolling, i want to have like two layers, the second layer to be transparent, and to move with diferent speed than the first layer (some non transparent image). [import]uid: 193035 topic_id: 32751 reply_id: 130282[/import]
Yeah i guess thats called paralax scrolling, i want to have like two layers, the second layer to be transparent, and to move with diferent speed than the first layer (some non transparent image). [import]uid: 193035 topic_id: 32751 reply_id: 130282[/import]
I found out a class for parallax background on corona. I copied the “parallax.lua” file in my project folder, and i see a background but its not animated. Can you help me out with this one ?
[lua]parallax = require(“parallax”)
local myScene = parallax.newScene(
{
width = 1500,
height = 500,
bottom = 320,
left = 0,
repeated = false
} )
myScene:newLayer(
{
image = “background.png”,
width = 886,
height = 828,
bottom = 700,
left = 0,
speed = 1.4,
repeated = “vertical”
} )
myScene:newLayer(
{
image = “background-transparent.png”,
width = 886,
height = 828,
bottom = 700,
left = 0,
speed = 2,
repeated = “vertical”
} )[/lua] [import]uid: 193035 topic_id: 32751 reply_id: 130354[/import]
I found out a class for parallax background on corona. I copied the “parallax.lua” file in my project folder, and i see a background but its not animated. Can you help me out with this one ?
[lua]parallax = require(“parallax”)
local myScene = parallax.newScene(
{
width = 1500,
height = 500,
bottom = 320,
left = 0,
repeated = false
} )
myScene:newLayer(
{
image = “background.png”,
width = 886,
height = 828,
bottom = 700,
left = 0,
speed = 1.4,
repeated = “vertical”
} )
myScene:newLayer(
{
image = “background-transparent.png”,
width = 886,
height = 828,
bottom = 700,
left = 0,
speed = 2,
repeated = “vertical”
} )[/lua] [import]uid: 193035 topic_id: 32751 reply_id: 130354[/import]