How to Create Pure CSS Games
summary
A complete playable game is implemented using only HTML and CSS (with Sass and Pug to generate code): about 100 virus sprites move via CSS animations, remove themselves when their wrapped input radios are checked using label toggles and the :checked + sibling selector, score uses a CSS counter that increments on checked radios, countdown is two synchronized animations, animations are generated with Sass loops and Sass random() for variation, game reset uses a form reset button, and game over is timed by animation delay (99s).
AI-written summary · about
chapters (13)
- 0:00Introduction
- 3:09CSS game inspiration
- 5:15Preprocessors for efficiency
- 6:59Game frames in CSS
- 8:44Checkbox actions
- 10:51Dynamic frame display
- 13:20Viruses disappearing with CSS
- 15:47CSS score tracking
- 19:00CSS countdown timer
- 22:11Random values in CSS
- 25:01Resetting game with CSS
- 27:08Game over curtain
- 28:12Fun projects matter
related talks
29mHow to Create Pure CSS Games
30mHow to create pure CSS games
34mHow to Create Pure CSS Games
33mHow to Create Pure CSS Games
27mCSS as a Game Engine: Building Playful, Stateful Web Experiences Without JS
34mLet’s Build a CSS Game
28mCSS Games and Drawings in the Real World: Useful or Just Fun?
04mFunctionality in CSS
