scroll view games

How to create mario like games?

Mario is side-scrolling (with some vertical elements depending on which Mario you mean) platformer.

Google platformer.

There are a starting points here too:  https://docs.coronalabs.com/guide/programming/index.html

Thank you so much. Are there any simpler tutorial to understand it? I searched a lot. But I couldn’t find. Anyway I will try again.

local filename = event.params.map or "Map/sandbox.json" local mapData = json.decodeFile( system.pathForFile( filename, system.ResourceDirectory ) ) map = tiled.new( mapData, "Map" )

How to load the map into Corona  from a folder called “Map”?

Rather like Mario, you need to learn to walk before you can run, jump and disappear down drainpipes.

If you find the tutorials are too complicated, you’re probably not ready and should build up your base knowledge - corona API, physics, sprites, tiled maps etc. first.

Once you have the base knowledge you can make any type of game you want without a tutorial, rather like a carpenter can build anything out of wood once they learn the skills required.

Totally right. I created a small game using corona (used sprites and physics also spawning). But when I did I thought to extend it like platformer game. So started with tiled. Am not a core programmer, may be that is also a problem. I will try again. Thanks. 

You will need to become a solid programmer to make video games, regardless of engine/sdk.

Corona is easy to learn and use, so IMHO it is a good starting place.  

That said, if you’re entirely new to game programming, you might consider making NON video games first.  i.e. Make some text games and work your way up to drawing things.

Newcomers often completely under appreciate the amount of knowledge and skill required by a single-person to make a game.

Any person who really wants to make a big game (the Mario games were all massive games in terms of content), needs a team, or if they are all alone, will need to know:

  • General programming,
  • Lua programming if using Corona,
  • Corona and its features,
  • physics concepts,
  • some geometry,
  • some trig,
  • vector math,
  • maybe even some calculus for true Mario like jumping,
  • sound concepts,
  • art concepts,
  • animation,
  • a whole slew of content creation tools,

I’m not trying to scare you, but when new folks come in and say, “How do I make a game like X?”, I really want to help them, but the honest answer is there is no answer other than a lot of learning and hard work. 

By the time you’re ready to make game X, you won’t need to ask the question anymore.

A slightly less daunting answer that gives you a path…
 
You ask, “How do I make game X?”
 
I say,

  • Decide on how the input for your game will work.  For example, how do we move the player left and right?  Let’s assume you use two on-screen arrow buttons.
  • Figure out how to make buttons.
  • Figure out how to attach those buttons to functions that move an object.  Don’t make a fancy mover.  Just move the character left or right by changing the x position.
  • When you draw that player, just use a colored rectangle and don’t bother with physics yet.  Remember you’re focusing on the buttons right now.

Once you have a rectangle on the screen and two buttons that move it left and right by changing the object’s x position, choose a new mechanic.

  • Next consider move ‘Mario-like’ (not the same just similar) movement.
  • Add a ground object and add a physics body.  Again just user colored rectangles.
  • Add a physics body to the player.
  • Consider that changing the x and y positions of physics objects is NOT the right way to move physics bodies.
  • Work out how to use velocities to move the player when you tap your buttons.

Once you have the player moving with velocities, add a new factor: Jumping

  •  Add another button and hook it to the player.
  • Figure out how to jump.  Hint: Applying a linear impulse may be good.

Once you have jumping, add some blocks to jump on and over.  i.e. Make the ground more complex.

Next figure out how to implement a camera system that keeps the player in view while the world seems to move around him.

Eventually realize your code is a total mess and take a time out. Learn how to make modules. 

Now that you know how to write modules, start over.  Re-write your test code (not copy-paste, but a real re-write) in a modular fashion.

Continue on this path…

  thank you very much for the reply. Here is one of the coding for a small game i did. It is working perfectly. 

