Sure, here's an example of a game where a square moves within a box and gets creepier over time, with the background getting darker every 5 seconds. It is implemented as a single HTML file and uses JavaScript:
In this game, a red square moves horizontally within a box. When the square reaches the right edge of the box, it gets teleported to the left edge. Every time the square's x-coordinate is a multiple of 50 and a multiple of 10, it gets creepier. The background slowly becomes darker, and the color of the square changes to black.
Please copy the code above and save it as an HTML file to play the game. Open the saved file on your smartphone, and you should see the square moving, getting creepier, and the background gradually getting darker every 5 seconds.