For this game, I chose to not use SCSS or Pug (or any other preprocessor) as the logic is fairly simple... a decision I'd regret soon enough later, as it is really tedious too (using preprocessors would make adding new movie titles so much easier.)
There are 10 movie titles that are "randomized" for the game using the CSS pseudo-randomization algorithm explained in this article. It would have been easier to have them in order, but the "random" factor makes it more interesting.
The images are not really images –not even inline SVGs–, it's all cartoons done with CSS and styled using shadows, clip paths, and border-radius. Developing the shark was fun, and I'm particularly happy with how it looks.
If you like CSS games like this one, check this CodePen collection or visit this GitHub repo.
Top comments (12)
I love seeing people show how dynamic and awesome modern CSS really is. Very cool.
Really well done Alvaro!! So far I've walked the plank twice 😅 Arrrgh!
This is really cool. I need to steal your randomizer for something, that's really clever :)
Please go ahead, and share what you do with it.
Awesome ! I fell off the plank unless I went through CSS :).
Yeah I just burned like 30 minutes of my day on this. This is really fun!
Wow, I really love it!
This is great!! Nice touch with the spelling of ARRNAMATIONS, haha!