Ghosts vs. Monsters: Open source game made with Corona SDK

Posted by

There’s a question that’s been asked many times over in our forums, e-mails, and at gatherings:  Can Corona SDK create a game similar to Angry Birds, and how easy is it to do? Without a doubt, our answer has always been a solid “yes!”

Then, the next question has been “Can I see a demo?”

Yikes.

We’ve never had a demo of an Angry-something to show off the power of Corona. One day, the team and I were bouncing ideas on how to make a simple Angry-anything demo to ship with in our disk image to show off Corona. Then, it dawned on us — we have some outstanding developers using Corona, we should ask them to “surprise us” with one!

Well, our good friend Jonathan Beebe and his wife Biffy (Beebe Games, collectively!) answered our call, and the request was very simple: Here is Angry Birds – can you clone it in Corona, but give it a twist?

After just 36 hours (that’s right, hours!) from our initial sit-down to talk about the game, Jonathan came back to me and asked, “Is this what you had in mind?”  We were blown away — and I hope you are too — by how simple and fast the game that the Beebes made is, and by how simple Corona SDK made its development process. I had to ask Jonathan twice if he was serious about doing the sample app in 36 hours, including graphics and gameplay.

So, for all of our users, we have made the source code for Beebe GamesGhost vs. Monsters available on GitHub. Just click the button below.

Download it from GitHub

Also, you can check out a quick little demo video of the sample app below:

Ready to get started?

Create amazing games and apps for iOS & Android

31 Comments

Alfred R. BaudischDecember 10th, 2010 at 7:24 am

Amazing! I’m a Cocos 2D developer that is getting into Corona and this is exactly the kind of reference / material I was looking for.

Thanks!

Ricardo RauberDecember 10th, 2010 at 8:06 am

Congratulations Beebe Games! It’s very good and I’m so glad to see Director there! Thanks a lot!

Mike RDecember 10th, 2010 at 8:51 am

Fantastic. THIS should help work out how to create levels etc.

Thank you.

FranciscoDecember 10th, 2010 at 9:47 am

Thank you so much Beebe Games. Your work will help to all.

Regards.

FranciscoDecember 10th, 2010 at 10:41 am

Hello,

I am reading the source code and in file “mainmenu.lua”, the lines 118 and 119 have same code “ofBtn.isActive = false”.
Maybe this is an error.

Regards.

J. A. WhyeDecember 10th, 2010 at 1:25 pm

And *this* is why Corona SDK is so awesome. Not just for the framework, but also the developers/community that surrounds it.

Very nice present and thanks to both Ansca Mobile and Beebe Games!

Jay

Jonathan BeebeDecember 10th, 2010 at 3:54 pm

Thanks for your comments everyone, I hope you enjoy Ghosts vs. Monsters and learn from it!

And yes, special thanks to Ricardo Rauber for his Director Class which undoubtedly shaved off some time when it came to handling screen transitions :-)

Bryan RiegerDecember 14th, 2010 at 1:53 am

It’s probably just me but I simply can’t get the downloaded version of Ghosts vs Monsters to get past the ‘loading’ screen as I end up with the following error:

Runtime error
…bryanrieger/Desktop/Ghosts vs. Monsters/mainmenu.lua:39: attempt to index global ‘audio’ (a nil value)
stack traceback:
[C]: ?
…bryanrieger/Desktop/Ghosts vs. Monsters/mainmenu.lua:39: in function ‘new’
…bryanrieger/Desktop/Ghosts vs. Monsters/director.lua:118: in function ‘loadScene’
…bryanrieger/Desktop/Ghosts vs. Monsters/director.lua:413: in function ‘changeScene’
…nrieger/Desktop/Ghosts vs. Monsters/loadmainmenu.lua:30: in function ‘_listener’
?: in function
?: in function
Runtime error
…bryanrieger/Desktop/Ghosts vs. Monsters/director.lua:137: bad argument #-2 to ‘insert’ (Proxy expected, got nil)
stack traceback:
[C]: ?
[C]: in function ‘insert’
…bryanrieger/Desktop/Ghosts vs. Monsters/director.lua:137: in function ‘_listener’
?: in function
?: in function

GilbertDecember 14th, 2010 at 10:00 am

Hi Bryan,

Make sure you’re using the latest version of Corona. The first error refers to an ‘audio’ value that is nil, which makes me think it’s not finding the new audio API which is only available in the latest version of Corona.

You can find out which version you have by clicking Corona Simulator > About Corona Simulator…

The latest is: Version 2010.243 (2010.12.2)

Or, just download it now to make sure you have the latest.

http://developer.anscamobile.com/user/register?destination=downloads/corona-sdk

