Lua Game Development Practice Guide
Basic Information
Original Title: Game Development with Lua
Author: (US) Paul schuytema mark manyen
Translator: Tian Jian
Series name: Chapter Hua programmer Library
Press: Machinery Industry Press
ISBN: 9787111403357
Mounting time:
Published on: February 1, January 2013
Start: 16
Page number: 1
Version: 1-1
Category: Computer
For more information, Lua game development practices
Introduction
Books
Computer books
Lua Game Development Practice Guide is the result of more than 10 years of experience and wisdom by senior Lua game development engineers. The founder of Lua personally recommends, it is one of the most practical and representative works in the Lua game development field. It not only describes in detail the various technical details, methods, skills, and best practices of using Lua in game development, it also explains how to use Lua as the main tool to convert game design into code implementation. In addition, it focuses on the core elements of the Lua language. The most important thing is that this book contains a large number of well-designed cases and provides complete source code, which is highly operable.
The book consists of 15 chapters: 1st ~ Chapter 3 briefly introduces the features and authorization of Lua language and its powerful use in game development. Chapter 3 ~ Chapter 5 describes the basic syntax and core elements of Lua ~ Chapter 7 describes the integration of Lua and C/C ++ programs and the technical details related to interaction with C ++. Chapter 7 ~ Chapter 9 describes the preparations required before development and how to design the Lua version. Chapter 10th describes how to use Lua to process game data; chapter 2 describes the LUA-driven GUI; Chapter 11th describes two complete game development cases; Chapter 12th describes how to use Lua to define and control ai with examples; chapter 2 demonstrates Lua's powerful functions in graphic rendering and image processing; chapter 2 discusses Lua, multimedia, Lua script debugging, Lua Application resource management, and Lua code release.
Directory
Lua Game Development Practice Guide
Translator's preface
Collation
Preface
Thank you
Chapter 2 game development
1.1 increasingly complex development process
1.2 better development methods
1.3 why use Lua
1.4 Summary of this Chapter
Chapter 4 scripting language
2.1 script language Introduction
2.2lua Introduction
2.2.1lua history
2.2.2lua authorization
2.3 Summary of this Chapter
Chapter 2 Lua language for Game Development
3.1 scripting language and games
3.2 Lua in game projects
3.2.1 game interface
3.2.2 manage game data
3.2.3 event handling
3.2.4 saving and reading game status
3.2.5 artificial intelligence
3.2.6 Rapid Prototyping
3.3 summary of this Chapter
Chapter 2 Lua
4.1 Use The Lua Console
4.2lua Basics
4.3 Variables
4.3.1nil
4.3.2boolean
4.3.3string
4.3.4number
4.3.5table
4.3.6 local and global variables
4.4 Operator
4.4.1 Arithmetic Operators
4.4.2 Relational operators
4.4.3 logical operators
4.5 Control Structure
4.5.1if
4.5.2while and repeat
4.5.3for
4.5.4break
4.6 Summary of this Chapter
Chapter 2 deep learning Lua
5.1 Functions
5.1.1 single parameter
5.1.2 multiple parameters
5.1.3 Return Value
5.2 Standard Library
5.2.1assert (myvalue )()
5.2.2dofile (filename)
5.2.3math.floor ()
5.2.4math.random ()
5.2.5math.min ()
5.3 Character Processing
5.3.1 type conversion
5.3.2string.char (N1, N2 ,.)
5.3.3string.len (mystring)
5.3.4string.sub (mystring,
Start, end)
5.3.5string.format ()
5.3.6string.find (sourcestring, findstring)
5.3.7 characters and formats
5.4table Data Structure
5.4.1table.getn (mytable)
5.4.2table.insert (mytable, position, value)
5.4.3table.remove (mytable, position)
5.4.4table reference
5.4.5 multidimensional table
5.4.6pairs ()
5.5i/o Basics
5.6 summary of this Chapter
Chapter 2 integration of Lua and C/C ++
6.1 initial design highlights
6.1.1lua Environment
6.1.2luaglue Function
6.2 basic implementation method
6.2.1 create a Lua Runtime Environment
6.2.2 Add the luaglue Function
6.2.3 command processing
6.2.4 exit the program
6.2.5clua object and lualib
6.2.6 example of using clua
6.2.7advantages of luaglue Functions
6.2.8luaglue function: parameters and return values
6.3 Summary of this Chapter
Chapter 2 interaction between Lua and C ++
7.1 review luaglue Functions
7.2c ++ code interaction with Lua
7.3 event-driven programming
7.3.1 sample event
7.3.2 event parameters
7.4 handle errors
7.5 summary of this Chapter
Chapter 2 Development Preparation
8.1visual.c ++. 6.0 Workspace
8.2directx Basics
8.3luagui Introduction
8.3.1 start the GUI
8.3.2 Interface
8.3.3 interface controls
8.3.4 event
8.3.5 luaglue functions related to the GUI system
8.3.6shell program Extension
8.4 debugging window
8.5windows Registry
8.6 summary of this Chapter
Chapter 2 design the implementation of Lua
9.1 game design principles
9.1.1 what is a game
9.1.2 understand players' ideas
9.2 basic database settings
9.3 design document
9.4lua programming Specification
9.5 summary of this Chapter
Chapter 4 Use Lua to process game data
10.1 simple game data
10.1.1 example of a spacecraft
10.1.2 "Take. Away" Player ship
10.1.3 enemy ship Data
10.1.4 supply box data
10.2 large data sets
10.2.1 form data
10.2.2lua format data file
10.3 use Lua to save game data
10.3.1 Case 1-frontrunner
10.3.2 case 2 -- fitness tycoon
10.4 summary of this Chapter
Chapter 2 LUA-driven Gui
11.1gui System Overview
11.2gui C ++ class
11.2.1gui control: Sprite
11.2.2gui control: textfield
11.2.3gui control: button
11.2.4 Interface
11.2.5gui Manager
11.3gui.luaglue Function
11.4 further description
11.5lua game interface
11.5.1 Interface Design Principles
11.5.2 quick Creation Interface
11.5.3 loading Interface
11.5.4 main menu interface
11.5.5controls Interface
11.5.6ingame Interface
11.6 summary of this Chapter
Chapter 2 Lua game programming
12.1 main game loop
12.2.
12.2.1 game Initialization
12.2.2 game round handling
12.2.3 simulation game round
12.3 how the take. away game works
12.3.1ingame
12.3.2 use Timer
12.3.3 player operations
12.3.4 bullet Movement
12.3.5 spacecraft Movement
12.3.6 draw active objects
12.4 summary of this Chapter
Chapter 4 Use Lua to define and control AI
13.1 smart embodiment
13.221 Point game
13.3.
13.4 Implementation of the take. away game
13.4.1 ship theft
13.4.2 attack ship
13.4.3 impact ship
13.4.4 hybrid ship
13.4.5 control flight direction
13.4.6 Collision Detection
13.5 examples of other AI
13.5.1 static tracing
13.5.2 close tracking
13.5.3 Dynamic Tracing
13.5.4 pre-Prediction Tracking
13.5.5 turret attack
13.5.6 attack avoidance
13.5.7 defensive shooting
13.5.8 attack damage
13.6 Finite State Machine
13.7 search for paths
13.7.1 algorithm Overview
13.7.2 path search example
13.7.3lua implementation
13.8 summary of this Chapter
Chapter 2 Lua and Images
14.1 run the drawing example
14.1.1 fingerprint example
14.1.2 explosion example
14.2 linear movement
14.2.1getcollisions Function
14.2.2hittest Function
14.2.3 further description
14.3 Collision Detection
14.3.1luaglue function settexture
14.3.2 tank example
14.42d Particle System
14.5 summary of this Chapter
Chapter 2 final description
15.1 Add sound effects and music
15.1.1luaglue function playsound
15.1.2 music
15.2 use the editor
15.3 debug Lua scripts
15.3.1 General principles
15.3.2 call the dofile Function
15.3.3lua. error message
15.3.4 use the real-time debugging window
15.3.5 use text box
15.3.6 use file output
15.4 Resource Management
15.4.1 resource organization
15.4.2 runtime folder
15.5 release Lua code
15.6 license
15.7 further description
15.8 summary of this Chapter
Source of this book: China Interactive publishing network