Workshop › Bomberman-style Arena › Step 21 of 42
Crates burn
What we are doing
A crate in the way catches fire: it becomes floor, and the arm stops there. That is how you open the way through the
arena.
```js
flames.push({ r, c, time: FLAME_TIME })
if (grid[r][c] === '+') {
grid[r][c] = ' '
break
}
```
What it means
- The crate's tile gets its flame first, then becomes floor, and
break ends the arm.
Your turn
In explode, under the flames.push({ r, c, ... }) line inside the loop, write the if.
Skills: Game states
← A cross of flames Chain reactions →
All steps
- Measure the arena
- A floor of tiles
- Draw it every frame
- The arena as data
- Draw what the grid says
- Pillars
- Crates
- Keep the corners clear
- The player
- Keys being held
- Slide towards a target
- Walk
- Drop a bomb
- Space drops, bombs show
- One bomb at a time
- Bombs are in the way
- The fuse burns down
- Fire!
- Flames die down
- A cross of flames
- Crates burn
- Chain reactions
- Bombs blink
- Flames hurt
- A moment of safety
- Hearts
- Out of lives
- Game over
- Enemies
- Enemies wander
- No turning back
- Fight and touch
- All enemies gone
- Hidden power-ups
- Uncover the power-ups
- Pick them up
- Show the powers
- Which way is the finger?
- Play with a finger
- A clock
- The fastest win
- Build it yourself: a smarter enemy