Giter Club home page Giter Club logo

leviathan-2.0's Introduction

Leviathan 2.0

Leviathan is a simple "framework" for developing small (around 1-8 kilobyte) Demoscene productions. It is primarily developed for creating the Prismbeings 4k Intros. "Intro" is parlance for a size-wise small Demo.

"Features"

  • Kept as simple as possible, made for productivity.
  • No external dependencies, instantly ready for development.
  • Readymade configurations for different use cases.
  • Automated shader minification upon compilation.
  • Simple unintrusive editor mode with seeking and hot reloading.
  • Easy to customize for your needs.

Compatibility

Current version intended to be used with Visual Studio 2017 (any version). Make sure you have a version with the latest Windows SDK installed (at least version 10.0.17134.0), or use version 8.1. With some extra configuration 2015 and 2013 should work as well. Leviathan is is very Windows-specific and isn't really sensibly portable anywhere else.

Components

Leviathan requires these componens to be installed with the Visual Studio configuration. Run the Visual Studio Installer to check you have at least these installed:

  • VC++ 2017 version 15.9 v14.16 latest v141 tools, or VC++ 2015.3 v14.00 (v140)
  • Windows 10 SDK (any version should be fine, Leviathan currently defaults to 10.0.17134.0, change as needed) or Windows 8.1 SDK
  • Windows Universal CRT SDK
  • Windows Universal C Runtime

Configurations

This section describes the different build configurations available from Visual Studio IDE

Heavy Release

Uses heavier Crinkler settings to squeeze out maximum compression (note though that the /VERYSLOW flag could sometimes backfire and produce a larger executable). Also doesn't do shader minification since it assumes the user is performing hand minifications to the .inl source, which would be overwritten by the Shader Minifier.

Release

Generally recommended for producing a final executable to be released. Uses moderate Crinkler settings.

Snapshot

Use for general development. Only minimal crinklering but nothing extra included. Useful still for keeping track of relative size changes. This configuration overwrites Release configuration binaries, but doesn't generate and overwrite crinkler report.

Debug

Deprecated, might work but currently not really useful and not updated. Editor covers everything in this configuration.

Editor

Creates a bigger exe similar to Debug, but with keyboard controls for pausing and seeking around temporally. Requires a pre-rendered copy of the audio track used (well, not a must but...). Overwrites Debug configuration binaries.

Build Flags

This section describes the preprocessor definitions available for various features and size optimizations.

OPENGL_DEBUG

Checks for shader compilation errors on initialization. Also enables to use the CHECK_ERRORS macro on debug.h. You want to leave this disabled in the final release obviously.

FULLSCREEN

Changes the display mode to fullscreen instead of a static window. You want to use this in your final release but probably not while developing and debugging. Disabling this saves around 20 bytes.

DESPERATE

Enabling this disables message handling, which isn't strictly necessary but makes running the intro much more reliable and compatible. Enabling this saves around 20 bytes.

BREAK_COMPATIBILITY

Enabling this uses a pixel format descriptor that uses parameters that are mostly zeroes. This improves the compressability at the cost of violating the API specifications. You might be able to run your intro currently, but might break in the future or on other peoples' configurations right now. Enabling this saves around 5 bytes.

POST_PASS

Enables using the OpenGL backbuffer as a framebuffer and texture to perform simple post processing or other functionality.

USE_MIPMAPS

Generates mipmaps for the backbuffer texture.

USE_AUDIO

Disabling this doesn't include or init 4klang at all.

NO_UNIFORMS

Enables using the gl_Color vertex attribute to pass variables to the shader instead of the usual uniform uploading. This saves one function import and around 10 bytes.

Contributing

Fork your own and submit a pull request, ideas always welcome. Please don't add any additional dependencies unless it's a single-file-header library or something similar, and non-GPL licensed. Inclusion of CMake or other such tools is also not considered.

TODO

  • Automatically render and dump audio in Editor mode if no .wav already exists.
  • Support for more softsynths?
  • Editor mode overlays (non-interactive seekbar, etc.).
  • More functionality to add further render passes easily.
  • Continue Structuring the code better so not everything is inlined in the main loop.
  • Write out a version in assembly to use in the Release configuration.

Acknowledgements

  • Rimina for initial motivation and OpenGL debug functions.
  • LJ for giving suggestions for some nice hacks.
  • Fizzer for help with implementing some of said hacks.
  • iq for the original 4k intro framework.
  • Mentor and Blueberry for Crinkler.
  • LLB for Shader Minifier. This fork is used in the framework: https://github.com/armak/Shader_Minifier.
  • Numerous people for various resources and information: auld, ps, cce, msqrt, ferris, yzi, las to name a few.

leviathan-2.0's People

Contributors

armak avatar

Watchers

 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.