docs: Platform tutorial (#2105)

This adds a platformer tutorial called Ember Quest. I hope I have done a service, because I am tired, lol. I am sure there will be comments. I just want to say, I did my best. I approached this as someone new to Flame, just like I was about 10 months ago. Are there concepts that can be improved, sure. We can always optimize code, but I didn't want any concepts to be super abstract. I had never coded a game before when I began my journey with Flame this year, so things might be a bit simple for experienced game developers, but for myself, I had never even thought about a game loop or animations, etc.
This commit is contained in:
Munsterlander
2022-10-29 11:59:51 -07:00
committed by GitHub
parent 03751a2f54
commit 6938c860a0
40 changed files with 3084 additions and 1 deletions

View File

@ -0,0 +1,19 @@
import 'package:flame/game.dart';
import 'package:flutter/material.dart';
import 'ember_quest.dart';
import 'overlays/game_over.dart';
import 'overlays/main_menu.dart';
void main() {
runApp(
GameWidget<EmberQuestGame>.controlled(
gameFactory: EmberQuestGame.new,
overlayBuilderMap: {
'MainMenu': (_, game) => MainMenu(game: game),
'GameOver': (_, game) => GameOver(game: game),
},
initialActiveOverlays: const ['MainMenu'],
),
);
}