How To Make a Breakout Game with Corona

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

How To Make a Breakout Game with Corona

Postby rwenderlich » Thu Jan 24, 2013 11:00 am

This is the official thread to discuss the following blog post: How To Make a Breakout Game with Corona
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2155
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 337 times

Re: How To Make a Breakout Game with Corona

Postby samuel » Fri Jan 25, 2013 10:23 am

Thanks for the article! I plan to use Corona for my my next game and this will help a lot!
samuel
Baby Hacker
 
Posts: 9
Joined: Wed Jun 20, 2012 3:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Make a Breakout Game with Corona

Postby livewire1407 » Thu Feb 21, 2013 3:36 pm

Why is it that the walls on the left and right don't seem to match up with the edge of the screen when you look at this on an android phone in the simulator?
livewire1407
n00b
 
Posts: 1
Joined: Thu Feb 21, 2013 3:35 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Make a Breakout Game with Corona

Postby GPAnimations » Thu Feb 21, 2013 7:37 pm

livewire1407 wrote:Why is it that the walls on the left and right don't seem to match up with the edge of the screen when you look at this on an android phone in the simulator?


This is because the app is created for an iPhone-sized screen, with "letterbox" chosen in the config.lua file. The reason the walls of the game don't line up with the edges of the Android display is because the app is being letterboxed.

In config.lua, you can change scale="letterbox" to scale="zoomStretch" to see the difference. While not the best choice for the artwork, as it was designed for an iPhone, it will solve the problem without too many concerns. If you were to use "zoomEven" instead, the paddle would be pushed off of the thinner Android screen.
User avatar
GPAnimations
Team Member
iOS Tutorial Team Member
 
Posts: 67
Joined: Thu Oct 27, 2011 12:47 pm
Location: PA
Has thanked: 0 time
Been thanked: 0 time

Postby gabethegeek » Wed Aug 07, 2013 2:59 am

@Greg There is an error in the code playBtn:addEventListener("tap", loadGame); . You never created a loadGame function and therefore corona will throw an error and won't compile. I fixed it by simply adding
function loadGame()
--code here
end
gabethegeek
n00b
 
Posts: 2
Joined: Wed Aug 07, 2013 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Postby gabethegeek » Wed Aug 07, 2013 3:03 am

So, it's not really an error, but you add the code without creating the function an tell us to compile before actually creating the function in the next step. So I think you should reverse those steps so people ill not be confused.
gabethegeek
n00b
 
Posts: 2
Joined: Wed Aug 07, 2013 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: How To Make a Breakout Game with Corona

Postby cyrille » Tue Jan 21, 2014 9:17 am

sir please give a sample how to create a bonus in brick breaker.and please give me because i'm doing a thesis now please help me.because this 1st week of february final defense of my game.please give now.and i'll very thankful to you.
cyrille
n00b
 
Posts: 2
Joined: Tue Jan 21, 2014 9:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: How To Make a Breakout Game with Corona

Postby cyrille » Tue Jan 21, 2014 9:18 am

sir please give a sample how to create a bonus in brick breaker.and please give me because i'm doing a thesis now please help me.because this 1st week of february final defense of my game.please give now.and i'll very thankful to you.
cyrille
n00b
 
Posts: 2
Joined: Tue Jan 21, 2014 9:13 am
Has thanked: 0 time
Been thanked: 0 time

Postby trev » Wed Mar 05, 2014 12:22 pm

test
trev
n00b
 
Posts: 1
Joined: Wed Mar 05, 2014 12:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Make a Breakout Game with Corona

Postby trev » Wed Mar 05, 2014 12:33 pm

Hi,
This is a very well explained tutorial.
I am a newbie, I have completed the Hello World and similar beginner tutorials.
I decided to follow this game due to the excellent explanation.
However after completing all the copy and paste (along with my extended comments so I can follow it later)
it appears the code is not compatible with corona 2013.2100 build which uses corona 2 sdk

There is one line which causes problems on first zombie kill and that is the call to
zombieKillNum:setReferencePoint(display.CenterLeftReferencePoint);
in function zombieDestroyed().

The following error shows in corona simulator output:
ERROR: object:setReferencePoint() is only available in v1Compatibility mode. Use anchor points instead.

If this is commented out it breaks again with the same error:
conditionDisplay:setReferencePoint(display.CenterReferencePoint);
&
messageText:setReferencePoint(display.CenterReferencePoint);
in textBoxScreen function.

It would be great for learning if the author or someone with better knowledge than me could advise me how to modify the code for anchor points
on these lines.

Thank you in anticipation of any reply.
trev
n00b
 
Posts: 1
Joined: Wed Mar 05, 2014 12:22 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Official Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests