Programming for Game Design: A Hands-On Guide with Godot
✍ Scribed by Wallace Wang; Tonnetta Walcott
- Publisher
- Apress
- Year
- 2024
- Tongue
- English
- Leaves
- 507
- Category
- Library
No coin nor oath required. For personal study only.
✦ Table of Contents
Table of Contents
About the Authors
About the Technical Reviewer
Chapter 1: Why Learn Programming with the Godot Game Engine?
Chapter 2: Getting to Know Godot
Creating and Opening a Godot Project
Creating a Scene and Nodes
Viewing and Modifying a Scene
Rotating and Scaling a Node
Summary
Chapter 3: Writing Scripts
Creating a Script
Writing a Script
Viewing the GDScript Documentation
Summary
Chapter 4: Storing Data in Variables
Creating a Variable
Storing and Retrieving Values in a Variable
Understanding Data Types
Understanding Variable Scope
Constants and Enumerations
Comments
Exercise: Seeing Variables Change
Summary
Chapter 5: Mathematical Operations
Mathematical Operators
Creating Constants
Understanding Precedence
Using Math Functions
Creating Random Numbers
Manipulating Strings
Exercise: Randomizing an X and Y Position
Summary
Chapter 6: Branching Statements
Working with Comparison Operators
Working with Logical Operators
The if Statement
The if-else Statement
The if-elif Statement
The match Statement
Exercise: Reacting to Different Boolean Values
Summary
Chapter 7: Looping Statements
Using a For Loop
Using a For Loop to Count with Different Values
Using the For Loop with Strings and Arrays
The While Loop
Comparing For and While Loops
Exercise: Repeating Code with Loops
Summary
Chapter 8: Understanding Arrays
Using Arrays
Creating and Adding Items to an Array
Getting Information About Arrays
Retrieving Data from Arrays
Manipulating Arrays
Searching for Data in an Array
Deleting Data from an Array
Exercise: Using Arrays
Summary
Chapter 9: Understanding Dictionaries
Creating Dictionaries
Retrieving Data from a Dictionary
Getting Information About Dictionaries
Changing and Deleting Data in Dictionaries
Exercise: Using Dictionaries
Summary
Chapter 10: Functions
Understanding Functions
Creating Functions
Using Parameters with Functions
Optional Parameters
Returning Values with Functions
Exercise: Using Functions
Summary
Chapter 11: Object-Oriented Programming
Creating a Class
Initializing Properties
Inheriting Classes
Polymorphism
Exercise: Understanding How Object-Oriented Programming Works in Godot
Summary
Chapter 12: Getting Input from the User
Detecting Keyboard and Mouse Input
Defining an Input Map
Detecting Modifier Keys in an Input Map
Summary
Chapter 13: Shooting Projectiles
Creating a Projectile Scene
Changing the Name of a Node
Adding a Projectile Image
Adding a Collision Shape
Making the Projectile Move
Summary
Chapter 14: Adding Projectiles to a Player
Creating a Player Scene
Changing the Name of a Node
Adding a Player Image and Collision Shape
Using the Marker2D Node to Define the Projectile Location
Defining Ways to Control the Player
Writing GDScript Code to Control the Player
Firing a Projectile
Removing Projectiles
Summary
Chapter 15: Hitting Enemies with Projectiles
Creating an Enemy Scene
Changing the Name of a Node
Adding an Enemy Image and Collision Shape
Creating a Main Scene
Detecting Collisions
Summary
Chapter 16: Displaying a User Interface
Inputting and Displaying Text
Using Signals
Working with TextEdit and Buttons
Using Option Buttons and Item Lists
Working with CheckButtons
Working with Sliders
Summary
Chapter 17: Adding Physics
Playing with Gravity
Adding Damping
Working with Static and Rigid Bodies
Working with Polygons
Using Layers and Masks
Restricting Movement
Summary
Chapter 18: Playing Audio
Audio Formats in Godot
Starting and Stopping Audio
Pausing Audio
Looping Audio
Playing Audio When Detecting a Collision
Summary
Chapter 19: Creating and Using Scenes
Automatically Adding Objects in Scenes
Modifying Instances of a Scene
Automatically Moving and Rotating a Scene
Following the Player with a Camera
Summary
Chapter 20: Using Signals
Calling Down to a Function
Signaling Up
Summary
Chapter 21: Creating a Simple Tic-Tac-Toe Game
Detecting Clicks on the Board
Displaying Player Moves
Summary
Index
📜 SIMILAR VOLUMES
xxviii, 317 pages : 23 cm
Hands-on guide to audio programming in game development with the FMOD audio library and toolkit.</div>
This hands-on guide provides a complete introduction to object-oriented programming in the C++ language and explores its power and purpose from beginner-level to advanced features. Two case studies are presented and examined, allowing the reader to see C++ in action