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.
This demo is an idea that can serve as the basis for a learning project, showcasing some techniques:
-
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
generateSoundcreate 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.
- 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
playerSpritesingame/main.lua). A custom functiondrawSpritereads 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.
- Objective: Dodge the yellow lightning bolts and collect the falling stars for points.
- Controls: Press
Space,Enter, or thearrow keys(left/right) to change the player's direction. Mouse clicks also work.