Git Product home page Git Product logo

livecodingframework's Introduction

LiveCodingFramework

Live Coding Framework used at WeCan 2014 demoscene party. Githubbed for archive purposes only. Made by Michal Szymczyk (misz/plastic)


Live Coding Framework by misz/plastic


v0.91

  • added FFT integration and smoothing
  • added FFT history
  • extra options in config file - window dimensions and always on top option

v0.9


Some basic info about the tool

It consists of two elements: * liveCodingPreview - opengl window showing fullscreen quad with our fancy shader * liveCodingGlslCompiler - custom, offline glsl compiler, that can be plugged into visual studio build system

First, we start liveCodingPreview. Then we open shaders/compiler/shaders.sln in visual studio. This is a solution with one project that has build chain customized with our liveCodingGlslCompiler. All files with extension *.glsl will be handled by our custom compiler. Every time coder hits compile button (or Ctrl-F7) shader will be recompiled, and if compilation succeeds, our compiler will send compiled binary to the instance of liveCodingPreview. liveCodingPreview will reload shader and we will see changes.

Try using Run.bat macro. It will start both, liveCodingPreview.exe and Visual Studio with our solution. You may need to tweak path to devenv.exe to start it (Is there any envvar showing where devenv.exe sits?)

liveCodingPreview.exe expects one input argument, path to where whole 'liveCoding tool' file structure is located. Depending on how you run (debugger, bin/liveCodingPreview.exe, bat), it may require different setting.

There are two solutions for visual studio. One for each executable. This makes debugging comunication between two easier...

There are also two optional visual studio extensions that are very useful:

  • NShader - for syntax higlighting
  • VSColorOutput - for coloring text within output window (build system errors, warnings, etc...)

Whole liveCodingPreview has very simple setup, based on freeglut. OpenGL 4.3 at least required. There isn't much error checking, but I don't expect anyone to have problems with debugging it.

If you want to add other textures, place them in liveCodingRoot/textures directory and register them in liveCoding::setupShaderInputs function. There's also liveCoding::setShaderInputs for setting custom shader parameters.

One word about performance. When shaders get big (and we found that people don't care about writing optimal code during compo), compile times stop beeing negliable. That's why we decided to compile "on demand" instead of compiling "while typing". User will hit Ctrl-F7 eventually to check if shader is correct. We use that moment to reload preview. liveCodingGlslCompiler creates fake opengl contex to compile shader and then sends binary to liveCodingPreview to avoid extra compilation.

F2 toggles between windowed/fullscreen modes. In case you have multi monitor setup, drag window over desired display and then hit F2. It will go fullscreen on that particular monitor.

liveCodingPreview launches with 'splashScreen' shader that displays texture file "textures/splashScreen.png".

Only 24/32-bit png images are supported.

There's a config file 'config.cfg' located in root directory that remembers window position and fullscreen state from last session. Delete the file to restore defaults. There's special variable for selecting BASS input device called 'bassRecordDevice'. Set it to 0, 1, 2 (or -1 to let BASS decide). Default value for 'bassRecordDevice' is -1 in case it's not declared in config.cfg. liveCodingPreview lists all available recording devices on startup.

To exit, press Alt-F4 or click 'x' in right-top corner of the window. ESC is ignored to prevent closing application when someone hits it accidentaly while coding.

Enjoy!

livecodingframework's People

Contributors

bonzajplc avatar

Stargazers

 avatar Bojan Čoka avatar Adam Hill avatar Nicholas Meredith avatar  avatar  avatar  avatar Marek Bielawski avatar Nilay avatar  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.