I recently developed a project that simulates the classic game of Rock, Paper, Scissors, but with a twist. Instead of two players, entities (rock, paper, and scissors) are automatically generated and moved randomly within an arena until only one type remains. Here's the repository: https://github.com/alejandrosnk/Cachipun-Automatic.
To make it even more engaging, I added a betting system where users can place virtual bets on the eventual winner. The system uses localStorage
to retain points between sessions, providing a game-like experience and demonstrating basic web development concepts.
๐ What this project demonstrates
- DOM Manipulation: Dynamically managing entity creation, movement, and deletion.
- Collision Detection: Enforcing Rock, Paper, Scissors rules when entities collide.
-
Persistence: Use of
localStorage
to manage points and bets. - Simulation flow: From initialization โ movement โ battles โ winner determination. - User interaction: Betting controls, speed settings, and modal dialogs.
๐ ๏ธ Tech stack
- HTML5 for the structure
- CSS3 for layout and animations
- Basic JavaScript for logic, events, and the simulation loop
๐ How to run it
- Clone the repository.
- Open
index.html
in your browser. - Start the simulation, adjust the speed, and place your bets.
โก Future Improvements
- Add simulation history
- More advanced entity movement
- Multiplayer betting system
- Backend integration for user profiles
๐ This project was a fun way to reinforce concepts of JavaScript animations, game logic, and client-side persistence.
๐ฌ I'd love community feedback on how to take this further. What feature would you add next?
Top comments (0)