Constructing Games

Third-party Tutorial: Game with Physics


Learning Objectives

  • You can follow a third-party tutorial on building a game with Flame and Forge2D.
  • You know of one way to get started with an “Angry Birds”-like game with Flutter.

At this point of the course, you should be sufficiently familiar with Dart, Flutter, Flame, and Forge2D, so that you can follow a third-party tutorial that focuses on building a game with Flame that uses Forge2D for physics. In the following exercise, this is what you will do.

Note, the following exercise links to a page that’s no longer available. You can find the tutorial through the Wayback Machine at https://web.archive.org/web/20260108140911/https://codelabs.developers.google.com/codelabs/flutter-flame-forge2d.

Following a "Game with Physics" tutorial

0 / 120 points

Open up the address https://codelabs.developers.google.com/codelabs/flutter-flame-forge2d that contains a tutorial for building the starting point for an angry birds -like game with physics.

Follow the tutorial, building the application piece by piece. Once finished, return the application here as a zip, where the contents of the zip contain the contents of the lib folder of the project that you created following the tutorial. The contents of the zip should be as follows (do not, e.g., add the assets to the zip).

Terminal window
components/
background.dart
body_component_with_user_data.dart
brick.dart
enemy.dart
game.dart
ground.dart
player.dart
main.dart

As your task here is to follow the tutorial, keep to the original file structure in the tutorial. You may, if you choose, use libraries used in the course to adjust the behavior of parts of the application.

There are no automated tests for this exercise beyond checking the file structure. Do not submit the solution before finishing the full tutorial, i.e. finishing all the steps to the end of the seventh part “React to impact”.

To emphasize, do not submit the solution before working through the full tutorial locally.