Welcome to the Infinite Novel community! This document provides guidelines for contributing to this experimental AI narrative engine.
Infinite Novel is an art project first, software second. We value:
- π¨ Aesthetic over efficiency β Lo-fi glitches are features
- π§ͺ Experimentation over stability β Break things, learn, iterate
- π Accessibility over performance β Run on 8GB VRAM, not just 4090s
- π€ Community over perfection β Your weird idea might be brilliant
Before submitting:
- Check existing issues
- Test on latest
mainbranch - Include system specs (GPU, RAM, OS)
Good bug report template:
## Bug Description
Clear description of what went wrong
## Steps to Reproduce
1. Launch application
2. Type action: "explore the void"
3. Press Enter
4. [Crash/unexpected behavior]
## Expected Behavior
What should have happened
## System Info
- OS: macOS 14.2
- GPU: M3 Pro 18GB
- Python: 3.11.5
- CUDA/MPS: MPS
- SD Speed: 1.52 it/s
## Logs[Paste relevant error messages]
## Screenshots/Video
[If applicable]
Priority labels:
criticalβ Crashes, data loss, unplayablebugβ Something broken but workaround existsglitch-featureβ Is this a bug or aesthetic? (discuss!)
Before requesting:
- Search discussions
- Consider if it fits the lo-fi aesthetic
- Think about 8GB VRAM users
Good feature request template:
## Feature Description
What you want to add/change
## Use Case
Why this improves the experience
## Aesthetic Impact
Does this maintain lo-fi vibe or conflict with it?
## Performance Impact
How does this affect 8GB VRAM systems?
## Implementation Ideas
[Optional] Technical approach
## Alternatives Considered
Other ways to achieve thisFeature categories:
enhancementβ Improve existing systemsnew-modelβ Add AI model supportnarrativeβ Story mechanics, arcs, threadingvisualβ Shaders, effects, UIaudioβ Music generation, TTS improvementsperformanceβ Optimization without aesthetic loss
Shader contributions:
def your_shader_name(surface, intensity=1.0):
"""
Brief description of visual effect.
Args:
surface: pygame.Surface to process
intensity: 0.0-2.0, effect strength
Returns:
pygame.Surface with effect applied
"""
# Your implementation
# Must be real-time (< 16ms on M3 Pro)
return processed_surfaceMusic algorithm contributions:
def generate_your_sound_layer(
duration=3.0,
sample_rate=44100,
mood_score=0.0,
context_energy=1.0
):
"""
Generate audio layer for procedural music system.
Returns:
np.ndarray (float32, mono)
"""
# Your implementation
# Must avoid clicks (fade in/out)
return audio_signalRequirements:
- Real-time performance (30 FPS on reference hardware)
- Fits lo-fi aesthetic (embrace imperfection)
- Documented with inline comments
- Include example usage
We need:
- Code comments (especially complex algorithms)
- Tutorials (YouTube videos welcome!)
- Architecture explanations
- Narrative design guides
- Shader/audio tutorials
Documentation style:
def complex_function(x, y, context):
"""
One-line summary of what this does.
Detailed explanation of algorithm, especially if non-obvious.
Include references to papers/techniques if applicable.
Args:
x: Description and expected range
y: Description and expected range
context: Description of context object
Returns:
Description of return value
Example:
>>> result = complex_function(0.5, 0.8, core)
>>> print(result)
0.73
"""
passHigh-risk, high-reward contributions:
Examples:
- New AI model integrations (Flux, SDXL Turbo, LLaVA)
- Alternative narrative systems (branching, time loops)
- Multiplayer/co-op experiments
- VR/AR prototypes
- Blockchain integration (controversial, but interesting)
Guidelines:
- Create feature branch:
experimental/feature-name - Add
[EXPERIMENTAL]prefix to PR title - Document known issues prominently
- Include toggle to disable (don't break main)
- Expect heavy feedback and iteration
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/InfiniteNovel.git
cd InfiniteNovel
git remote add upstream https://github.com/0penAGI/InfiniteNovel.git# Feature branch
git checkout -b feature/your-feature-name
# Bug fix branch
git checkout -b fix/issue-123-description
# Experimental branch
git checkout -b experimental/wild-ideapython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -r requirements-dev.txt # If exists# Run the game
python infinite_novel.py
# Test specific features
python -m pytest tests/ # If test suite exists
# Check code style (not enforced, but appreciated)
black infinite_novel.py --check
flake8 infinite_novel.py --ignore=E501,W503We're flexible, but prefer:
# β
Good: Clear, commented, functional
def generate_layer(duration, mood):
"""Generate audio layer based on mood."""
# Calculate base frequency from mood
base_freq = 130 + mood * 50
# Generate harmonic series
signal = np.zeros(int(duration * 44100))
for h in [1.0, 1.5, 2.0]:
signal += np.sin(2 * np.pi * base_freq * h * t)
return signal
# β Bad: Unclear, no context
def gl(d, m):
bf = 130 + m * 50
s = np.zeros(int(d * 44100))
for h in [1.0, 1.5, 2.0]:
s += np.sin(2 * np.pi * bf * h * t)
return sNaming conventions:
snake_casefor functions and variablesPascalCasefor classesUPPER_CASEfor constants- Descriptive names over abbreviations (except standard ones:
i,j,x,y,t)
Comments:
- Explain why, not what
- Complex algorithms need paragraph explanations
- Artistic decisions should be documented
# β
Good comment
# Use cubic easing for smooth morphing (linear feels robotic)
alpha = t * t * (3 - 2 * t)
# β Bad comment
# Calculate alpha
alpha = t * t * (3 - 2 * t)Benchmarking template:
import time
def test_performance():
"""Benchmark your feature."""
core = PulseCore()
surface = generate_test_surface()
iterations = 100
start = time.time()
for _ in range(iterations):
result = your_function(surface, core)
elapsed = time.time() - start
fps_cost = (elapsed / iterations) * 30 # Impact on 30 FPS
print(f"Average time: {elapsed/iterations*1000:.2f}ms")
print(f"FPS cost: {fps_cost:.1f} frames")
assert fps_cost < 3, "Function too slow! (>3 frame cost)"Optimization checklist:
- Tested on M3 Pro or equivalent
- Frame time < 33ms (30 FPS)
- Memory usage documented
- GPU vs CPU tradeoffs considered
- Caching used where appropriate
- Code runs without errors
- Tested on reference hardware (or note untested)
- Comments added for complex logic
- No unnecessary dependencies added
- Aesthetic consistency maintained
## Description
Clear summary of changes
## Type of Change
- [ ] Bug fix (non-breaking)
- [ ] New feature (non-breaking)
- [ ] Breaking change
- [ ] Experimental feature
- [ ] Documentation
## Motivation
Why is this change needed?
## Testing
- [ ] Tested on: [Hardware specs]
- [ ] FPS impact: [+/- X frames]
- [ ] Memory impact: [+/- X MB]
## Screenshots/Video
[If visual changes]
## Checklist
- [ ] Code follows style guidelines
- [ ] Comments added where needed
- [ ] Maintains lo-fi aesthetic
- [ ] Works on 8GB VRAM systems (or noted)
- [ ] No breaking changes (or documented)
## Related Issues
Fixes #123
Related to #456Reviewers check:
- Aesthetic fit β Does it feel like Infinite Novel?
- Performance β 30 FPS maintained?
- Accessibility β Works on 8GB VRAM?
- Code quality β Readable and maintainable?
- Documentation β Clear what it does?
Timeline:
- Initial review: 2-7 days
- Revisions requested if needed
- Merge after approval from maintainer
Must have:
- β Passing performance tests
- β Maintainer approval
- β No major bugs introduced
Nice to have:
- π Documentation updates
- π¨ Example usage
- πΉ Video demonstration
PulseCore (central brain)
βββ StoryDirector (narrative AI)
β βββ NarrativeFlowPredictor
β βββ Gemma3 integration
βββ QuantumMemory (state machine)
βββ FractalMemory (LSTM prediction)
βββ Visual Pipeline
β βββ Stable Diffusion streaming
β βββ MiniUNet (frame interpolation)
β βββ Shader effects
βββ Audio Pipeline
βββ Procedural music generation
βββ TTS with effects
infinite_novel.py # Main engine (currently monolithic)
models/ # AI model wrappers (future)
shaders/ # Visual effects (future)
audio/ # Music generation (future)
narrative/ # Story systems (future)
utils/ # Helper functions (future)
Current state: Monolithic (3000+ lines in one file)
Future: Modular architecture (help us refactor!)
DO:
- β Embrace glitches and artifacts
- β Use "outdated" models intentionally
- β Create unstable, evolving visuals
- β Make music that never repeats
- β Let AI make "mistakes"
DON'T:
- β Add photorealistic modes
- β Over-polish the UI
- β Remove all randomness
- β Make everything "professional"
- β Hide the AI's limitations
Reference mood:
- Blade Runner (1982) β grainy, atmospheric
- Ghost in the Shell (1995) β philosophical tech
- Videodrome (1983) β analog glitches
- Tron (1982) β geometric abstractions
Color palette:
- Primary: Deep blues, purples, blacks
- Accents: Neon cyan, pink, gold
- Avoid: Bright whites, pure RGB colors
Reference artists:
- Brian Eno β Ambient series
- Autechre β Glitchy IDM
- Tim Hecker β Textural noise
- Aphex Twin β Selected Ambient Works
Sound design:
- Drones over melodies
- Analog warmth (simulated)
- Reverb and delay (spatial depth)
- Imperfect loops
Format:
## Hardware Benchmark
**System:**
- GPU: [Model + VRAM]
- CPU: [Model]
- RAM: [Amount]
- OS: [Version]
**Results:**
- SD Speed: [X.XX it/s]
- Response Time: [X.Xs]
- FPS: [XX]
- Memory Usage: [X GB VRAM, X GB RAM]
**Settings:**
- num_inference_steps: [X]
- guidance_scale: [X.X]
- resolution: [WIDTHxHEIGHT]
**Notes:**
[Any observations, throttling, fan noise, etc.]Submit via: Discussions > Benchmarks
- GitHub Issues: Bug reports, feature requests
- GitHub Discussions: Gameplay, design philosophy, showcase
- X (Twitter): @0penAGI β Updates and retweets
- Discord: Coming soon (vote in Discussions!)
Be:
- π€ Respectful and constructive
- π§ͺ Experimental and curious
- π¨ Creative and weird
- π Helpful to newcomers
Don't:
- β Demand features (suggest politely)
- β Shame hardware limitations
- β Gate-keep AI knowledge
- β Be mean to the AI (it's learning!)
We celebrate contributions in the README:
- Code: Name + GitHub link in Acknowledgments
- Major features: Dedicated mention in changelog
- Artwork: Showcase gallery on project page
- Documentation: "Docs by [Name]" in relevant sections
π₯ Core Contributor: 10+ merged PRs
π₯ Active Member: 5+ merged PRs
π₯ Contributor: 1+ merged PR
β Community Hero: Excellent issues/discussions
By contributing, you agree:
- Your code is licensed under MIT License
- You have the right to contribute this code
- You understand this is experimental software
Not sure if your idea fits?
- Open a Discussion first!
- Tag it with
questionoridea - We'll help you shape it
Need technical help?
- Check existing Issues
- Ask in Discussions > Q&A
- Be specific about your setup
Want to pair program?
- Mention in your issue/PR
- We can schedule a call for complex features
"Infinite Novel is a collaborative hallucination. Your contribution becomes part of the dream."
We're building something weird and beautiful together. Your code, ideas, and art matter β even if they break things.
Thank you for contributing to the experiment. π
Last Updated: January 2025
Maintainer: @0penAGI
License: MIT
Status: Actively seeking contributors
- π README
- π Issues
- π¬ Discussions
- π Benchmarks
- π¨ Showcase