Skip to content

A retro-style arcade game demo built with the LÖVE 2D framework, featuring procedural lightning, real-time audio generation, and matrix-based pixel sprites

License

Notifications You must be signed in to change notification settings

plinkr/bolt-love

Repository files navigation

BOLT-LOVE, a demo game using LOVE2D

This project is a simple demo game created to learn and demonstrate the capabilities of the LÖVE framework. The game, BOLT-LOVE, is a small arcade game where the player has to dodge procedurally generated lightning bolts.

Technical Features

This demo is an idea that can serve as the basis for a learning project, showcasing some techniques:

Procedural Generation

  • Procedural Lightning: The main threat in the game, the lightning bolts, are not pre-rendered sprites. They are generated procedurally using algorithms that create segmented lines with random bifurcations. This creates a unique and unpredictable pattern every time. The lightning also has an electrical effect created by adding random noise to the line segments.

  • Procedural Audio: The sound effects in the game are generated in real-time. Instead of using pre-recorded audio files, functions like generateSound create sounds like "laser", "explosion", "coin", and "hit" by generating waveform data on the fly. This is achieved by manipulating parameters like frequency and duration to produce unique sound effects directly from code.

Matrix-based Sprites

  • Player and Animations: The player character is not an image file. Its appearance and animations are defined by 16x16 matrices of 1s and 0s directly in the code (see playerSprites in game/main.lua). A custom function drawSprite reads these matrices and draws the character pixel by pixel on the screen. This is a classic technique reminiscent of early video games and is a great way to handle simple graphics without external assets.

How to Play

  • Objective: Dodge the yellow lightning bolts and collect the falling stars for points.
  • Controls: Press Space, Enter, or the arrow keys (left/right) to change the player's direction. Mouse clicks also work.

Screenshots

A few screenshots, click a thumbnail to open the full image.

About

A retro-style arcade game demo built with the LÖVE 2D framework, featuring procedural lightning, real-time audio generation, and matrix-based pixel sprites

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published