Godot Engine Game Development Projects

Book description

A project based guides to learn animation, advanced shaders, environments, particle rendering, and networked games with Godot 3.0

Key Features

  • Learn the art of developing cross-platform games
  • Leverage Godot’s node and scene system to design robust, reusable game objects
  • Integrate Blender easily and efficiently with Godot to create powerful 3D games

Book Description

Godot Engine Game Development Projects is an introduction to the Godot game engine and its new 3.0 version. Godot 3.0 brings a large number of new features and capabilities that make it a strong alternative to expensive commercial game engines. For beginners, Godot offers a friendly way to learn game development techniques, while for experienced developers it is a powerful, customizable tool that can bring your visions to life.

This book consists of five projects that will help developers achieve a sound understanding of the engine when it comes to building games.

Game development is complex and involves a wide spectrum of knowledge and skills. This book can help you build on your foundation level skills by showing you how to create a number of small-scale game projects. Along the way, you will learn how Godot works and discover important game development techniques that you can apply to your projects.

Using a straightforward, step-by-step approach and practical examples, the book will take you from the absolute basics through to sophisticated game physics, animations, and other techniques. Upon completing the final project, you will have a strong foundation for future success with Godot 3.0.

What you will learn

  • Get started with the Godot game engine and editor
  • Organize a game project
  • Import graphical and audio assets
  • Use Godot’s node and scene system to design robust, reusable game objects
  • Write code in GDScript to capture input and build complex behaviors
  • Implement user interfaces to display information
  • Create visual effects to spice up your game
  • Learn techniques that you can apply to your own game projects

Who this book is for

