Midterm Draft

Concept 

I’m making a small interactive vertical Chicken Invaders style shooter game. The player controls a spaceship at the bottom of the screen and can move up, down, left, or right while shooting bullets upward. Chickens (enemies) continuously descend from the top of the screen, and some randomly drop eggs that can damage the player.

The game starts with a start screen that tells the player how to play: “Arrow keys to move, SPACE to shoot. Press SPACE to start.” Once the player starts, waves of chickens begin descending. The player earns points by shooting chickens and can lose lives if hit by enemy eggs. After losing all lives, the game transitions to a Game Over screen, showing the final score and instructions to restart by pressing ENTER.

Player interaction is simple and intuitive:

  • Arrow keys: move the spaceship in all directions

  • SPACE: shoot bullets upward

  • Collision detection: bullets destroy enemies, eggs damage player

  • Score and lives display updates in real time

  • Continuous spawning keeps the game dynamic and engaging

Code Design

The game is designed in an object-oriented structure:

  1. Player class:
    • Controls the spaceship’s position, movement, and display
    • Constrains the player within canvas boundaries
  2. Bullet class:
    • Manages bullet position, movement, and collision with enemies
  3. Enemy class:
    • Controls chicken position, downward movement, and spawning
    • Randomly generates enemy bullets (eggs)
  4. EnemyBullet class:
    • Manages eggs dropped by enemies, movement, and collision with the player
  5. Main sketch:
    • Holds a gameState variable: "start" | "playing" | "gameover"
    • Delegates drawing and updates depending on the current game state
    • Spawns new enemies continuously and updates UI elements (score, lives)

Current Game:

Risk & Challenges

The scariest part was managing continuous enemy spawning and collision detection while ensuring smooth movement and responsive player controls. If either bullets or enemy collisions failed, the gameplay would feel broken, and the game could become frustrating.

How I reduced the risk:

  • I wrote small test sketches for bullets and enemy collisions first, confirming that collisions were detected reliably

  • Spawn timers were implemented to gradually introduce enemies without overloading the canvas

  • Player boundaries were constrained using constrain() to avoid moving off-screen

  • The gameState system ensures that start, playing, and game over screens never interfere with gameplay logic

Result: collisions, enemy spawning, and player movement are smooth and reliable, so the core gameplay is stable and enjoyable.

Next Steps

  • Add background music that loops during gameplay and optional sound effects for shooting and enemy hits

  • Add visual enhancements: use emojis, icons, or sprites for player and chickens for more arcade-like feel

  • Add multiple enemy types: faster chickens, stronger enemies, or bonus targets

  • Implement power-ups: shields, rapid fire, or score multipliers

Leave a Reply