© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
A. Cruz YorisFlame Game Developmenthttps://doi.org/10.1007/979-8-8688-0063-4_4

4. Game 1: Meteor Shower

Andrés Cruz Yoris1  
(1)
Caracas, Venezuela
 

Let’s start by creating a new project called dinometeor02 by the process shown in Chapter 1.

With everything we have learned, we can implement a very simple game, in which we will have our sprite and several randomly generated figures will fall on our dinosaur.

Let’s start by defining the player, which will be a copy of the file
lib/components/player_sprite_sheet_component.dart
generated in the project of the previous chapter:
lib/components/player_component.dart
import 'package:flame/collisions.dart';

Get Flame Game Development: Your Guide to Creating Cross-Platform Games in 2D Using Flame Engine in Flutter 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.