Cosmic Horizon - End User Manual

Welcome to Cosmic Horizon, an endless side-scrolling space shooter where you pilot a spaceship through a neon-lit galaxy, battling enemies, dodging asteroids, and collecting power-ups to achieve the highest score possible. This manual provides everything you need to start playing, understand the game mechanics, and enjoy the experience.

Table of Contents

  1. Game Overview (#game-overview)
  2. System Requirements (#system-requirements)
  3. How to Start the Game (#how-to-start-the-game)
  4. Controls (#controls)
  5. Gameplay Mechanics (#gameplay-mechanics)
  6. Power-Ups (#power-ups)
  7. Enemies and Obstacles (#enemies-and-obstacles)
  8. Scoring and Progression (#scoring-and-progression)
  9. Game Over and Restarting (#game-over-and-restarting)
  10. Tips for Success (#tips-for-success)
  11. Troubleshooting (#troubleshooting)

1. Game Overview

Cosmic Horizon is a retro-styled, neon-themed space shooter. Your goal is to survive as long as possible in an endlessly scrolling galaxy, destroying enemy ships, avoiding asteroids, and collecting power-ups to boost your abilities. The game features a glowing "COSMIC HORIZON" title, a dynamic starfield background, and synthetic sound effects for an immersive experience. When the game ends, your final score is announced via text-to-speech (TTS).

2. System Requirements

  • Browser: Modern web browser (Google Chrome, Mozilla Firefox, Microsoft Edge, or Safari) with JavaScript enabled.
  • Device: Desktop, laptop, tablet, or smartphone.
  • Audio: Speakers or headphones for sound effects and TTS (optional but recommended).
  • Internet: No internet connection required if running locally; needed if hosted online.
  • Files: Ensure index.html, styles.css, and game.js are in the same directory.

3. How to Start the Game

  1. Local Setup:
    • Save index.html, styles.css, and game.js in the same folder.
    • Double-click index.html to open it in your default web browser, or drag it into a browser window.
  2. Hosted Setup (if applicable):
    • Visit the website hosting the game (e.g., a personal server or hosting platform).
  3. Start Playing:
    • The game loads with a neon "COSMIC HORIZON" title above the game area.
    • Click the "Play" button in the center of the canvas to begin.
    • The button disappears, and gameplay starts immediately.

4. Controls

Cosmic Horizon supports keyboard, mouse, and touch inputs for flexibility across devices.

Keyboard

  • Move Left: Arrow Left or A
  • Move Right: Arrow Right or D
  • Move Up: Arrow Up or W
  • Move Down: Arrow Down or S
  • Shoot: Spacebar

Mouse

  • Shoot: Left-click anywhere on the game canvas.
  • Movement: Use keyboard or touch for movement; mouse controls shooting only.

Touch (Mobile/Tablet)

  • Move: Touch and drag on the screen. Dragging left, right, up, or down moves the spaceship accordingly.
  • Shoot: Tap or hold to fire continuously.

Note: The spaceship stays in the left half of the screen to focus on incoming threats from the right.

5. Gameplay Mechanics

  • Objective: Survive as long as possible by destroying enemies, avoiding damage, and collecting power-ups to increase your score.
  • Spaceship: You control a magenta spaceship with a cyan outline, shaped like a triangle pointing right.
  • Health: Your health (100 max) is displayed in a cyan bar at the top. Damage from enemies or asteroids reduces it.
  • Shooting: Fire magenta projectiles rightward to destroy enemies. Shooting has a cooldown unless enhanced by power-ups.
  • Scrolling: The background, enemies, power-ups, and asteroids scroll from right to left, creating an endless environment.
  • Canvas: The game area is 800x400 pixels, with a dark purple background and white stars for a cosmic feel.

6. Power-Ups

Power-ups appear frequently, scrolling from right to left, and can be collected by touching them with your spaceship. Each lasts 10 seconds (except health) and has a distinct color:

  • Health (Green):
    • Restores 30 health points, up to a maximum of 100.
    • Helps you survive longer against enemy attacks and asteroid collisions.
  • Rapid Fire (Blue):
    • Reduces shooting cooldown (0.1s vs. 0.3s normally, 0.2s vs. 0.5s for shotgun).
    • Allows faster firing for quicker enemy takedowns.
  • Extra Damage (Yellow):
    • Doubles projectile damage (50 vs. 25 per hit).
    • Makes it easier to destroy tougher enemies.
  • Shotgun Blast (Magenta):
    • Fires three projectiles in a spread (straight, angled up, angled down).
    • Great for hitting multiple enemies or covering a wider area, with a slightly longer cooldown (0.5s normally, 0.2s with rapid fire).

Note: Only one instance of each timed power-up (rapidFire, extraDamage, shotgunBlast) can be active at a time; collecting another resets its 10-second timer.

7. Enemies and Obstacles

  • Enemies:
    • Small Ships (20x20 pixels, cyan, 50 health, 20 points):
      • Fast-moving, easier to destroy.
      • Shoot cyan projectiles leftward occasionally.
    • Large Ships (40x40 pixels, red when damaged, 100 health, 50 points):
      • Slower but tougher, requiring more hits.
      • Also shoot cyan projectiles.
    • Behavior: Spawn off-screen right, move left, and are removed if they exit left without hitting you.
    • Damage: Collision deals 20 damage; their projectiles deal 10 damage.
  • Asteroids:
    • Gray, circular obstacles (30x30 pixels).
    • Move left at a steady pace, dealing 20 damage on collision.
    • Cannot be destroyed, so dodge them carefully.

8. Scoring and Progression

  • Score:
    • Earn 10 points per second survived.
    • Gain 20 points for destroying small ships, 50 points for large ships.
    • Displayed at the top left as "Score: [value]".
  • Difficulty:
    • Enemy spawn rate increases over time, starting at a 2% chance per frame and growing.
    • Game speed (movement of enemies, asteroids, power-ups) also increases gradually, making the game tougher the longer you survive.

9. Game Over and Restarting

  • Game Over:
    • Occurs when your health reaches 0 (from enemy collisions, projectiles, or asteroids).
    • A "Game Over!" modal appears, showing your final score.
    • The score is announced via text-to-speech: "Game over. Your final score is [score]."
  • Restarting:
    • Click the "Restart Game" button in the game over modal.
    • Resets health, score, power-ups, and all entities, returning to the "Play" button screen.
    • Click "Play" to start a new game.

10. Tips for Success

  • Prioritize Dodging: Asteroids and enemy ships deal significant damage (20 each), so focus on avoiding collisions over chasing power-ups.
  • Use Power-Ups Strategically:
    • Grab health when low to stay alive.
    • Shotgun Blast is great for clearing multiple enemies; combine with rapidFire for devastating spreads.
    • Extra Damage helps take down large ships quickly.
  • Stay Mobile: Keep moving to dodge enemy projectiles (10 damage) and position yourself for power-ups.
  • Conserve Space: Stay in the left half of the screen to give yourself time to react to incoming threats.
  • Watch for Patterns: Enemies and asteroids spawn randomly but become more frequent. Anticipate busier waves as your score grows.

11. Troubleshooting

  • Game Doesn’t Load:
    • Ensure all three files (index.html, styles.css, game.js) are in the same folder.
    • Open index.html with a modern browser (Chrome, Firefox, Edge, Safari).
    • If hosted online, check the server paths for all files.
  • No Sound:
    • Check your device’s audio is not muted.
    • Click or tap the canvas to activate Web Audio (some browsers require user interaction).
    • TTS requires browser support; try Chrome or Firefox if it fails.
  • Controls Not Working:
    • Keyboard: Ensure no other apps are capturing key inputs.
    • Touch: Tap and drag gently; avoid multi-touch gestures.
    • Mouse: Left-click only for shooting; use keyboard for movement.
  • Performance Issues:
    • Close other browser tabs or apps to free up resources.
    • Use a modern device/browser for smoother gameplay.
  • Power-Ups Too Rare/Frequent:
    • The game is tuned for frequent power-up spawns (roughly every 1–2 seconds). If it feels off, contact the developer for adjustments.

Enjoy Cosmic Horizon!

Blast through the galaxy, rack up points, and see how long you can survive! For feedback or support, share your high scores or suggestions with the community or developer.

Happy shooting!

Published 13 days ago
StatusReleased
PlatformsHTML5
AuthorMauroDot

Leave a comment

Log in with itch.io to leave a comment.