Skip to content

solunian/two-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

two colors 🔴 🔵

A game collection that uses two main colors. Designed to help people correct "lazy eye" (amblyopia) by using those red-blue tinted glasses (like for 3D movies).

Parts

  • start screen
  • menu/options
  • color matching/auto switch
  • tetra
  • tanks
  • music/sound effects (used beepbox to quickly prototype)

Dev Notes

Installation

Clone the repo, then install the love2d game engine for your system from https://love2d.org/!

Project Structure

  • main loop in main.lua, game config in conf.lua
  • each part of game is separated into folders (src/tetra, src/tanks, etc.)
  • libs (that i didn't write) in (src/lib)
  • utils (that i did write) in (src/util)
  • assets

Running

Makefile has all the "necessary" commands compiled together. Use make to run the game locally without building it to be distributed.

Build

In the Makefile, but you can also refer to the love2d docs for game distribution here!

Web Build

Using https://github.com/Davidobot/love.js to generate and run a web build after running a normal build. Commands for generating the files are in the Makefile.

Color

Look through only one tinted lens of glasses, and adjust the color until it turns near black. Looking through a pure blue filter would only show blue light, and same with everything else.

Match the opposite color into the black background.

Switches colors around randomly in the middle of playing a game.

Libs Used

  • push: for aspect ratio windowing stuff
  • classic: for simple oop stuff, renamed to lib/object
  • lume: serialization for save data
  • minheap: priority queue

These are all sitting in src/lib

Start Screen

  • drawing the intersection of two cirlces efficiently.
  • title screen image gets blocked out by the bouncing red and blue circles.

Tetra

Recreating the famous stacking game is more complex than one might think. The weird things is coding rotation, srs kicks, and movement things like ARR, DAS, and DCD.

Heavily referenced tetrio and other tables for specific details.

All functionality essentials implemented.

More notes here.

Tanks

  • controls: wasd to move, mouse to aim, spacebar to fire
  • kinda some weird geometry math for tank auto movement

About

A game collection that uses two main colors. (rough demo)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors