Difference between revisions of "4K Intro"
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | This category is dedicated to 4K | + | This category is dedicated to modern 4K Intro development for Windows/Win32, which consist of a small OpenGL/D3D/DX Framework, a softsynth and 1 or more pixelshaders. |
− | Windows 4K Intros | + | Most Windows 4K Intros will be setup using C, sometimes in combination with assembler, or in some cases pure assembler. In general writing everything in assembler should give you a little more freedom in pushing/popping your function arguments and register usage.languages. |
− | In general writing everything in assembler should give you a little more freedom in pushing/popping your function arguments and register usage | ||
− | Graphics are usualy done using OpenGL / GLSL | + | Graphics are usualy done using OpenGL / GLSL or Direct3D/DX11. |
=== Tools === | === Tools === | ||
Line 12: | Line 11: | ||
* Crinkler or other external packer for compression | * Crinkler or other external packer for compression | ||
* Shader minifier | * Shader minifier | ||
+ | * Optional: Local/Online GLSL Shader editing environment (e.g. Shadertoy, Kodelife, bonzo, etc.) | ||
+ | * Optional: Timeline/Camera tooling | ||
+ | * Optional: gnuRocket for timing. | ||
* Optional / Alternatively: NASM Assembler | * Optional / Alternatively: NASM Assembler | ||
− | |||
Line 20: | Line 21: | ||
* How much size budget do you want to allocate to render pipeline, sound, scene building, (post)shading, progression? | * How much size budget do you want to allocate to render pipeline, sound, scene building, (post)shading, progression? | ||
− | * Abstract vs scene- | + | * Abstract vs organic vs scene/world-building |
+ | * Single scene vs multiple scenes | ||
* Ray-Intersections or Ray Marching | * Ray-Intersections or Ray Marching | ||
* What kind of softsynth to use | * What kind of softsynth to use | ||
− | * Render pipeline - Single or multi (post)shader, | + | * Render pipeline - Single or multi (post)shader. |
+ | * Scene, Camera and progression handling | ||
* Text - Do you want to include text and if so: Are you using WindowsGlyphs texture or SDF | * Text - Do you want to include text and if so: Are you using WindowsGlyphs texture or SDF | ||
− | |||
== Setup == | == Setup == |
Revision as of 14:01, 13 April 2024
Contents
Introduction
This category is dedicated to modern 4K Intro development for Windows/Win32, which consist of a small OpenGL/D3D/DX Framework, a softsynth and 1 or more pixelshaders.
Most Windows 4K Intros will be setup using C, sometimes in combination with assembler, or in some cases pure assembler. In general writing everything in assembler should give you a little more freedom in pushing/popping your function arguments and register usage.languages.
Graphics are usualy done using OpenGL / GLSL or Direct3D/DX11.
Tools
There are a couple of options for tools, but generally these tools are often used
- Visual Studio / Vscode / GCC Compiler
- Crinkler or other external packer for compression
- Shader minifier
- Optional: Local/Online GLSL Shader editing environment (e.g. Shadertoy, Kodelife, bonzo, etc.)
- Optional: Timeline/Camera tooling
- Optional: gnuRocket for timing.
- Optional / Alternatively: NASM Assembler
Intro design
When designing a 4k intro, it is best practice to consider each of the following aspects seperately:
- How much size budget do you want to allocate to render pipeline, sound, scene building, (post)shading, progression?
- Abstract vs organic vs scene/world-building
- Single scene vs multiple scenes
- Ray-Intersections or Ray Marching
- What kind of softsynth to use
- Render pipeline - Single or multi (post)shader.
- Scene, Camera and progression handling
- Text - Do you want to include text and if so: Are you using WindowsGlyphs texture or SDF
Setup
A 4k framework / intro can be setup in either C or Assembler, or a combination of both.
Graphics
- Setting up a OpenGL Window
- Initialising GLSL Shader
Sound
- Softsynth - Sointu ( https://github.com/vsariola/sointu/ )
- Softsynth - 4klang ( http://4klang.untergrund.net/ )
- Softsynth - Oidos ( https://github.com/askeksa/Oidos )
- Softsynth - Clinkster ( https://demozoo.org/productions/96592/ )
- GLSL Softsynth
- Win32 MIDI
Compression
Crinkler is the most commonly used compression at the moment for 4K intros. It maximizes compression by taking over the linking process, setting up the windows header for you and if needed re-arrange the different segments of the code.
Crinkler reports
When using the /REPORT:intro_report.html
feature, crinkler will generate a report and heatmap for your intro binary.
This is helpful to see how well your (shader)code compresses and where you can maybe gain a few more bytes.
Word about the resulting executable
Please note that when using crinkler in TINYHEADER mode, the resulting windows header will most likely trigger virus scanners / Microsoft Defender and mark it as suspicious content, which is a side-effect in recent years. Just exclude your work directory from this scan during development. Compo machines will run without these scanners too, but it is good practice to include a (slightly larger) safe version too in the final archive.
Frameworks
- Leviathan 2.0
- IQ's 1k/4k frameworks
- Psycho's 1k/4k framework
- Compofiller studio
- Minimal gl framework