Roblox Lua Scripting Essentials A Step-by-Step Guide
Embark on a transformative journey through the exciting world of Roblox Lua scripting with this comprehensive hands-on guide. Tailored to game developers, both seasoned and new, this book serves as your roadmap to mastering the art and science of Lua scripting within the dynamic Roblox Studio enviro...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Berkeley, CA :
Apress
2023.
|
Edición: | 1st ed. 2023. |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009786707306719 |
Tabla de Contenidos:
- Intro
- Table of Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
- Chapter 1: Introduction
- What Does This Book Require?
- About Lua
- Installing Roblox Studio
- Roblox Studio Templates
- Exploring Roblox Studio's Editor
- Scene View: Camera Movement
- View Selector
- Setting Up the Coding Workspace
- Creating Your First Lua Script
- Saving and Publishing Your Project
- Reopening Your Project
- Summary
- Chapter 2: Working with Parts
- Part Primitives
- The Transform
- Pitch, Yaw, and Roll
- Global vs. Local Coordinate Space
- Translating (Moving) a Part
- Scaling a Part
- Rotating a Part
- Studs: Roblox Unit of Measurement
- Translation Snapping
- Rotation Snapping
- Collisions
- Anchoring Objects
- Commenting Your Code
- Summary
- Chapter 3: Variables, Scope, Arrays, Operators, and Conditionals
- Basic Lua Data Types
- Variables and Literals
- Naming Variables in Lua
- Variable Declaration and Initialization
- Variable Scope
- Tables, Arrays, and Dictionaries
- Creating an Array
- Two-Dimensional Array
- Creating a Dictionary
- Operators (Unary/Binary) and Operands
- Assignment Operator
- Arithmetic Operators
- Compound Assignment Operators
- Relational Operators
- Length Unary Operator
- Concatenation Operator
- String Coercion
- Escape Sequences
- Conditionals
- Logical Operators
- Operator Precedence and Using Parentheses
- Summary
- Chapter 4: Loops
- While Loops
- Infinite Loops
- Repeat…Until Loop
- Numeric For Loop
- Generic For Loops
- Nested Loops
- Breaking Out of a Loop
- Continue Statement of a Loop
- Summary
- Chapter 5: Objects, Data Types, and Properties
- Roblox Parts and Objects
- Object Hierarchy Navigation
- Roblox (Luau) Additional Data Types
- Manipulating Parts: Vector3 Data Type.
- Changing the Position of a Part
- Scaling a Part Using Multiplication
- Moving a Part Using Lerp
- Computing Distance Between Parts
- Manipulating Parts: Cframe Data Type
- Offsetting a Part
- Rotating a Part
- Moving a Part in a Specific Direction
- Part Rotation to Face Another Part - (1)
- Part Rotation to Face Another Part - (2)
- Parenting a Part to Another Part
- Color3 Data Type
- Instance Data Type
- Enum Data Type
- Random Data Type
- Properties of Parts (Objects)
- Summary
- Chapter 6: Functions and Events
- Functions
- Invoking a Function
- Function Parameters
- Function Return Values
- An Arbitrary Number of Parameters
- Anonymous Functions
- Events
- Touched Event
- Changed Event
- ClickDetector.MouseClick Event
- MouseButton1Click Event
- PlayerAdded Event
- ChildAdded and DescendantAdded Events
- Other Miscellaneous Event
- Event-Driven Programming
- Script vs. LocalScript
- BindableEvent
- RemoteEvent
- RemoteFunction
- BindableFunction vs. RemoteFunction
- Summary
- Chapter 7: Roblox Services
- Roblox Services
- Workspace Service
- ReplicatedStorage Service
- Players Service
- UserInputService
- Tween Service
- ProximityPrompt Service
- RunService
- SoundService
- Lighting Service
- ContextActionService
- TeamsService
- TeleportService
- PhysicsService
- Summary
- Chapter 8: Task Library and Module Scripts
- Threading in Roblox Luau
- Task Library and Threading
- The Task.delay(time, function) Method
- The Task.spawn(function) Method
- The Task.wait(seconds) Method
- The Task.defer(function) Method
- The Task.cancel() Method
- Module Scripts
- Summary
- Chapter 9: Understanding Players, Characters, and Humanoids in Roblox
- The Roblox Player
- Player Properties, Methods, and Events
- Connection to Characters
- Common Use Cases
- The Roblox Character.
- Character Components and Design
- Character Properties, Methods, and Events
- Character and Humanoid Relationship
- Common Use Cases
- The Roblox Humanoid
- Humanoid Properties, Methods, and Events
- Integration with the Character and Player
- Common Use Cases
- Hierarchy Structure
- Relationships: Player, Character, and Humanoid
- Summary
- Chapter 10: Raycasting
- Definition and Purpose of Raycasting
- Common Applications in Game Development
- Overview of Raycasting in Roblox
- The Ray Object
- Basic Raycasting
- Calculating Intersection Points
- Raycasting with Filtering
- Creating a Proximity Sensor for NPCs
- Pathfinding in Roblox
- Summary
- Chapter 11: Tables and Object-Oriented Programming
- Tables
- Object-Oriented Programming
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
- Meta-Tables
- __index
- __newindex
- Classes
- Summary
- Afterword
- Index.