Everyone is talking about scroll-driven animations, but what about scroll-driven games?!
So in honor of this week's
#CodePenChallenge, which is all about mazes, I decided to build a maze (in pure
#CSS of course) that is controlled by scrolling. 😀
You can move the two bars (vertical and horizontal), and control the movement of the player. The 'collision detection' (when the player hits a wall) is done by crossing these two animations together, as is the player's arrival at the final target.
It's a pretty basic idea for now, more of a proof of concept than a game, but I hope it inspires someone to do more cool things with scroll-driven animations. 😊
The full game and all the code are as usual on
@CodePen:
BTW, if you go to the challenge page, you can find in the resources another maze I made, including a full video of me live-coding it. 😎