Skip to content

leonidv/bevy-minesweeper-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The famous Bevy Minesweeper Tutorial adopted to Bevy 12.1 (04.11.2023). The tutorial (series of articles) is good introduction to Bevy, but old Bevy 0.6 version. If you try learn Bevy 12.x using tutorial, you face a challenge of incompatible changes API.

Disclaimer

For me, the main difficulty in adopting tutorial was the simultaneous study of ECS, Bevy and API changes. Due to it I have little difference between original tutorial and my solution not only in API. I didn't implement adaptive size of tiles and full support of bevy-inspector-egui implemented later (Chapter 6 and 7) than in the tutorial.

Also I suppose that some techniques from the tutorial is outdated (for ex., layout of tiles). This repository close to original tutorial.

And I'm not sure, that my code run without debug feature 🤗

Chapters and commits

Article Commit Full source
02 Project setup f95f83b source
03 Tile Map Generation 45e742b source
04 The Board ab2518b source
05 Tiles and Components ef61ba9 source
06 Input Management
07 Uncovering tiles
4e98b51 source
08 Safe Start 35bc7a7 source
09 Generic States 6229aca source
10 Assets 6ecf9e6 source
11 Marking Tiles ddadba3 source

Chapter 9. Generic states

Very different from the tutorial, because Bevy made many changes to the concept of systems.

My code implements scenarios:

  • Generates new board if player press G key.
  • Pause game if player press P key. (Game board is hidden and click is ignored).

All the same, the code shows how to:

  1. Decouples application states and plugin states.
  2. Runs systems (process events) only in certain states.
  3. Switches from one state to another state.

About

Version of tutorial updated to bevy 0.12

Resources

Stars

Watchers

Forks

Languages