Figlet is a tool for generating banners with ASCII characters. There are a large number of contributed fonts, all of which can be used to turn a banner into a game of break-out. For more information about figlet, see any of the following pages:
Creates a Breakout game from a Figlet ascii banner. (Demo)
Why not?
This is an old project that I had from awhile back that I dusted off to use as the winning screen for the site cmdchallenge.
bower install figlet-breakout
See the example index.html.
<div id="breakout-box">
<div id="msg-flash"></div>
<div id="breakout"></div>
</div>
FigletBreakout.init({
font_size: 8, // font size for the bricks
p_font_size: 12, // font size for the paddle
game_str: "Play Figlet Breakout!" // what text to display
});
Once the board is initialized it can be either call play() or reset()
Reset will return everything to the default settings:
FigletBreakout.reset();
Play will start the game:
FigletBreakout.play();
There are many other settings that can be overridden, auto word wrapping and line breaks are also supported. See the default settings