Book Image

Building Games with Flutter

By : Paul Teale
Book Image

Building Games with Flutter

By: Paul Teale

Overview of this book

With its powerful tools and quick implementation capabilities, Flutter provides a new way to build scalable cross-platform apps. In this book, you'll learn how to build on your knowledge and use Flutter as the foundation for creating games. This game development book takes a hands-on approach to building a complete game from scratch. You'll see how to get started with the Flame library and build a simple animated example to test Flame. You'll then discover how to organize and load images and audio in your Flutter game. As you advance, you'll gain insights into the game loop and set it up for fast and efficient processing. The book also guides you in using Tiled to create maps, add sprites to the maps that the player can interact with, and see how to use tilemap collision to create paths for a player to walk on. Finally, you'll learn how to make enemies more intelligent with artificial intelligence (AI). By the end of the book, you'll have gained the confidence to build fun multiplatform games with Flutter.
Table of Contents (17 chapters)
1
Part 1: Game Basics
5
Part 2: Graphics and Sound
11
Part 3: Advanced Games Programming

What this book covers

Chapter 1, Getting Started with Flutter Games, explains why to use Flutter/Dart for game programming. You'll see why Flutter and Dart allow the rapid development of cross-platform games and cover the key concepts involved in game programming.

Chapter 2, Working with the Flame Engine, provides an overview of the Flame engine used throughout the book to build games.

Chapter 3, Building a Game Design, introduces the game we will be building, along with the game's design. The game we will build throughout the book is Gold Rush, and we'll see how to plan the content and screens for the game to build a game plan.

Chapter 4, Drawing and Animating Graphics, gives you a detailed look at how to draw and animate graphics on the screen. You will see what sprites are and how we move them around the screen, learn how to animate sprites for realism, and see how to detect when sprites bump into other sprites on the screen.

Chapter 5, Moving the Graphics with Input, provides a detailed look at how to move graphics with touch events and onscreen buttons. By drawing an onscreen joystick, we show how to move a sprite around the screen in response to the user's control of the joystick and see how to use touchscreens to move sprites.

Chapter 6, Playing Sound Effects and Music, gives you a detailed look at playing music and sounds in response to game events.

Chapter 7, Designing Your Own Levels, explains how to create game levels and navigate around them.

Chapter 8, Scaling the Game for Web and Desktop, details how to get the same game working across different platforms by scaling up the graphics for different screen resolutions and how navigation could differ between a computer and a phone due to the lack of physical keys on a phone.

Chapter 9, Implementing Advanced Graphics Effects, explains how to enhance your game graphics with powerful particle and layer effects.

Chapter 10, Making Intelligent Enemies with AI, covers adding intelligence to games with AI. You will see how using AI allows us to make enemies appear more intelligent by chasing our player when they are close, and how we can make our player avoid obstacles while navigating the map.

Chapter 11, Finishing the Game, shows you how to add extra screens to your game and navigate between them. It also explains what else you could learn and where to go for help.