Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Corona SDK Mobile Game Development- Second Edition
  • Table Of Contents Toc
Corona SDK Mobile Game Development- Second Edition

Corona SDK Mobile Game Development- Second Edition

By : Michelle M Fernandez
3.8 (4)
close
close
Corona SDK Mobile Game Development- Second Edition

Corona SDK Mobile Game Development- Second Edition

3.8 (4)
By: Michelle M Fernandez

Overview of this book

This book is for anyone who wants to have a go at creating commercially successfully games for Android and iOS. You don’t need game development or programming experience.
Table of Contents (14 chapters)
close
close
13
Index

Tables


Tables are the proprietary data structure in Lua. They represent arrays, lists, sets, records, graphs, and so on. A table in Lua is similar to an associative array. Associative arrays can be indexed with values of any type, not just numbers. Tables implement all these structures efficiently. For example, arrays can be implemented by indexing tables with integers. Arrays do not have a fixed size, but grow as needed. When initializing an array, its size is defined indirectly.

Here is an example of how tables can be constructed:

1 a = {}    -- create a table with reference to "a"
2 b = "y"
3 a[b] = 10    -- new entry, with key="y" and value=10
4 a[20] = "Monday"  -- new entry, with key=20 and value="Monday"
5 print(a["y"])    -- 10
6 b = 20
7 print(a[b])     -- "Monday"
8 c = "hello"     -- new value assigned to "hello" property
9 print( c )    -- "hello"

You will notice that in line 5, a["y"] is indexing the value from line 3. In line 7, a[b] uses a new value of variable b and indexes...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Corona SDK Mobile Game Development- Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon