"Baby's First Computer" is an early-in-life, foundational game to introduce the youngest humans to interacting with computers and let them discover on their own that they have agency in the world. By cycling colors through keypresses, babies learn their actions create immediate change, transforming their 'first computer' into a lesson of being in control before they can even walk or talk.
This fullscreen color cycling game is designed for babies (pre-verbal, pre-mobile) with parent supervision. Press any key to cycle through eight vibrant colors with corresponding musical tones.
- Quick Start
- Color Palette
- About
- For Parents
- Features
- Installation
- Usage
- Technical Details
- Development
- License
- Contributing
- Safety Note
- Acknowledgments
Python Desktop Version:
pip install -e .
babygameWeb Browser Version:
- Open index.html in your browser.
- Click "Start Baby Game" or press any key.
Direct Run:
git clone https://github.com/slpstream/babygame.git
cd babygame && python babygame/babycolor.pyπ₯ π© π¦ π¨ β¬ β¬ π π¦
| Color | Block | Hex | Note | Frequency |
|---|---|---|---|---|
| Red | π₯ | #FF0000 |
C4 | 261 Hz |
| Green | π© | #00FF00 |
E4 | 330 Hz |
| Blue | π¦ | #0000FF |
G4 | 392 Hz |
| Yellow | π¨ | #FFFF00 |
C5 | 523 Hz |
| White | β¬ | #FFFFFF |
E5 | 659 Hz |
| Black | β¬ | #000000 |
G5 | 784 Hz |
| Pink | π | #FFB6C1 |
C6 | 1047 Hz |
| Cyan | π¦ | #00FFFF |
E6 | 1319 Hz |
This project provides a baby-friendly interactive experience in two formats:
- Python Desktop Version: A fullscreen PyGame application.
- Web Browser Version: A pure HTML/JavaScript application.
Both versions offer the same core functionality: a fullscreen solid-color display that cycles through eight high-contrast colors with musical tones on any keypress.
By transforming a "first computer" from a passive screen into a tool for self-expression and cause-and-effect, you're giving your youngest humans a foundational lesson in their own agency. For more information on why this program was created and how to set it up for your child, please read forparents.md.
This is a recreation of Ed Swank's "Baby Game," originally created in 1994. The concept is a simple computer program that allows babies to interact with a computer by pressing keys to change colors.
- High-Contrast Colors: Red, Green, Blue, Yellow, White, Black, Pink, and Cyan.
- Musical Tones: Each color corresponds to a musical note (C4 to E6 scale).
- Fullscreen Mode: Covers the entire screen to minimize distractions.
- Simple Controls: Any key changes the color; ESC exits.
- Touch Support: The web version supports touch screens on tablets and phones.
- No Installation Needed: The web version runs in any modern browser.
- Cross-Platform: Works on Windows, macOS, and Linux.
Option 1: Clone and Run
git clone https://github.com/slpstream/babygame.git
cd babygame
pip install -r requirements.txt
python babygame/babycolor.pyOption 2: Install as Package
pip install -e .
babygame- Open index.html to play the game instantly.
- Use the "Fullscreen" button or press F11.
- Press any key or touch the screen to change colors.
You can run the test script to verify the installation:
python test_installation.pyThe script checks for:
- Python version compatibility
- Required packages (pygame, numpy)
- Main game script availability
- Web files existence
- Start the game (fullscreen activates automatically).
- The initial screen is solid white.
- Press any key to cycle through colors: Red β Green β Blue β Yellow β White β Black β Pink β Cyan β Red...
- Press ESC to exit.
Each color change plays a corresponding musical tone.
- Framework: PyGame and NumPy.
- Display: Fullscreen at native resolution.
- Audio: Programmatically generated tones with fade-out envelopes.
- Dependencies:
pygame>=2.0.0,numpy>=1.20.0.
- Technology: Pure HTML/CSS/JavaScript with no external dependencies.
- Audio: Web Audio API for real-time sound generation.
- Input: Supports keyboard, mouse, and touch events.
See CONTRIBUTING.md for development guidelines.
- babygame/: Core Python package.
babycolor.py: Main game logic.__init__.py: Package initialization.
- assets/: Project assets and documentation images.
- index.html: Web-based implementation (Live Demo).
- PYTHON-SPEC.md: Technical specification for the Python version.
- WEB-SPEC.md: Technical specification for the web version.
- LICENSE: MIT License.
- README.md: Project overview and documentation.
- CHANGELOG.md: History of project changes.
- CONTRIBUTING.md: Guidelines for development.
- forparents.md: Background and setup tips for parents.
- setup.py / pyproject.toml: Python packaging configuration.
- .gitignore: Git exclusion rules.
MIT License - see the LICENSE file for details.
Contributions are welcome. Please read CONTRIBUTING.md for development guidelines.
Ways to contribute:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
This software is designed for babies under active parental supervision. Always supervise children when they are using computers or electronic devices. See also forparents.md.