-Gilbert

Bryan RiegerDecember 14th, 2010 at 11:33 am

Ah, brilliant – that got it! Cheers! :)

[...] Games’ open source Angry Birds replica Ghosts vs. Monsters was such a hit with the Corona community that he and wife Biffy decided to do it all over [...]

HenryDecember 14th, 2010 at 6:24 pm

THANK YOU.

Quality material like this is perfect for helping others. Thanks!

GilbertDecember 15th, 2010 at 4:33 pm

I hope everyone has noticed how great this looks and perfectly it functions on the iPad! It’s Ghosts vs. Monsters HD, thrown in for FREE!!!!

houenDecember 23rd, 2010 at 12:47 am

This is exactly what is needed in terms of guidance for new developers. More of this type! Show off every type of game, and how to structure one

[...] via blog.anscamobile.com [...]

[...] some full game examples with source code, see Jonathan Beebe’s “Ghosts vs. Monsters” and “Martian Control”, along with the “Physics/SimplePool” sample project [...]

JordanJanuary 24th, 2011 at 9:40 pm

I’m new here, but this is incredible!

joshJanuary 25th, 2011 at 9:30 pm

when i try to load in corona sdk, all i get is a white screen… any suggestions?

BryceMarch 18th, 2011 at 6:53 pm

I’m running the lastest corona sdk 2011.377 and i get the director.lua : bad argument #-2 to ‘insert’ (Proxy expected, got nil)
problem

have they broken something?

Bryce

PeterMarch 19th, 2011 at 2:47 pm

I dont get why in mainmenu.lua

ghostAnimation() –> calls animUp –> calls ghostAnimation

then it will be a forever loop???

carlos icazaMarch 19th, 2011 at 3:18 pm

@peter @bryce

the best place to get feedback on issues like this is in our forums.

i encourage you to go in and either start a new thread or see if there is an existing thread.

cheers

carlos

Thiago RebouçasMarch 23rd, 2011 at 8:14 pm

Oww! It’s simply fantastic! Thanks!

BryceApril 6th, 2011 at 2:38 am

>@peter @bryce

>the best place to get feedback on issues like this is in our forums.

>i encourage you to go in and either start a new thread or see if there is an existing thread.

yeah hi carlos

i would post in those locations you list but i’m not a paid subscriber as i’m evaluating the product before we buy.
At the moment the 377 build breaks the code. When will you guys be releasing the next evaluation build so we can get back into it?

Bryce

HetalApril 6th, 2011 at 10:33 am

Bryce, you can still post in the forums even if you’re not a paid subscriber.

BryceApril 6th, 2011 at 7:32 pm

Hi Hetal
i must be missing something, after loging in i only see one forum

Corona SDK Community Forums
new post folder
New Users Start Here

and i also get this message
“You are not allowed to post new content in the forum.”.

When i enter the forum to post a message.

So errr, no i cant post anything – which i also admit is quite surprising (what have i forgotten to do?)

But, does know when the next version of the the evaluation version will be available?

Bryce

JohnJune 27th, 2011 at 1:13 pm

Hi: I’m new to Corona, and love the fact that there is such a great community resource!

I downloaded this open source app (Thank You Jonathan!) and am trying to learn Corona as I go and make it into a simple kids game I’d like to put up for free. Anyway, is there a way to remove the OpenFeint code?

For little kids, I just want them to enjoy the game without this added section. If anyone can provide instructions on how to remove or “hide” the openfeint images, that would be helpful.

All the best!

SergioOctober 17th, 2011 at 8:16 pm

Hello! this project is great and it has been very helpful but i’m having some trouble with some modifications i’m trying to make. I replaced the old director class used in this project with the new version that allows parameters to be passed through the changeScene function, because i want to use that functionality. The problem is that when i replace the class, the HUD stops working properly. Instead of being fixed at the same position on screen it gets stuck to the scene’s background, so when you throw the ghost you stop seeing your lives and score as the scene moves. I’ve tryied to figure out what the problem could be but i haven’t been successful… Any help would be greatly appreciated.

Fresh Beat BandNovember 8th, 2011 at 5:46 am

This is exactly what we were looking for … you have saved us days in developing our new game!!

ShwetaNovember 13th, 2011 at 7:26 pm

Thanks for sharing this Carlos. This is exactly what newbies like me need!!

OrlandoNovember 17th, 2011 at 4:41 pm

Just excellent, thanks to the developers Beebe Games!

QuinnyDecember 18th, 2011 at 8:36 am

Heya Guys Just wondering what the code for the trail behind the projected object is,
would like to use and chance the code slightly.

Leave a comment

Your comment