Sure, I can provide you with a simple example of a "Sonic the Hedgehog" horror game using JavaScript and HTML. However, keep in mind that this will be a very basic implementation. Here's the code:
This implementation provides a simple text-based representation of the game. There are three locations: Living Room, Bedroom, and Secret Room. Sonic starts in the Living Room and needs to find a way to escape. The actions available to the player are "search" (to search the current room), "move" (to move to another room), and "exit" (to end the game).
Please note that this is a very basic example and does not include any graphics or advanced interactions. It is a starting point that you can enhance and modify as per your requirements.