舉報

會員
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
推薦閱讀
- Java Web開發學習手冊
- 零基礎學Visual C++第3版
- Spring Boot開發與測試實戰
- The Android Game Developer's Handbook
- 編程卓越之道(卷3):軟件工程化
- PyTorch自然語言處理入門與實戰
- Linux操作系統基礎案例教程
- Gradle for Android
- HTML5從入門到精通(第4版)
- INSTANT Yii 1.1 Application Development Starter
- 區塊鏈技術進階與實戰(第2版)
- 軟件工程基礎與實訓教程
- Python 3 Object:oriented Programming(Second Edition)
- PHP程序設計高級教程
- Learning Puppet
- 術以載道:軟件過程改進實踐指南
- PhoneGap Essentials
- Cocos2d-x Cookbook
- C語言學習指南:從規范編程到專業級開發
- 輪式自主移動機器人編程實戰
- Mastering Embedded Linux Programming(Second Edition)
- C語言程序設計實訓指導與習題
- Arduino: Building exciting LED based projects and espionage devices
- Learning Phalcon PHP
- Mastering Selenium WebDriver 3.0
- 全棧軟件測試實戰(基礎+方法+應用)(慕課版)
- The Applied SQL Data Analytics Workshop
- Kafka入門與實踐
- Intelligent IoT Projects in 7 Days
- Storm實時數據處理