The Unofficial Corona Textbook

Hi DVD Guy!

I’m glad that you liked the GameSalad Textbook.

As for the trial version, yeah, that’s what I’m using. I’ll have to decide how serious I am about this project. Also, I’m still uncertain if I’ll be doing Android publishing. It would seem that I’d have to, in order to make the book great. That annoys me, as I’m so not happy with Google! I left Android development to make iOS apps.

Heh, I don’t like Facebook either, but it seems Corona could ultimately lead to development that involves Facebook and Google.

Basically, I’m planning to recreate my apps with Corona. Today I tried recreating my UIWebView apps and that didn’t turn out like I expected. Without the unused libraries, it’s not so bad. Although, the simulator issue is annoying. Maybe the trial version is why I was having issues with the iPhone simulator too.

I’m going to try again tomorrow. I’m really impressed with the software overall. There are so many refreshing possibilities. As I was reading through the APIs, my mind was racing with ideas! [import]uid: 13264 topic_id: 4938 reply_id: 24569[/import]

Progress Report: February 23, 2011

I’m getting past the initial shock of Corona. With 500 APIs, it seems like there’s a lot to learn. Yet, not really. By breaking it down into pieces, I think I have a good strategy for mastering Corona. Ironically, it’s GameSalad that makes this so easy. There are common themes between the two SDKs. I just have to figure out how to translate GameSalad behaviors into Lua.

I’ve outlined my thoughts on the matter here…
http://photics.com/learning-about-corona-and-lua

Now that I’ve successfully broken up a difficult goal into little pieces, it’s just a matter of getting each little task completed until the overall project is finished.

I’ve decided that Commove is an ideal first project for Corona.
http://photics.com/commove

That’s one of my most complicated GameSalad projects, which was broken by a recent update. Instead of just fixing Commove, perhaps I can make it better with Corona.

I’m still really annoyed by the WebPopup behavior, but then I saw something interesting on the Corona Roadmap…

http://www.anscamobile.com/resources/roadmap/

  • Improved WebPopup behavior

So basically, Ansca Mobile is working on fixing it. That’s great.

Also, I’m impressed with the story of how Ansca Mobile got started. I listened to part 1 of the FogView Podcast with Carlos. It was a good interview.

The biggest obstacle right now is a little game called “Tiny Wings”. Ha ha! I’ve been thinking about making “Critique 2”, a review app. Tiny Wings is a great game to review, but I think the Corona Textbook is a more important project. [import]uid: 13264 topic_id: 4938 reply_id: 24661[/import]

Nice to see you on this side of the fence, Photics.

I’m sure the Unofficial Corona Textbook would be a great asset to the community, as the GameSalad one was helpful as well.

Not to get further into the matter, it’s just a shame that GS is too busy buried in red tape and its development as slow as molasses just to get any new or necessary features.

That being said, Corona is powerful, versatile, extensive, fast, and tiny. I, too, had a learning curve, and admittedly, it sat for a couple of months after I made my initial purchase before I even started to code. But, only three weeks into development of my first game, I am able to throw in every feature I want in a game, minus Game Center, almost as if I’m doing it out of spite towards my previous GDK.

No middleware is without its quirks, but Corona has the least of the them, and with the ones it has, it’s definitely the most manageable to work around with. [import]uid: 6084 topic_id: 4938 reply_id: 24683[/import]

I think that’s the main advantage with Ansca Mobile. They found a really good venture capitalist. They were nurturing and helped Corona to grow.


Progress Report: February 25, 2011

This is getting crazy. Heh, I keep hitting some of the worst parts of Corona development. Even just to place an image on the screen requires some big thinking…

The Hello World tutorial shows how to display an image…

[lua]local background = display.newImage( “world.jpg” )[/lua]

…but that doesn’t exactly work for me. Here’s why…

While having a headstart in development is useful, it can also be a hindrance. Instead of just going through the various APIs, I’m trying to learn Corona with a specific project in mind. I’m trying to recreate Commove. Why would I want to do that? It’s because Corona has Universal Binary support and Android support. So, I can create one project for multiple platforms.

But to do that, I have to master content scaling and resolution independence. Wow, it’s an advanced topic for someone just starting out. Yet, it’s important, as this determines the overall game design.

So, I’ve been playing with the differences between zoomScale, zoomEven and letterbox. I’ve been switching things around, so that’s neat. I even figured out simple stuff, like creating the GameSalad equivalent of Attributes.

I was pleased to see the os time on the screen… 1298648299. There’s so much I can do with that information. I learned how to display attribute information on the screen. I even messed around with vector polygons.

…and that’s the real problem in this. I can see how much extra work is involved to add retina display support and content scaling. Corona handles the problem the way it should, similar to how Flash does it. Yet, Flash has more advanced Vector graphics support. I’d recreate the artwork in vector, so I wouldn’t have to create multiple copies of the artwork. Unfortunately, I don’t think that’s a possible solution yet.