Godot Engine Game Development Projects is for both new users and experienced developers, who want to learn to make games using a modern game engine. Some prior programming experience in C and C++ is recommended.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Godot Engine Game Development Projects
  3. Dedication
  4. www.packtpub.com
    1. Why subscribe?
    2. PacktPub.com
  5. Foreword
  6. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  7. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  8. Introduction
    1. General advice
    2. What is a game engine?
    3. What is Godot?
    4. Downloading Godot
      1. Alternate installation methods
    5. Overview of the Godot UI
      1. Project Manager
        1. Choosing filenames
      2. Editor window
    6. About nodes and scenes
      1. Scripting in Godot
        1. About GDScript
    7. Summary
  9. Coin Dash
    1. Project setup
    2. Vectors and 2D coordinate systems
      1. Vectors
        1. Pixel rendering
    3. Part 1 – Player scene
      1. Creating the scene
      2. Sprite animation
      3. Collision shape
      4. Scripting the Player
        1. Moving the Player
          1. About delta
        2. Choosing animations
        3. Starting and Ending the Player's Movement
        4. Preparing for collisions
    4. Part 2 – Coin scene
      1. Node setup
        1. Using groups
      2. Script
    5. Part 3 – Main scene
      1. Node setup
      2. Main script
        1. Initializing
        2. Starting a new game
        3. Checking for remaining coins
    6. Part 4 – User Interface
      1. Node setup
        1. Anchors and margins
        2. Message label
        3. Score and time display
          1. Containers
        4. Updating UI via GDScript
        5. Using buttons
        6. Game over
        7. Adding the HUD to Main
    7. Part 5 – Finishing up
      1. Visual effects
        1. What is a tween?
      2. Sound
      3. Powerups
      4. Coin animation
      5. Obstacles
    8. Summary
  10. Escape the Maze
    1. Project setup
      1. Project organization
    2. Inheritance
      1. Character scene
        1. Animations
        2. Collision detection
        3. Character script
      2. Player scene
        1. Player script
      3. Enemy scene
        1. Optional – turn-based movement
    3. Creating the level
      1. Items
      2. TileSets
        1. Creating a TileSet
      3. TileMaps
      4. Level script
      5. Adding more levels
    4. Game flow
      1. Start and end screens
      2. Globals
        1. Global script
      3. Score
      4. Saving the High Score
        1. Reading and writing files
    5. Finishing touches
      1. Death animation
      2. Sound effects
    6. Summary
  11. Space Rocks
    1. Project setup
    2. Rigid body physics
    3. Player ship
      1. Body setup and physics
        1. State machines
        2. Controls
        3. Screen wrap
      2. Shooting
        1. Bullet scene
        2. Firing bullets
    4. Rocks
      1. Scene setup
      2. Variable size
      3. Instancing
      4. Exploding rocks
        1. Explosion scene
        2. Adding to Rock
        3. Spawning smaller rocks
    5. UI
      1. Layout
      2. UI functions
      3. Main scene code
      4. Player code
    6. Game over
      1. Detecting collisions between physics bodies
    7. Pausing the game
    8. Enemies
      1. Following a path
      2. Enemy scene
      3. Moving the Enemy
      4. Spawning enemies
      5. Enemy shooting and collisions
    9. Additional features
      1. Sound/music
      2. Particles
        1. Enemy trail
      3. Player shield
    10. Summary
  12. Jungle Jump (Platformer)
    1. Project setup
    2. Introducing kinematic bodies
      1. Collision response
        1. move_and_collide
        2. move_and_slide
    3. Player scene
      1. Collision Layer/Mask
      2. Sprite
      3. Collision shape
        1. Shapes
      4. Animations
      5. Finishing up the scene tree
      6. Player states
      7. Player script
      8. Player movement
      9. Testing the moves
      10. Player health
    4. Collectible items
      1. Collectible scene
      2. Collectible script
    5. Designing the level
      1. TileSet configuration
      2. Base-level setup
      3. Designing the first level
      4. Scrolling background
      5. Dangerous objects
        1. About slide collisions
    6. Enemies
      1. Scene setup
      2. Script
      3. Damaging the enemy
    7. HUD
      1. Scene setup
      2. Script
      3. Attaching the HUD
    8. Title screen
      1. Scene setup
    9. Main scene
      1. Level transitions
        1. Door scene
    10. Finishing touches
      1. Sound effects
      2. Infinite falling
      3. Double jump
      4. Dust particles
      5. Crouching state
      6. Climbing ladders
        1. Player code
        2. Level code
      7. Moving platforms
    11. Summary
  13. 3D Minigolf
    1. Introduction to 3D
      1. Orienting in 3D space
      2. Godot's 3D editor
      3. Adding 3D objects
        1. Global versus Local Space
      4. Transforms
        1. Transforms in code
      5. Meshes
        1. Importing meshes
        2. Primitives
        3. Multiple meshes
      6. Cameras
      7. Project setup
    2. Creating the course
      1. GridMaps
        1. Making a MeshLibrary
      2. Drawing the course
      3. WorldEnvironment
      4. Finishing the scene
    3. Ball
      1. Testing the ball
      2. Improving collisions
    4. UI
      1. Aiming arrow
      2. UI display
    5. Scripts
      1. UI
      2. Main
      3. Ball
      4. Hole
      5. Testing it out
      6. Improving aiming – option 1
      7. Improving aiming – option 2
    6. Camera improvements
      1. Multiple cameras
      2. Orbiting camera
        1. Creating a gimbal
      3. Tracking camera
    7. Visual effects
      1. SpatialMaterials
      2. Environment options
      3. Lighting
    8. Summary
  14. Additional Topics
    1. Using Godot's documentation
      1. Reading the API documentation
    2. Exporting projects
      1. Getting the export templates
      2. Export presets
      3. Exporting
      4. Example – Coin Dash for Android
        1. Modifying the game
        2. Preparing your system
        3. Exporting
    3. Shaders
      1. Creating a shader
      2. Learning more
    4. Using other languages
      1. C#
      2. VisualScript
    5. Native code – GDNative
      1. Language bindings
    6. Asset library
    7. Contributing to Godot
      1. Contributing to the engine
      2. Writing documentation
      3. Donations
    8. Getting help – community resources
      1. GitHub
      2. Godot Q and A
      3. Discord / Forum
    9. Summary
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Godot Engine Game Development Projects
  • Author(s): Chris Bradfield
  • Release date: June 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788831505