----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- display.setStatusBar( display.HiddenStatusBar ) local centerX = display.contentWidth/2 local centerY = display.contentHeight/2 -------------------------DISPLAYS----------------------------------------------- local underlay = display.newGroup() local cloudsGroup = display.newGroup() local underlayPaddy = display.newGroup() local branchGroup = display.newGroup() local CharGroup = display.newGroup() ------------------SPRITES------------------------------------------------------- local objectSheetCloud = require ("cloud") local myObjectSheetCloud = graphics.newImageSheet( "Images/cloud.png", objectSheetCloud:getSheet() ) local objectSheetBird = require("flap") local myObjectSheetBird = graphics.newImageSheet("Images/flap.png", objectSheetBird:getSheet()) local objectSheetBirdR = require("flapR") local myObjectSheetBirdR = graphics.newImageSheet("Images/flapR.png", objectSheetBirdR:getSheet()) -------------------------------------------------------------------------------- local bg = display.newImageRect(underlay, "Images/bg.png", display.contentWidth, display.contentHeight) bg.x = centerX bg.y = centerY local paddy = display.newImageRect(underlayPaddy, "Images/paddy.png", display.contentWidth, display.contentHeight) paddy.x = centerX paddy.y = centerY -------------------------------------------------------------------------------- local clouds = {} local enemies = {} local idx = 0 local eidx = 0 local scale = 0 local kHave = false local eHave = false local min = 4 local sec = 60 local currLevel = 2 local feed = 0 --local once = 0 ------------------------REMOVE-------------------------------------------------- local function updateChar (char) char:removeSelf() char = nil --display.remove( enemy ) --table.remove(enemies,eidx) end ---------------------CLOUDS----------------------------------------------------- local function createCloud(bn) for x = 1, bn do idx = idx + 1 local cloud = display.newSprite(cloudsGroup, myObjectSheetCloud, objectSheetCloud:getSequenceData()) cloud.x = -200 cloud.y = math.random(150,(display.contentHeight-150)) cloud:setSequence("cloud".. math.random(1,9)) scale = math.random(0.5,1) cloud:scale(scale, scale) cloud:play() transition.to( cloud, {time = 10000, x = display.contentWidth + 200, onComplete = updateChar} ) clouds[idx] = cloud clouds[idx].idx = idx clouds[idx].myName = "cloud" end end ------------------------ENEMIES------------------------------------------------- local function testCollisions() for i = 1, #enemies do if enemies[i].x == nil then --enemies[i].x = 20 --print("reached") --enemies[i]:removeSelf() --enemies[i] = nil --table.remove(enemies, i) else if ( (bird.x \> (enemies[i].x-25)) and (bird.x \< (enemies[i].x+25)) ) and ( (bird.y \> (enemies[i].y-25)) and (bird.y \< (enemies[i].y+25)) ) then print("closer to enemy") if kHave == true and eHave == false then enemies[i]:setSequence("rkFly") enemies[i]:play() bird:setSequence("rFly") bird:play() kHave = false eHave = true elseif kHave == false and eHave == true then enemies[i]:setSequence("rFly") enemies[i]:play() bird:setSequence("rkFly") bird:play() kHave = true eHave = false end end end end return kHave end Runtime:addEventListener("enterFrame", testCollisions) local function onComplete1( self ) self.x = -50 self.y = math.random(150,(display.contentHeight-75)) transition.to( self, {time = 2000, x = display.contentWidth + 50, onComplete = onComplete2, iterations = -1} ) end local function onComplete2( self ) self.x = -50 self.y = math.random(150,(display.contentHeight-75)) transition.to( self, {time = 2000, x = display.contentWidth + 50, onComplete = onComplete1, iterations = -1} ) end local function createEnemies(en) if kHave then for x = 1, en do eidx = eidx + 1 local enemy = display.newSprite(CharGroup, myObjectSheetBirdR, objectSheetBirdR:getSequenceData()) enemy.x = -50 enemy.y = math.random(150,(display.contentHeight-75)) enemy:setSequence("rFly") enemy:scale(.35,.35) enemy:play() onComplete1(enemy) transition.to( enemy, {time = math.random(1000,3000), x = display.contentWidth + 50, onComplete = onComplete1} ) enemies[eidx] = enemy enemies[eidx].eidx = eidx enemies[eidx].myName = "enemy" end end return enemies end ----------------------------------ENEMY TAKEN----------------------------------- local function updateCloud() createCloud(1) end local function updateEnemies() createEnemies(1) end local function timerOnEnemies() timer.performWithDelay(math.random(2000, 4000), updateEnemies,currLevel) end timerOnEnemies() timer.performWithDelay(1000, updateCloud, 60\*5) -------------------------------------------------------------------------------- local branch = display.newImageRect(branchGroup, "Images/branch.png", 200, 60) branch:scale(1,1) branch.x = 50 branch.y = 50 -----------------------BIRD----------------------------------------------------- \_G.bird = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) bird:scale(.35,.35) bird.x = branch.x bird.y = branch.y - 8 bird:setSequence("rReady") bird:play() local smallBird1 = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) smallBird1:scale(.25,.25) smallBird1.x = branch.x + 50 smallBird1.y = branch.y - 15 smallBird1:setSequence("rReady") smallBird1:play() local smallBird2 = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) smallBird2:scale(.25,.25) smallBird2.x = branch.x + 30 smallBird2.y = branch.y - 15 smallBird2:setSequence("rFly") smallBird2:play() -------------------------------------------------------------------------------- --local kathir = display.newImageRect( CharGroup, "Images/kathir.png", 34, 32) --kathir:scale(1,1) --kathir.x = display.contentWidth - 30 --kathir.y = display.contentHeight - 20 --local rect = display.newRect(kathir.x, kathir.y, 25, 25) --rect.alpha = 0.4 ---------------------BIRD ACTIVITIES-------------------------------------------- local function createKathir() \_G.kathir = display.newImageRect( CharGroup, "Images/kathir.png", 34, 32) kathir:scale(1,1) kathir.x = math.random( 10,display.contentWidth - 30 ) kathir.y = math.random( (display.contentHeight - 40), (display.contentHeight - 20) ) return kathir end createKathir() local function feedChildren() if kHave then if ( (bird.x \> (smallBird1.x-25)) and (bird.x \< (smallBird1.x+25)) ) and ( (bird.y \> (smallBird1.y-25)) and (bird.y \< (smallBird1.y+25)) ) then kHave = false print("feed") bird:setSequence("rFly") bird:play() feed = feed + 1 print(feed) currLevel = currLevel + 1 timerOnEnemies() createKathir() end if feed == 10 then local Message = display.newText( "Mommy! Am full", 0, 0, Harrowprint, 25 ) Message.x = centerX Message.y = centerY Message:setFillColor(0,0,1) transition.to( Message, {time = 1000, alpha = 0, onComplete = updateChar} ) --print("Hurray") --else -- local Message = display.newText( "Mommy! Am hungry", 0, 0, Harrowprint, 25 ) -- Message.x = centerX -- Message.y = centerY -- Message:setFillColor(1,0,0) -- transition.to( Message, {time = 1000, alpha = 0, onComplete = updateChar} ) end end return kHave end local function takeKathir() if kHave == true and kathir == nil then elseif kHave == false and kathir ~= nil then if ( (bird.x \> (kathir.x-25)) and (bird.x \< (kathir.x+25)) ) and ( (bird.y \> (kathir.y-25)) and (bird.y \< (kathir.y+25)) ) then kHave = true print("closer") kathir:removeSelf() kathir = nil --createKathir() end end return kHave end Runtime:addEventListener("enterFrame", feedChildren) Runtime:addEventListener("enterFrame", takeKathir) local function flyHere(event) if kHave then -- if once == 0 then -- createEnemies(3) -- once = once +1 -- end if bird.x \< event.x then bird:setSequence("rkFly") elseif bird.x \> event.x then bird:setSequence("lkFly") end else if bird.x \< event.x then bird:setSequence("rFly") elseif bird.x \> event.x then bird:setSequence("lFly") end end bird:play() transition.to( bird, {time = 2000, x = event.x, y = event.y} ) end --------------------TIME-------------------------------------------------------- --[[local timeDisplay = display.newText(min.." : "..sec,0,0,native.systemFrontBold,27) timeDisplay:setFillColor(1,1,1) timeDisplay.x = display.contentCenterX timeDisplay.y = 20 local function updateTimerSec(event) if sec == 0 then min = min-1 sec = 59 end sec = sec - 1 timeDisplay.text = ( min.. " : "..sec ) end timer.performWithDelay(1000, updateTimerSec, -1)]] Runtime:addEventListener("tap", flyHere) --------------------------------------------------------------------------------

