Lemonade Stand: browser recreation of the Atari 8-bit BASIC game
Faithful day loop - weather report, cost of lemonade rising over the summer, glasses/signs/price decisions, thunderstorms, heat waves and street crews - with the $$ LEMONSVILLE DAILY FINANCIAL REPORT $$ laid out the way it printed. The simulation is kept out of React so a season can be run headlessly: a careful player compounds $2.00 into roughly $22 over twelve days, while an all-in player goes broke about seven times in ten. Weather scenes are pixel rectangles in SVG and the music is a small chiptune engine on the Web Audio API, so there are no binary assets. The screen is locked to a 4:3 tube and never scrolls.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { Btn, Line } from './Crt'
|
||||
import { bannerRows } from './logo'
|
||||
|
||||
const BANNER = bannerRows('LEMONADE')
|
||||
|
||||
export function TitleScreen({
|
||||
onStart,
|
||||
onInstructions,
|
||||
seed,
|
||||
}: {
|
||||
onStart: () => void
|
||||
onInstructions: () => void
|
||||
seed: number
|
||||
}) {
|
||||
return (
|
||||
<div className="stack">
|
||||
<pre className="banner" aria-label="LEMONADE">
|
||||
{BANNER.join('\n')}
|
||||
</pre>
|
||||
<Line className="center accent">S T A N D</Line>
|
||||
<Line />
|
||||
<Line className="center">LEMONSVILLE, CALIFORNIA</Line>
|
||||
<Line className="center dim">ATARI 8-BIT EDITION · SEED {seed}</Line>
|
||||
<Line />
|
||||
<Line className="center blink">PRESS START</Line>
|
||||
<Line />
|
||||
<div className="row center">
|
||||
<Btn kind="primary" onClick={onStart}>
|
||||
START
|
||||
</Btn>
|
||||
<Btn onClick={onInstructions}>INSTRUCTIONS</Btn>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user