Learn Lua for iOS game development
So you have a great game idea for iPhone or iPad, but Objective-C just seems a bit daunting. What are your alternatives? The App Store is very picky about languages, but there is hope: Lua is a versatile, lightweight, fast, and easy to learn language that you can use to build your iOS games and get...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
New York :
Apress
2012.
|
Edición: | 1st ed. 2013. |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629432906719 |
Tabla de Contenidos:
- Title Page; Copyright Page; Dedication Page; Contents at a Glance; Table of Contents; About the Author; About the Technical Reviewers; Acknowledgments; Chapter 1 Introduction to Lua; What Is Lua?; The History of Lua; Lua Timeline; Starting with Lua; Setting Up Lua; Online Lua Shell; Windows, Mac OS X, and *nix; iOS; Features of Lua; Variables; Hello World, the Variable Way; Hello World, the Variable Way; Strings; Strings; Numerals; Values and Types; nil; boolean; number; string; function; userdata; thread; table; Code Blocks and Scopes; Lua Operators; Arithmetic Operators
- Relational OperatorsLogical Operators; Other Operators; Summary; Chapter 2 Lua Libraries; Basic Functions; assert (V [, message] ); collectgarbage ( [Opt [,arg]] ); dofile ( [filename] ); error ( message [,level] ); _G; getfenv ( [f] ); getmetatable ( object); ipairs (t); load ( func [,chunkname] ); loadstring ( string [,chunkname] ); next ( table [,index] ); pairs (t); pcall ( f, arg1, ... ); print( ... ); rawequal ( v1, v2 ); rawget ( table, index ); rawest ( table, index, value ); select ( index, ... ); setfenv (f, table); setmetatable ( table, metatable ); tonumber( e [,base] )
- tostring ( e )type (V); unpack ( list [, i [, j] ] ); _VERSION; xpcall ( f, err); System Libraries; Table Functions; table.concat ( aTable [,sep [,i [,j] ] ] ); table.insert ( aTable, [pos,] value); table.maxn ( aTable ); table.remove ( aTable [, pos] ); table.sort ( aTable [, comp] ); OS Functions; os.clock ( ); os.date ( [format [,time] ] ); os.difftime ( t2, t1 ); os.execute ( [command] ); os.exit ( ); os.getenv ( varname ); os.remove ( filename); os.rename ( oldname, newname ); os.setlocale ( locale [,category] ); os.time ( [table] ); os.tmpname ( ); Tables: A Quick Overview
- Tables As ArraysTables As Associative Arrays; Functions: An Advanced Look; Tables As Objects; The Difference Between . and :; Summary; Chapter 3 File Operations; Implicit Functions; io.close ( [file] ); io.flush ( ); io.input ( [file] ); io.lines ( [filename] ); io.open ( filename [,mode] ); io.output ( [file] ); io.read ( ... ); io.tmpfile ( ); io.type ( obj ); io.write ( ... ); Explicit Functions; file:close ( ); file:flush ( ); file:lines ( ); file:read ( [format] ); file:seek ( [whence] [, offset] ); file:setvbuf (mode [, size] ); file:write( ... }; Uses of File I/O in Gaming
- Saving a VariableGrabbing the Data; How the Code Works; Potential Issues; Saving Data to a Variable; How the Code Works; Potential Issues; Writing Data to the File; Saving a Table; Dynamic Variables; Summary; Chapter 4 Math with Lua; Introduction to Math in Lua; math.abs (X); math.acos (X); math.asin (X); math.atan (X); math.atan2 (Y,X); math.ceil (X); math.cos (X); math.cosh (X); math.deg (X); math.exp (X); math.floor (x); math.fmod (X); math.frexp (X); math.huge; math.ldexp (m, e); math.log (X); math.log10 (X); math.max (X, ...); math.min (X, ...); math.modf (X); math.pi; math.pow (x,y)
- math.rad (X)