I want this game to elaborate with the map so that my bird can fly everywhere. :slight_smile:

Got it… Let’ try.https://github.com/ponywolf/ponytiledI was looking for this.

Hurray… I loaded, again I had small issues still…

local tiled = require "com.ponywolf.ponytiled" local json = require "json" -- Load a "pixel perfect" map from a JSON export w/ External tileset display.setDefault("magTextureFilter", "nearest") display.setDefault("minTextureFilter", "nearest") local mapData = json.decodeFile(system.pathForFile("maps/external/un.json", system.ResourceDirectory)) -- load from json export local map = tiled.new(mapData, "maps/external") -- center the map on screen map.x,map.y = display.contentCenterX - map.designedWidth/2, display.contentCenterY - map.designedHeight/2 -- drag the whole map for fun local dragable = require "com.ponywolf.plugins.dragable" map = dragable.new(map)

Thank you… I will come again with new problems :slight_smile: Corona is getting awesome by the way. 

Mario is side-scrolling (with some vertical elements depending on which Mario you mean) platformer.

Google platformer.

There are a starting points here too:  https://docs.coronalabs.com/guide/programming/index.html

Thank you so much. Are there any simpler tutorial to understand it? I searched a lot. But I couldn’t find. Anyway I will try again.

local filename = event.params.map or "Map/sandbox.json" local mapData = json.decodeFile( system.pathForFile( filename, system.ResourceDirectory ) ) map = tiled.new( mapData, "Map" )

