Flame Game Development: Your Guide to Creating Cross-Platform Games in 2D Using Flame Engine in Flutter 3
معرفی کتاب «Flame Game Development: Your Guide to Creating Cross-Platform Games in 2D Using Flame Engine in Flutter 3» نوشتهٔ Nassim Nicholas Taleb، David Chandler، Nassim N. Taleb و Andrés Cruz Yoris، منتشرشده توسط نشر Apress L. P. در سال 2024. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Reimagine your development process and create, test, and deploy your mobile, web, desktop, and embedded apps from a single codebase. This book shows you how to leverage Flame, the modular Flutter game engine, to build cross-platform 2D games. With Flutter, you can create all kinds of apps by making subtle changes to projects at the code level. Guided by a practical project-based approach, you’ll begin by downloading and installing the game engine. You’ll then move on to creating widgets in Flutter and components within our game, such as player, enemy, background, consumables, etc. The book also shows you how to add sprites, render images, setup animation, and much more. Flame Game Development is perfect for the novice eager to gain hands-on knowledge of this exciting game engine’s library to create a simple 2D game. What You’ll LearnApply Flutter coding skills to game developmentDevelop games that can be played on all platformsCreate your first 2D game using Flame Who This Book Is ForBeginners who want to learn how to develop games on Flame and create their first 2D game with Flutter. Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Create a Project in Flutter and Add Flame Chapter 2: Flame Basics Game Class and Components Components Game Classes: Game and FlameGame Example 1: Draw a Sprite Example 2: Draw a Circle Example 3: Update the Circle Position Key Processes and Methods in Flame Game Loop Render Method Update Method Other Important Functions in Flame Chapter 3: Flame Fundamentals SpriteComponent: Components for Rendering Images Practical Case: Single-Image Sprite Practical Case: Sprite Sheet Practical Case: Animate the Sprite Sheet Function for Animation SpriteAnimationComponent Practical Case: Multiple Animations Input: Keyboard Game Class Level Practical Case Component Level Practical Case Challenge Resolution for the Challenge Input: Tap Game Class level onTapDown onLongTapDown onTapUp onTapCancel Practical Case Component Level Challenge: Practical Case Resolution for the Challenge Challenge: Animations and Inputs (Keyboard) – Walk and Idle Animations Resolution for the Challenge Mirror or Flip the Sprite Practical Case Constant Velocity Key Combination PositionComponent: Components to Render Objects Practical Case Debug Mode Detect Collisions Practical Case Challenge: Change Direction Challenge: Colliding Circles Tips Resolution for the Challenge Counter for Collisions Sprite Collisions Chapter 4: Game 1: Meteor Shower Offset Collision Circles on the Vertical Axis Add Collision Circles by Time Remove Invisible Components (Collision Circles) Prevent the Player from Crossing the Screen Player: Vary Animation When Detecting Screen Edge Gravity for the Player Player: Implement Jump Modularize the Player Class Meteor Animated Sprite Impact Counter Chapter 5: Background Color and Image Background Color Background Image Get Component Information from the Game Class Update the Player Component with Map Dimensions Set the Camera to Follow the Component World CameraComponent Deploy the Camera Component Key Points Update the Meteor Component with Map Dimensions Chapter 6: Tiled Background Creating Our First Map with Tiled Map Editor Use the Tiled Map Create TiledComponent Iterate the Object Layer and Define a PositionComponent Update the Gravity Component Chapter 7: Game 2: Jump Between Tiles Detect When the Player Is Jumping Changes to the Jump and Move Component Lock the Jump Arched Jump and Movement Modifications Movement of the Player in the Tiles Horizontal Movement with the Velocity Vector Create Multiple Hitbox Components for the Player Modify Movement Player Position Add the Meteorite Component New Map Overlay Overlay: Show the Number of Collisions Overlay: Game Over Overlay Functions Game Instance in Components and Communication with Overlays Game Instance in Overlays and Communication with Components Reset Introduction to SpriteAnimationTickers Lives Restart the Level at End of Lives Pause Restart Level Button Types of Collisions Use Case: Correct the Counter of Collisions with Meteorites Important Update the position Property with Delta Time Block Player Movement by Time Invincibility Consumables on the Map Render Consumables on the Map Recover a Life Problem When Restarting the Game Overwrite Consumables at Reboot Invincibility Game Over Chapter 8: Game 2: Many Experiments Vary the Jump Background Image Map Size and Player Movement Alternative 1 Alternative 2 Conclusion Correct Unevenness Between Player Positioning and Tiles Prevent the Player from Falling at a Very High Speed Mathematical Formulas for Collision Detection Implementation Collision Centers Normal Collision Magnitude Scalar Product Implement the Game on Small Screens Chapter 9: Game 3: Move XY Creating the Bases of the Game Creating the Map Create Design Object Layer Import into the Project Base Class Animations Movement Changes in Movement Map and Initial Collidables Collisions Between the Player and Objects Second Implementation Third Implementation Fourth Implementation Fifth Implementation: Double Collision Limit Player Movement to the Map Player Position Hitbox Size Run Chapter 10: Game 3: Enemies Refresh the Sprite Collisions Between Objects and Boundaries for the Map Change the Position Based on a Pattern Set the Object Layer for Enemies Skeleton Class Load Enemies Based on the Map Chapter 11: Game 4: Plants vs. Zombies Map Define the Map Load the Map Plants Sprites Base Classes FlameGame: Add One Plant by Tap Component: Add a Plant by Tap Seed Size Avoid Adding Several Plants in One Place Zombies Base Classes Level Enemies/Zombies Define Logic for Channels Attacks Change Animation of Plants in Attack Mode Projectile: Create Structure Projectile: Shoot Projectile: Starting Position Life and Collisions Health and Damage The Plant Attacks the Zombies Stop the Zombie in Collision with the Plants The Zombie Attacks the Plants Vary Zombie Animation in Attack Mode and When Wounded Prevent Zombies from Colliding with Other Channels Block the Tile/Seed Occupied by a Zombie and Release the Seeded Channel Chapter 12: Game 4: Many Experiments Plant Overlay Mark the Selected Option Suns Moving Suns in a Wavy Way Sun Counter Suns Overlay Cost per Plant Plant Overlay Transparency Generate Suns on Map Space Plant Recharge Base Configuration Reuse the Animation Widget Show Animation When Adding the Plant on the Map Avoid Adding a Plant When an Animation Is in Progress Lock Plants Individually Customize Blocking Time of Plants Relocate Widgets from the Edge of the Plants in the Overlay Pause Reset Move the Camera Using the Drag Event Implementation Scale Components to Window Size Chapter 13: Game 5: Parallax Backgrounds Configure the Project Create the Parallax Effect Vary Speed in Layers Create a Component Class for the Parallax Player Rotation Foods (Sweets) Help Functions and Base Structure Food Component (Sweet) Spawn the Candy in Random Positions Remove Sweets When They Are No Longer Visible on the Screen Avoid Generating Sweets at the Ends of the Screen Eat Food Play the Chewing Animation Do Not Eat Food While Chewing Eating Food in One Position Show Statistics in an Overlay Implement Ways of Gameplay 1: Losing a Candy 2: Get a Minimum of Points 3: Only Consume One Type of Sweet 4: Cannot Consume a Type of Sweet Test Previous Implementations Define Multiple Levels Function to Load Game Levels Overlays Game Over Game Actions Select a Level Select a Gameplay Information About the Type of Game and Level Additional Details About the Type of Game GameOver: Implement Game Types Next Level Virtual Joystick Button to Rotate the Player Gamepad First Steps with the gamepads Plugin Define a Listener to Detect Keys Pressed SharedPreferences: Set Game State Adapt to Small Screens Chapter 14: Audio Dino Jump Project Background Music Audios for Actions Audio Loop Implementation 1 Implementation 2 Plants vs. Zombies Zombies: Base Sound Customize Sound for Each Zombie Component Detect Game Over Play a Single Sound for All Zombies Parallax Basic Sounds Implementation Index
دانلود کتاب Flame Game Development: Your Guide to Creating Cross-Platform Games in 2D Using Flame Engine in Flutter 3