About the Author
Jayant Varma is the executive director of OZ Apps, an Australian-based consultancy focused on assisting local and international businesses in mobile product enhancement strategies and specialized services for mobile development and training. He has several apps on the Mac App Store to his credit.
Jayant has an MBA-MIT and is an IT veteran with over 20 years of rich and varied experience in several countries, in sectors including automotive and higher education. Following on with his passion for teaching, he has lectured and developed subject outlines at the James Cook University.
His mobile development journey started in early 2000 with the Microsoft Pocket PC (Compaq iPaq) and has continued to Apples iOS today. His fascination with technology and games goes back to when he started writing games on his first computer, the ZX Spectrum.
Jayant has been an active member of ACS (Australian Computer Society) and is part of the executive board for the local chapter. He is a founding chairman of the first local YIT (Young IT) chapter. He has conducted iOS development workshops for the AUC (Apple University Consortium) and is enthusiastic with mentoring and advising young developers. He also helps other developers via his blogs on topics related to development.
You can follow Jayant on Twitter at @ozapps, on the blogs at http://howto.oz-apps.com and http://reviewme.oz-apps.com , and the Lua blogs http://dev.oz-apps.com and @LearnLua .
About the Technical Reviewers
Mekha Shrestha and Yujan Shrestha are founders of the software development company M.Y. Developers, which develops advanced tools for software and game development.
Yujan Shrestha completed his education in biomedical engineering at the University of Texas in Austin, and Mekha Shrestha studied neuroscience at Baylor University. After working on various projects in college, they decided to work together on some innovative projects for research on autism disorders conducted at the University of Texas Medical School at Houston. Following their research, they worked on making simple strategic games. Their first game project was Space Conquest, which is an adventure/action game with realistic physics that enables the player to experience strategic game play. During its development, they recognized the need for tools that improved the quality of game development for indie and professional developers alike, which lead to the making and designing of various tools for Corona SDKnamely, Corona Profiler and Corona Ultimote. They also developed an acclaimed Lua-based IDE called Lua Glider for various platforms, including Corona SDK, Moai SDK, Gideros SDK, and LVE 2D.
As a team they aim to develop and improve tools that will enhance the experience of software and game development.
Patrick Meehan is the Founder and CEO of Zipline Games, Inc and the architect of Moai SDK.
http://www.linkedin.com/in/patrickmeehan
Atilim etin: Studied at METU Computer Engineering department during 19962001. He worked as a software specialist at Makrosam Software, Tbitak UEKAE and Meteksan System companies. During 20062009 he worked as a specialist software engineer, technical group leader and three dimensional software group leader in various simulation projects at KaTron Defense, Space and Simulation Technologies company in Ko Group. In 2010 he founded Gideros Mobile and is the design architect and technical leader of the Gideros Studio. He is the author of the book entitled Computer Graphics (ISBN: 975 347 104 0) and also one of the authors of Three Dimensional Computer Graphics and Animation titles in the Turkish Informatics Encyclopedia.
Acknowledgments
This is an important section for me, because without the help of these people, this book would not have been possible at all. Andrei Buta, a talented graphic designer from the United Kingdom, introduced me to this opportunity with Apress. Michelle Lowman helped with outlining a couple of concepts around iOS development, and the book idea was born. During the entire process, Brigid Duffy from Apress was an immense support and helped to keep up with the deadlines. From there on, because of the variety of topics and frameworks, writing the book was a challenging task. I received a lot of support from Michael Hartlef from Whitesky Games, Atilim etin from Gideros Mobile, Patrick Meehan from Zipline Games (Moai), Simeon Nasilowski from Two Lives Left (Codea), and Mekha and Yujan Shrestha from M.Y. Developersall of whom helped with the completion of the book and checking the technical details and content.
I would also like to acknowledge two prominent personalities: Steve Jobs of Apple for the iOS platform, and Roberto Ierusalimschy of Tecgraf for the Lua language. I would also like to thank the companies that have made the various frameworks covered in the book; each framework has a wonderful set of features that is constantly being updated.
On a personal note, I would also like to thank my family and friends for all of their support during the writing this bookespecially Monica Sharma and Agnikrit Sharma. It would not have been possible without their understanding and support.
Lastly, Id like to thank you, the readerthe most integral part of this equationfor believing in this book and reading it. I hope it helps you in your journey toward development.
I would like to include everyone that has been part of this book in some way and I hope that I have been able to do that. Thank you all.
Chapter
Introduction to Lua
Apple has been issuing checks to developers, and the 2012 figures indicate that it has so far been to the tune of $5 billion. In the past, it used to be desktops with Microsoft-based products that were raking in money for developers, with Visual Basic, or earlier with database products such as dBase and FoxPro. While the major share of this revenue goes to larger companies such as EA, Chillingo, Gameloft, Rovio and even Disney, a lot of indie developers and smaller companies vie for a share of that big pie. Who knows what idea might just become the money-spinner for a developer. Robert Nay, a 14-year-old, made the game Bubble Ball while he was learning to code, and it went viral, with over 8 million downloads. And no one knows what the next top game will be.
As a person that has an interest in development, you have made the first step in this journey. You could be a student that has never developed before, or you could be a guru developer who can whip up an enterprise app in minutes. The point is that whatever your background, you are for some reason drawn to this strange-sounding language, Lua (pronounced LOO-ah.).
What Is Lua?
Lua is a programming language that has a small footprint, works across several platforms, and is quite flexible and extensible. Further, Lua is a game changer for developers that want to write apps for the mobile devices. It has powered a lot of apps and games in the Apple App Store, and it has been spoken about by the late Steve Jobs. It has even been linked with one of the most advanced self-replicating and mutating viruses, the Flame. Despite all of that, Lua remains to be a language that seems more like plain English than a cryptic programmers language, making it a language with a smaller learning curve.
The History of Lua
While knowing the history of Lua will not change anything in terms of making anyone a better programmer, it important to get an idea of why youd want to use Lua.
Next page