Getting started is tricky with Corona. I have to keep reminding myself that this is a good thing. It makes the book more valuable. Heh, I this morning I was thinking how much easier this would be if there was a book I could read. But if there was such a book, then I probably wouldn’t be working on this project — such irony.

I did manage to get my title screen in the simulator…

[lua]local title = display.newImageRect( “title-screen.png”, display.contentWidth, display.contentHeight )
title.x = display.contentWidth / 2
title.y = display.contentHeight / 2[/lua]

…but now I have to figure out the best way to reorganize my content. Do I really want to support Android?! If so, that’s going to be tricky with the narrow screen.

This is great material for the book! Even though I feel frustrated, I’m learning a lot! [import]uid: 13264 topic_id: 4938 reply_id: 25124[/import]

I Want that Book! I Own Gs book and its awesome.
When will you have it ready?
Cheers. [import]uid: 14573 topic_id: 4938 reply_id: 25152[/import]

I figure it will take me about a month to write the book. But until I can apply all my GameSalad knowledge into Corona, I’m not very good at making apps. I have to master the software first. I don’t know how long it will take.

Basically, GameSalad behaviors were doing the coding for me. I have to figure out how do it myself.

It’s not an easy task for me. Even to do something as simple as a Rule is tricky. Today I was playing with If / Then / Else, which is pretty basic programming. I did simple stuff, like hiding the status bar if the app was on an iPad, but not an iPhone. I got lost when I tried to add familiar GameSalad conditions…

if “Mouse Button” is “Down” then…

Apparently, that’s a function in Corona… but I’m not sure… there are things like listeners and groups. I got confused. It’s not just a cut & paste job. HA HA! I wasn’t expecting that, but I thought it would be easy.

And once I can recreate my games, I then have to master the new techniques available in Corona.

Here are some other surprises that I found with Corona. If I display the os.time() it only updates once. It doesn’t keep running. I’ll have to figure out why that’s happening.

Global vs. Local also seemed unusual to me. I think I understand it, but not enough to explain it intelligently. I think as I get better at making games, I’ll find the right words.

I’m not looking forward to layers and levels. Ha ha… that looks extremely tedious. I have a basic understanding of the order of things, but recreating Commove… no… making Commove better… is a real challenge. I think I picked a good project.

Also, I think I can recreate the Photics: Toolbox and do an amazing job with Corona. The APIs allow greater access to the hardware than GameSalad. That means more tools!

It’s hard, like lifting heavy weights with my mind. I’m making progress though. I think this project is heading towards a favorable outcome. [import]uid: 13264 topic_id: 4938 reply_id: 25194[/import]

hi photics
loved your gs book although I only learned a small amount from the math chapter cause I had already learned how to use gs. got your sound fx also love them and using them in my current project. I’ll get your corona book also buttttt corona is not gs so maybe a better name would be Migrating from Gamesalad to Corona either way still like your work [import]uid: 7911 topic_id: 4938 reply_id: 25199[/import]

Oh, I know. There are lots of angles for this book…

Professional app development…
• pulling/sending data from websites
• The new UI elements heading to Corona can make your app look like Apple built it.
• Cameras, GPS, photos, that’s not usually for games.
• ebooks
• promotional apps for corporations

Game Development…
• Facebook
• OpenFeint
• Vibration

None of those are GameSalad features. There could be a book just about converting your GameSalad games to Corona, but I think that’s a negative theme. I’m not really into that idea. I think I’m going to take a more general approach, showing how to make professional apps and games. The book should be neutral.

But getting started, I have to work with what I know. [import]uid: 13264 topic_id: 4938 reply_id: 25201[/import]

Hey Photics.

You have to update the time in a function (with a listener) to allow it to update.

:slight_smile:

Good luck with your future endeavors :slight_smile: [import]uid: 6981 topic_id: 4938 reply_id: 25262[/import]

Thanks for the kind words! I’m still figuring things out. I tried this…

[lua]function listener(event)

local time = os.time()

local timeText = display.newText( time, 0, 0, native.systemFont, 40 )
timeText.x = display.contentWidth / 2
timeText.y = display.contentHeight / 3
timeText:setTextColor( 150,200,255 )
timeText.rotation = 5
end[/lua]

That just keeps displaying the time on-top of the time. It’s kinda funny. HA HA!

While I’m trying to figure out one thing, I’m learning about other stuff. So, it’s been a pretty cool adventure so far. [import]uid: 13264 topic_id: 4938 reply_id: 25383[/import]

It looks like someone else is working on a Corona book.

http://developer.anscamobile.com/forum/2011/03/01/corona-sdk-book-being-written

That’s good. I can stop work on mine. Ha ha!
This project was a lot harder than I thought. [import]uid: 13264 topic_id: 4938 reply_id: 25937[/import]

Programming in Lua, Second Edition [Paperback]
by Roberto Ierusalimschy

Any thoughts on this book?

-Jason [import]uid: 38903 topic_id: 4938 reply_id: 29972[/import]