How to load the map into Corona  from a folder called “Map”?

Rather like Mario, you need to learn to walk before you can run, jump and disappear down drainpipes.

If you find the tutorials are too complicated, you’re probably not ready and should build up your base knowledge - corona API, physics, sprites, tiled maps etc. first.

Once you have the base knowledge you can make any type of game you want without a tutorial, rather like a carpenter can build anything out of wood once they learn the skills required.

Totally right. I created a small game using corona (used sprites and physics also spawning). But when I did I thought to extend it like platformer game. So started with tiled. Am not a core programmer, may be that is also a problem. I will try again. Thanks. 

You will need to become a solid programmer to make video games, regardless of engine/sdk.

Corona is easy to learn and use, so IMHO it is a good starting place.  

That said, if you’re entirely new to game programming, you might consider making NON video games first.  i.e. Make some text games and work your way up to drawing things.

Newcomers often completely under appreciate the amount of knowledge and skill required by a single-person to make a game.

Any person who really wants to make a big game (the Mario games were all massive games in terms of content), needs a team, or if they are all alone, will need to know:

  • General programming,
  • Lua programming if using Corona,
  • Corona and its features,
  • physics concepts,
  • some geometry,
  • some trig,
  • vector math,
  • maybe even some calculus for true Mario like jumping,
  • sound concepts,
  • art concepts,
  • animation,
  • a whole slew of content creation tools,

I’m not trying to scare you, but when new folks come in and say, “How do I make a game like X?”, I really want to help them, but the honest answer is there is no answer other than a lot of learning and hard work. 

By the time you’re ready to make game X, you won’t need to ask the question anymore.

A slightly less daunting answer that gives you a path…
 
You ask, “How do I make game X?”
 
I say,

  • Decide on how the input for your game will work.  For example, how do we move the player left and right?  Let’s assume you use two on-screen arrow buttons.
  • Figure out how to make buttons.
  • Figure out how to attach those buttons to functions that move an object.  Don’t make a fancy mover.  Just move the character left or right by changing the x position.
  • When you draw that player, just use a colored rectangle and don’t bother with physics yet.  Remember you’re focusing on the buttons right now.

Once you have a rectangle on the screen and two buttons that move it left and right by changing the object’s x position, choose a new mechanic.

  • Next consider move ‘Mario-like’ (not the same just similar) movement.
  • Add a ground object and add a physics body.  Again just user colored rectangles.
  • Add a physics body to the player.
  • Consider that changing the x and y positions of physics objects is NOT the right way to move physics bodies.
  • Work out how to use velocities to move the player when you tap your buttons.

Once you have the player moving with velocities, add a new factor: Jumping

  •  Add another button and hook it to the player.
  • Figure out how to jump.  Hint: Applying a linear impulse may be good.

Once you have jumping, add some blocks to jump on and over.  i.e. Make the ground more complex.

Next figure out how to implement a camera system that keeps the player in view while the world seems to move around him.

Eventually realize your code is a total mess and take a time out. Learn how to make modules. 

Now that you know how to write modules, start over.  Re-write your test code (not copy-paste, but a real re-write) in a modular fashion.

Continue on this path…

  thank you very much for the reply. Here is one of the coding for a small game i did. It is working perfectly. 

