Click here for free DL of the app version that can save data.
No:35989 106
Prev Next
Horror game when you wake up in the game There’s a..ALL
Developer User16706|Date and time 24/1/16 6:05:05
Build time 17.773 sec|Game capacity 5.476KB|Script





Horror Game - Waking Nightmare



Explanation: This is a simple horror game implemented as a single HTML file using JavaScript. It creates a game environment where the player, represented by a white square, needs to avoid a scary bunny mascot enemy, represented by a red square. The player can control their position by touching and dragging on a smartphone screen. The game starts by displaying the game title and the game container, which is a square area in the middle of the screen. The player and enemy are positioned within this container. The enemy continuously moves on a repetitive animation. The player's position is controlled by the touch movements on the screen. The `movePlayer` function calculates the new position based on touch coordinates and updates the player's position accordingly. The `checkCollision` function checks for collision between the player and enemy on every move. If a collision occurs, the game ends. When the game ends, the `endGame` function is called, changing some visual aspects to indicate the game over state. After a brief delay, the `resetGame` function is called to reset the game state and allow the player to play again. The `clamp` function is a utility function used to restrict a value within a specified range. Overall, this simple horror game offers a demo experience where the player needs to avoid the chasing bunny mascot to survive. Please keep in mind that this is a basic implementation, and additional features can be added to enhance the gameplay.

Prev Next   Back  0  0 Menu 

[PR]現在の売れ筋ゲームランキング

Click here for free DL of the app version that can save data.

(C)2023 HisashiApp