README.md 3.55 KB
Newer Older
Gargaj's avatar
Gargaj committed
1
2
# Bonzomatic

Gargaj's avatar
Gargaj committed
3
[![Build status](https://ci.appveyor.com/api/projects/status/ix6fwi6nym1tu4e7?svg=true)](https://ci.appveyor.com/project/Gargaj/bonzomatic)
Gargaj's avatar
Gargaj committed
4
[![Build Status](https://travis-ci.org/Gargaj/Bonzomatic.svg)](https://travis-ci.org/Gargaj/Bonzomatic)
Gargaj's avatar
Gargaj committed
5
[![Beerpay](https://beerpay.io/Gargaj/Bonzomatic/badge.svg)](https://beerpay.io/Gargaj/Bonzomatic)
Gargaj's avatar
Gargaj committed
6

Gargaj's avatar
Gargaj committed
7
8
9
## What's this?
This is a live-coding tool, where you can write a 2D fragment/pixel shader while it is running in the background.

Gargaj's avatar
Gargaj committed
10
![Screenshot](http://i.imgur.com/8K8IztLl.jpg)
Gargaj's avatar
Gargaj committed
11

Gargaj's avatar
Gargaj committed
12
The tool was originally conceived and implemented after the Revision 2014 demoscene party's live coding competition where two contestants improv-code an effect in 25 minutes head-to-head: https://www.youtube.com/watch?v=-5P9rRUXaR0
Gargaj's avatar
Gargaj committed
13
14

## Keys
Gargaj's avatar
Gargaj committed
15
- F2: toggle texture preview
Gargaj's avatar
Gargaj committed
16
- F5 or Ctrl-R: recompile shader
Gargaj's avatar
Gargaj committed
17
18
19
- F11: hide shader overlay
- Alt-F4: exbobolate your planet

Gargaj's avatar
Gargaj committed
20
21
22
23
24
25
26
27
## Configuration
Create a ```config.json``` with e.g. the following contents: (all fields are optional)
``` javascript
{
  "font":{
    "file":"Input-Regular_(InputMono-Medium).ttf",
    "size":16,
  },
Gargaj's avatar
Gargaj committed
28
29
30
  "rendering":{
    "fftSmoothFactor": 0.9, // 0.0 means there's no smoothing at all, 1.0 means the FFT is completely smoothed flat
  },
Gargaj's avatar
Gargaj committed
31
32
33
34
  "textures":{ /* the keys below will become the shader variable names */
    "texChecker":"textures/checker.png",
    "texNoise":"textures/noise.png",
    "texTex1":"textures/tex1.jpg",
Gargaj's avatar
opos    
Gargaj committed
35
  },
Gargaj's avatar
Gargaj committed
36
37
  "gui":{
    "outputHeight": 200,
Gargaj's avatar
Gargaj committed
38
    "opacity": 192, // 255 means the editor occludes the effect completely, 0 means the editor is fully transparent
Gargaj's avatar
option    
Gargaj committed
39
    "texturePreviewWidth": 64,
40
41
42
    "spacesForTabs": false,
    "tabSize": 8,
    "visibleWhitespace": true,
Gargaj's avatar
Gargaj committed
43
44
45
  },
  "midi":{ /* the keys below will become the shader variable names, the values are the CC numbers */
    "fMidiKnob": 16, /* e.g. this would be CC#16, i.e. by default the leftmost knob on a nanoKONTROL 2 */
Gargaj's avatar
Gargaj committed
46
47
48
49
  }
}
```

Gargaj's avatar
Gargaj committed
50
## Building
Gargaj's avatar
Gargaj committed
51
52
As you can see you're gonna need [CMAKE](https://cmake.org/) for this, but don't worry, a lot of it is automated at this point.
* On Windows, use at least Visual C++ 2010, or 2013 if your 2010 install doesn't have MFC. For the DX9/DX11 builds, obviously you'll be needing a DirectX SDK, though a lot of it is already in the Windows 8.1 SDK as well.
Gargaj's avatar
Gargaj committed
53
54
* On Linux, you'll need ```xorg-dev```; after that ```cmake``` should take care of the rest.
* On OSX, ```cmake``` should take care of everything.
Gargaj's avatar
Gargaj committed
55

Gargaj's avatar
Gargaj committed
56
57
58
## Credits and acknowledgements
### Original / parent project authors
- "ScintillaGL" project by Mykhailo Parfeniuk (https://github.com/sopyer/ScintillaGL)
Gargaj's avatar
Gargaj committed
59
- Riverwash LiveCoding Tool by Michał Staniszewski and Michal Szymczyk (http://www.plastic-demo.org/)
Gargaj's avatar
Gargaj committed
60
61
62

### Libraries and other included software
- Scintilla editing component by the Scintilla Dev Team (http://www.scintilla.org/)
Gargaj's avatar
Gargaj committed
63
- OpenGL Extension Wrangler Library by Nigel Stewart (http://glew.sourceforge.net/)
Gargaj's avatar
Gargaj committed
64
65
- BASS.DLL by Ian Luck (http://www.un4seen.com/)
- STB Image and Truetype libraries by Sean Barrett (http://nothings.org/)
Gargaj's avatar
Gargaj committed
66
- GLFW by whoever made GLFW (http://www.glfw.org/faq.html)
Gargaj's avatar
Gargaj committed
67
- JSON++ by Hong Jiang (https://github.com/hjiang/jsonxx)
Gargaj's avatar
Gargaj committed
68
 
Gargaj's avatar
Gargaj committed
69
These software are available under their respective licenses.
Gargaj's avatar
Gargaj committed
70

71
The remainder of this project code was (mostly, I guess) written by Gargaj / Conspiracy and is public domain.
Gargaj's avatar
Gargaj committed
72
73

## Contact / discussion forum
Gargaj's avatar
Gargaj committed
74
If you have anything to say, do it at http://www.pouet.net/topic.php?which=9881 or [![Join the chat at https://gitter.im/Gargaj/Bonzomatic](https://badges.gitter.im/Gargaj/Bonzomatic.svg)](https://gitter.im/Gargaj/Bonzomatic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)