DEV Community

Cover image for Bevy Minesweeper: The Board

Bevy Minesweeper: The Board

Qongzi on February 21, 2022

Check the repository We have our tile map but still nothing on screen, let's create some tiles ! Board options To comply with our ob...
Collapse
 
changhe3 profile image
Chang He

Update for bevy 0.8
You need Visibility and ComputedVisbility components for things to be rendered, so you would need:

commands
            .spawn()
            .insert(Name::new("Board"))
            .insert_bundle(SpatialBundle {
                visibility: Visibility::visible(),
                transform: Transform::from_translation(board_position.into()),
                ..Default::default()
            })
Enter fullscreen mode Exit fullscreen mode
Collapse
 
dan_ profile image
Dan • Edited

use bevy::prelude::Windows to replace bevy::window::Descriptor in function create_board if you use lastest version of bevy(0.9).
example

and...

        commands
        .spawn(SpatialBundle {
            visibility: Visibility::VISIBLE,
            transform: Transform::from_translation(board_position.into()),
            ..Default::default()
        })
        .insert(Name::new("Board"));
Enter fullscreen mode Exit fullscreen mode
Collapse
 
leonidv profile image
Leonid Vygovskiy

github.com/leonidv/bevy-minesweepe... - full tutorial updated to 12.1. One chapter per commit.