Ghosts VS Monsters aka Angry Ghosts - Angry Birds Sample Game is Open Source

16 replies [Last post]
carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 6 weeks 5 days ago. Offline
Alumni
Joined: 22 Jun 2009

The question has been asked many times. Can Corona SDK be used to create Angry-Birds types of games?

Take a look at Ghosts vs Monsters.

Created exclusively for Ansca by Jonathan and Biffy Beebe.

Want the source code? It is fully open source at our Code Exchange pages

Sample took less than 36 hours to code, with music and graphics.

Carlos.
twitter.com/carlosicaza

Replies

IgnacioIturra
User offline. Last seen 26 weeks 3 days ago. Offline
Joined: 31 Oct 2010

I have to say that is pretty sweet. It almost makes me forgive you for the whole facebook thing (almost).

Is that game coming out (after adding more content probably)? It actually looks pretty good.

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 6 weeks 5 days ago. Offline
Alumni
Joined: 22 Jun 2009

Nope. You can do whatever you want with the source. Even create your own game and ship it.

If you use the images, you must give attributions to Jonathan and Biffy Beebe from Beebe Games.

Carlos.

rickwhy
User offline. Last seen 37 weeks 5 days ago. Offline
Joined: 27 Oct 2010

Carlos... I wanna make sweet love to you, jonathan and Beebe!

this is awesome! More examples like this and corona gonna explode!

IgnacioIturra
User offline. Last seen 26 weeks 3 days ago. Offline
Joined: 31 Oct 2010

I have to say that's probably the best possible advertisement for Corona, plus now that it's free to try I expect a big increase in users (it won't be only me whining in the forums, yay!). You have to get it out there.

Also now that I can post on facebook again, you're forgiven ;)

cmontesino
User offline. Last seen 5 hours 27 min ago. Offline
Joined: 21 Oct 2010

Best christmas gift ever!! Thanks

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 6 weeks 5 days ago. Offline
Alumni
Joined: 22 Jun 2009

Can you guys look at my twitter at twitter.com/carlosicaza and or help spread the word about the Ghost vs Monsters open source...

Thanks

Carlos

ksan
User offline. Last seen 3 weeks 23 hours ago. Offline
Joined: 29 Nov 2010

Wow! This is amazing. Well done to ANSCA & Beebe & Co! Marketing landslide! Thank you!

IgnacioIturra
User offline. Last seen 26 weeks 3 days ago. Offline
Joined: 31 Oct 2010

Already retwitted. Cheers.

jonbeebe
User offline. Last seen 1 week 6 days ago. Offline
Joined: 26 Jul 2010

More details on my blog post here:

http://jonbeebe.tumblr.com/post/2160877073/angry-birds-clone-with-corona-in-36-hours

Biffy and I really hope you guys enjoy it, and learn a lot from it!

Thanks for getting it up quickly Carlos!

P.S. For anyone with an iPhone 4 (or iTouch 4), build for device and test it! Game looks even better than in the simulator :-)

jonbeebe
User offline. Last seen 1 week 6 days ago. Offline
Joined: 26 Jul 2010

For those interested, the "Wee!" sound effect when the ghost goes flying... That's MY voice recorded with Audacity lol. All I did was go to Effects > Change Pitch (to make it much higher, of course) and then Effects > Change Tempo to get it the right length.

Audacity is free:
http://audacity.sourceforge.net/

With just the change pitch/change tempo settings in Audacity, the possibilities are endless when it comes to making tiny chipmunk-like voices (or even overly deep voices) for your games... and the end-product won't sound anything like you so you don't have to be embarrassed :-)

doubleslashdesign's picture
doubleslashdesign
User offline. Last seen 17 hours 22 min ago. Offline
Joined: 27 Nov 2010

Testing on Android, Galaxy S.

when in any level if you press the pause button then the level button,and answer yes to the are you sure want want to quit message, the App just hangs. In the simulator the app goes back to the beginning screen where you can tap play. but on the galaxy s the app, just hangs.

but if you win a board and click to return to the beginning on the popup menu, it goes back fine.

something fishy ( or ghostly ) going on here.

Kevin Baker's picture
Kevin Baker
User offline. Last seen 10 weeks 5 days ago. Offline
Joined: 21 Dec 2010

Firstly, thank you for this excellent example to learn and improve from.

I have a question . . .

This code works fine, but I am getting a warning message (although it doesn't crash) that says . . .

'attempt to 'setLinearVelocity' (a nil value)

This is from the if shouldPoof then . . . function, under the ' Make ghost disappear and show "poof" animation ' heading.
It occurs when I restrart the level or go on to the next level.

I've tried many different ways to smooth out this glitch, including making sure the object is added as a physics body, making sure all timers and transitions are cancelled and even setting shouldPoof to nil on the restart and next level buttons etc. I've also included if statements but they didn't do the trick.

Is everyone learning from this sample code getting the same warning message in the terminal window?

I've run out of ideas and am not seeing something (probably obvious as always :) )

Anybody out there with more experience than me who has fixed this glitch?

Any ideas would be appreciated.

notts_forest_
User offline. Last seen 37 weeks 2 days ago. Offline
Joined: 12 Jun 2011

Say you're trying to set the velocity of X. do something like this:

1
2
3
4
5
if X ~= nil then
 
X:setLinearVelocity
 
end

Kevin Baker's picture
Kevin Baker
User offline. Last seen 10 weeks 5 days ago. Offline
Joined: 21 Dec 2010

Thanks buddy, will try this.

I never thought about checking if the object was nil to stop the function executing a nil value.

Good advice.

Kevin Baker's picture
Kevin Baker
User offline. Last seen 10 weeks 5 days ago. Offline
Joined: 21 Dec 2010

Just mucking around and leaning from this great coding example and have made a 'New Game' button that will hopefully set the scores on both levels (1 and 2) back to zero.

Not sure how to go about setting the scores back to zero in the most effective way.

Should I reset each level, each with it's own reset code or is there a more efficient way?

If anyone with more hands on experience has any advice on this it would be appreciated, as this is a whole new area for me and I'm currently wading through the 'saving to file' info.

Thankyou ANSCA & Beebe & Co for this great code to learn from!

dmccuskey
User offline. Last seen 1 day 20 hours ago. Offline
Joined: 8 Jul 2011

As a homework exercise, I've re-written the game in an object-oriented fashion. :) I've posted it to the code share area if anyone's interested.

http://developer.anscamobile.com/code/ghost-vs-monsters-oop

cheers, dmc

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.