舉報

會員
Lua Quick Start Guide
Luaisasmall,powerfulandextendablescripting/programminglanguagethatcanbeusedforlearningtoprogram,andwritinggamesandapplications,orasanembeddedscriptinglanguage.TherearemanypopularcommercialprojectsthatallowyoutomodifyorextendthemthroughLuascripting,andthisbookwillgetyoureadyforthat.ThisbookistheeasiestwaytolearnLua.ItintroducesyoutothebasicsofLuaandhelpsyoutounderstandtheproblemsitsolves.Youwillworkwiththebasiclanguagefeatures,thelibrariesLuaprovides,andpowerfultopicssuchasobject-orientedprogramming.EveryaspectofprogramminginLua,variables,datatypes,functions,tables,arraysandobjects,iscoveredinsufficientdetailforyoutogetstarted.YouwillalsofindoutaboutLua'smodulesystemandhowtointerfacewiththeoperatingsystem.Afterreadingthisbook,youwillbereadytouseLuaasaprogramminglanguagetowritecodethatcaninterfacewiththeoperatingsystem,automatetasks,makeplayablegames,andmuchmore.ThisbookisasolidstartingpointforthosewhowanttolearnLuainordertomoveontoothertechnologiessuchasLove2DorRoblox.Aquickstartguideisafocused,shortertitlethatprovidesafasterpacedintroductiontoatechnology.Itisdesignedforpeoplewhodon'tneedallthedetailsatthispointintheirlearningcurve.Thispresentationhasbeenstreamlinedtoconcentrateonthethingsyoureallyneedtoknow.
目錄(262章)
倒序
- 封面
- Title Page
- Copyright and Credits
- Lua Quick Start Guide
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Code in Action
- Conventions used
- Get in touch
- Reviews
- Introduction to Lua
- Technical requirements
- What Lua is
- Source code and binaries
- Installing Lua on Windows 10
- Installing Lua on macOS
- Installing Lua on Linux
- Tools for Lua
- Installing VS Code on Windows 10
- Installing VS Code on macOS
- Installing VS Code on Linux
- Exploring VS Code
- Hello World!
- Summary
- Working with Lua
- Technical requirements
- Variables
- Creating variables
- Printing variables
- Assigning variables
- Comments
- Basic types
- nil
- Boolean
- number
- Finding a type
- String types
- String literals
- String length
- Concatenate strings
- String coercion
- Escape characters
- Console input
- Scope
- Scope access
- Global scope
- Shadowing
- Functions
- Defining a function
- Calling a function
- Function arguments
- Any number of arguments
- Returning a value
- Returning multiple values
- Operators
- Arithmetic operators
- Relational operators
- Logical operators
- Misc operators
- Operator precedence
- Control structures
- if
- elseif
- else
- Nesting if statements
- Loops
- while loops
- Infinite loops
- Breaking a loop
- Repeat until loop
- for loop
- Nested loops
- Summary
- Tables and Objects
- Technical requirements
- Introduction to tables
- Creating tables
- Storing values
- Table constructor
- Tables are references
- Arrays
- Array constructor
- Arrays are one-based
- Sparse arrays
- The size of an array
- Multidimensional arrays
- Iterating
- Understanding pairs
- Understanding ipairs
- Closures
- Iterator functions
- Meta tables
- setmetatable
- getmetatable
- __index
- __newindex
- rawget and rawset
- __call
- Operators
- Math operators
- Equivalence operators
- Other operators
- Objects
- Classes
- The : operator
- Tables inside of objects
- Inheritance
- Single inheritance
- Multiple inheritance
- Summary
- Lua Libraries
- Technical requirements
- The global table
- Explicit variables
- Dynamic variables
- Environment
- math
- Trigonometry
- Changing numbers
- Comparing numbers
- Randomness
- Constants
- Everything else
- File IO
- Opening a file
- Writing data
- Reading data
- Reading line by line
- Reading bits of data
- Closing a file
- Interfacing with the operating system
- Working with time
- Interacting with the shell
- Working with files
- More strings
- Searching for a substring
- Extracting a substring
- Case manipulation
- Creating and loading modules
- Creating a module
- Loading and using modules
- Avoiding parsing
- Executing files
- Summary
- Debugging Lua
- Technical requirements
- The debug library
- Introspective information
- The debug.getinfo return value
- Filtering the information
- Local variables
- Hooks
- Line ("l")
- Call ("c")
- Return ("r")
- Setting a counter
- Multiple hooks
- Traceback
- Debugger.lua
- Using debugger.lua
- Error-handling in Lua
- pcall and error
- assert
- Profiling
- The profile module
- Using the profile module
- Integrated development environments
- LuaEdit
- Breakpoints
- Locals and Watch
- Callstack
- Decoda
- Starting debugging
- Everything else
- Zero Brane Studio
- Selecting an interpreter
- Starting the debugger
- Visual Studio Code
- Summary
- Embedding Lua
- Technical requirements
- Working with the C API
- The stack
- Pushing to the stack
- Querying the stack
- Reading from the stack
- Stack size
- Reading Lua variables from C
- Loading a Lua file
- Reading global variables
- Example
- Creating Lua variables from C
- Calling Lua functions from C
- Calling C functions from Lua
- Working with tables in C
- Reading values from a table
- Writing values to a table
- Meta tables
- User data
- Lua C API reference
- Summary
- Lua Bridge
- Technical requirements
- API conventions
- Namespaces
- Variables
- Functions
- Properties
- Classes
- Constructor
- Subclass
- Member variables properties and functions
- Static variables properties and functions
- Calling C functions from Lua
- LuaRef
- LuaRef and tables
- Summary
- Next Steps
- Books
- Programming In Lua
- Learning Game AI Programming with Lua
- L?VE for Lua Game Programming
- Lua Game Development Cookbook
- Game Development with Lua
- Beginning Lua Programming
- Lua Programming Gems
- Learn Lua for iOS Game Development
- Game engines
- L?VE 2D
- Defold
- Corona
- Leadwerks
- Gideros
- Urho 3D
- Polycode
- ShiVa
- Game mods
- Roblox
- Garry's Mod
- World Of Warcraft
- Natural Selection 2
- Don't Starve
- Hack 'n' Slash
- Scriptable software
- CEGUI
- Conky
- Premake
- Moho
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-08-05 10:31:18
推薦閱讀
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- Node.js+Webpack開發實戰
- R語言數據分析從入門到精通
- Delphi程序設計基礎:教程、實驗、習題
- Twilio Best Practices
- Visual Basic程序設計習題解答與上機指導
- jQuery開發基礎教程
- Java程序設計入門
- C語言程序設計
- Raspberry Pi Robotic Projects(Third Edition)
- PHP 7從零基礎到項目實戰
- Java 從入門到項目實踐(超值版)
- PhoneGap 3.x Mobile Application Development Hotshot
- Tkinter GUI Application Development Blueprints
- JSP項目開發情境教程
- C語言開發入門教程
- Learning Puppet for Windows Server
- Building Data Streaming Applications with Apache Kafka
- C++程序設計實驗教程
- Mastering Microservices with Java
- MATLAB應用實例精講:數學數值計算與統計分析篇
- Java寶典
- Getting Started with Twitter Flight
- ODL技術內幕:架構設計與實現原理
- Redis設計與實現
- Python網絡爬蟲從入門到精通
- Neo4j 圖數據庫擴展指南:APOC和ALGO
- Python開發技術大全
- Mastering Scala Machine Learning
- 重構與模式(修訂版)