----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- display.setStatusBar( display.HiddenStatusBar ) local centerX = display.contentWidth/2 local centerY = display.contentHeight/2 -------------------------DISPLAYS----------------------------------------------- local underlay = display.newGroup() local cloudsGroup = display.newGroup() local underlayPaddy = display.newGroup() local branchGroup = display.newGroup() local CharGroup = display.newGroup() ------------------SPRITES------------------------------------------------------- local objectSheetCloud = require ("cloud") local myObjectSheetCloud = graphics.newImageSheet( "Images/cloud.png", objectSheetCloud:getSheet() ) local objectSheetBird = require("flap") local myObjectSheetBird = graphics.newImageSheet("Images/flap.png", objectSheetBird:getSheet()) local objectSheetBirdR = require("flapR") local myObjectSheetBirdR = graphics.newImageSheet("Images/flapR.png", objectSheetBirdR:getSheet()) -------------------------------------------------------------------------------- local bg = display.newImageRect(underlay, "Images/bg.png", display.contentWidth, display.contentHeight) bg.x = centerX bg.y = centerY local paddy = display.newImageRect(underlayPaddy, "Images/paddy.png", display.contentWidth, display.contentHeight) paddy.x = centerX paddy.y = centerY -------------------------------------------------------------------------------- local clouds = {} local enemies = {} local idx = 0 local eidx = 0 local scale = 0 local kHave = false local eHave = false local min = 4 local sec = 60 local currLevel = 2 local feed = 0 --local once = 0 ------------------------REMOVE-------------------------------------------------- local function updateChar (char) char:removeSelf() char = nil --display.remove( enemy ) --table.remove(enemies,eidx) end ---------------------CLOUDS----------------------------------------------------- local function createCloud(bn) for x = 1, bn do idx = idx + 1 local cloud = display.newSprite(cloudsGroup, myObjectSheetCloud, objectSheetCloud:getSequenceData()) cloud.x = -200 cloud.y = math.random(150,(display.contentHeight-150)) cloud:setSequence("cloud".. math.random(1,9)) scale = math.random(0.5,1) cloud:scale(scale, scale) cloud:play() transition.to( cloud, {time = 10000, x = display.contentWidth + 200, onComplete = updateChar} ) clouds[idx] = cloud clouds[idx].idx = idx clouds[idx].myName = "cloud" end end ------------------------ENEMIES------------------------------------------------- local function testCollisions() for i = 1, #enemies do if enemies[i].x == nil then --enemies[i].x = 20 --print("reached") --enemies[i]:removeSelf() --enemies[i] = nil --table.remove(enemies, i) else if ( (bird.x \> (enemies[i].x-25)) and (bird.x \< (enemies[i].x+25)) ) and ( (bird.y \> (enemies[i].y-25)) and (bird.y \< (enemies[i].y+25)) ) then print("closer to enemy") if kHave == true and eHave == false then enemies[i]:setSequence("rkFly") enemies[i]:play() bird:setSequence("rFly") bird:play() kHave = false eHave = true elseif kHave == false and eHave == true then enemies[i]:setSequence("rFly") enemies[i]:play() bird:setSequence("rkFly") bird:play() kHave = true eHave = false end end end end return kHave end Runtime:addEventListener("enterFrame", testCollisions) local function onComplete1( self ) self.x = -50 self.y = math.random(150,(display.contentHeight-75)) transition.to( self, {time = 2000, x = display.contentWidth + 50, onComplete = onComplete2, iterations = -1} ) end local function onComplete2( self ) self.x = -50 self.y = math.random(150,(display.contentHeight-75)) transition.to( self, {time = 2000, x = display.contentWidth + 50, onComplete = onComplete1, iterations = -1} ) end local function createEnemies(en) if kHave then for x = 1, en do eidx = eidx + 1 local enemy = display.newSprite(CharGroup, myObjectSheetBirdR, objectSheetBirdR:getSequenceData()) enemy.x = -50 enemy.y = math.random(150,(display.contentHeight-75)) enemy:setSequence("rFly") enemy:scale(.35,.35) enemy:play() onComplete1(enemy) transition.to( enemy, {time = math.random(1000,3000), x = display.contentWidth + 50, onComplete = onComplete1} ) enemies[eidx] = enemy enemies[eidx].eidx = eidx enemies[eidx].myName = "enemy" end end return enemies end ----------------------------------ENEMY TAKEN----------------------------------- local function updateCloud() createCloud(1) end local function updateEnemies() createEnemies(1) end local function timerOnEnemies() timer.performWithDelay(math.random(2000, 4000), updateEnemies,currLevel) end timerOnEnemies() timer.performWithDelay(1000, updateCloud, 60\*5) -------------------------------------------------------------------------------- local branch = display.newImageRect(branchGroup, "Images/branch.png", 200, 60) branch:scale(1,1) branch.x = 50 branch.y = 50 -----------------------BIRD----------------------------------------------------- \_G.bird = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) bird:scale(.35,.35) bird.x = branch.x bird.y = branch.y - 8 bird:setSequence("rReady") bird:play() local smallBird1 = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) smallBird1:scale(.25,.25) smallBird1.x = branch.x + 50 smallBird1.y = branch.y - 15 smallBird1:setSequence("rReady") smallBird1:play() local smallBird2 = display.newSprite(CharGroup, myObjectSheetBird, objectSheetBird:getSequenceData()) smallBird2:scale(.25,.25) smallBird2.x = branch.x + 30 smallBird2.y = branch.y - 15 smallBird2:setSequence("rFly") smallBird2:play() -------------------------------------------------------------------------------- --local kathir = display.newImageRect( CharGroup, "Images/kathir.png", 34, 32) --kathir:scale(1,1) --kathir.x = display.contentWidth - 30 --kathir.y = display.contentHeight - 20 --local rect = display.newRect(kathir.x, kathir.y, 25, 25) --rect.alpha = 0.4 ---------------------BIRD ACTIVITIES-------------------------------------------- local function createKathir() \_G.kathir = display.newImageRect( CharGroup, "Images/kathir.png", 34, 32) kathir:scale(1,1) kathir.x = math.random( 10,display.contentWidth - 30 ) kathir.y = math.random( (display.contentHeight - 40), (display.contentHeight - 20) ) return kathir end createKathir() local function feedChildren() if kHave then if ( (bird.x \> (smallBird1.x-25)) and (bird.x \< (smallBird1.x+25)) ) and ( (bird.y \> (smallBird1.y-25)) and (bird.y \< (smallBird1.y+25)) ) then kHave = false print("feed") bird:setSequence("rFly") bird:play() feed = feed + 1 print(feed) currLevel = currLevel + 1 timerOnEnemies() createKathir() end if feed == 10 then local Message = display.newText( "Mommy! Am full", 0, 0, Harrowprint, 25 ) Message.x = centerX Message.y = centerY Message:setFillColor(0,0,1) transition.to( Message, {time = 1000, alpha = 0, onComplete = updateChar} ) --print("Hurray") --else -- local Message = display.newText( "Mommy! Am hungry", 0, 0, Harrowprint, 25 ) -- Message.x = centerX -- Message.y = centerY -- Message:setFillColor(1,0,0) -- transition.to( Message, {time = 1000, alpha = 0, onComplete = updateChar} ) end end return kHave end local function takeKathir() if kHave == true and kathir == nil then elseif kHave == false and kathir ~= nil then if ( (bird.x \> (kathir.x-25)) and (bird.x \< (kathir.x+25)) ) and ( (bird.y \> (kathir.y-25)) and (bird.y \< (kathir.y+25)) ) then kHave = true print("closer") kathir:removeSelf() kathir = nil --createKathir() end end return kHave end Runtime:addEventListener("enterFrame", feedChildren) Runtime:addEventListener("enterFrame", takeKathir) local function flyHere(event) if kHave then -- if once == 0 then -- createEnemies(3) -- once = once +1 -- end if bird.x \< event.x then bird:setSequence("rkFly") elseif bird.x \> event.x then bird:setSequence("lkFly") end else if bird.x \< event.x then bird:setSequence("rFly") elseif bird.x \> event.x then bird:setSequence("lFly") end end bird:play() transition.to( bird, {time = 2000, x = event.x, y = event.y} ) end --------------------TIME-------------------------------------------------------- --[[local timeDisplay = display.newText(min.." : "..sec,0,0,native.systemFrontBold,27) timeDisplay:setFillColor(1,1,1) timeDisplay.x = display.contentCenterX timeDisplay.y = 20 local function updateTimerSec(event) if sec == 0 then min = min-1 sec = 59 end sec = sec - 1 timeDisplay.text = ( min.. " : "..sec ) end timer.performWithDelay(1000, updateTimerSec, -1)]] Runtime:addEventListener("tap", flyHere) --------------------------------------------------------------------------------

I want this game to elaborate with the map so that my bird can fly everywhere. :slight_smile:

Got it… Let’ try.https://github.com/ponywolf/ponytiledI was looking for this.