Here's a simple implementation of a Railroad Crossing game using HTML and JavaScript:
🚉
To play the game, simply open the HTML file in a web browser (preferably on a smartphone) and control the player position using touch gestures or arrow keys on a physical keyboard. The goal is to avoid colliding with the obstacles (represented by red bars) that appear on the screen. The game speed increases over time, and the score is displayed on the screen. When a collision occurs, the game ends and the final score is shown in an alert box.