pouët.net

intro to the process of making a 4k

category: code [glöplog]
 
Has anyone ever written sort of a "making of" blow-by-blow account of creating a 4k, 1k, 64k or whatever with some level of technical detail?

I have some programmerish types who are interested in this sort of thing, but I struggle to explain to them, in detail, what goes on in the process of creating one of these magical things. I am specifically thinking about:

- how is a 4k structured in code (and how does this differ from a normal application)?
- What tricks are used to generate sound, effects and animation?
- How does tools like crinkler, 4klang/clinkster(?) etc factor in?
added on the 2013-10-24 11:35:33 by nic0 nic0
added on the 2013-10-24 11:41:27 by Puryx Puryx
pure fucking gold, thats exactly what they need :D (and adds to my own understanding as well)
added on the 2013-10-24 11:50:31 by nic0 nic0
Then again, you might not want to give them the idea that they _must_ make custom tools in order to produce their first 4k.
Many a young programmer has ventured into engine- and tool-coding never to be seen again.
Quote:
Many a young programmer has ventured into engine- and tool-coding never to be seen again.

amen.
added on the 2013-10-24 11:52:25 by ferris ferris
yes, there are defintely maner other approaches - also some stuff from iq: http://iquilezles.org/www/material/isystem1k4k/isystem1k4k.htm
added on the 2013-10-24 11:52:49 by Puryx Puryx
but, yeah, the article puryx mentioned is pretty rad
added on the 2013-10-24 11:52:51 by ferris ferris
maner=many
added on the 2013-10-24 11:53:08 by Puryx Puryx
But engines and tools are so cool!
added on the 2013-10-24 11:55:58 by msqrt msqrt
I've done a writeup of how i made white one, a 4k and my first prod (which won tUM 4k in 2010). It's both technical and personal in some way. Almost no custom tools were used.
Read it here
added on the 2013-10-24 12:18:23 by cupe cupe
How it worked for me:


  • make some audio + fx
  • put early version executable into an exe compressor
  • realise it's <2kb, decide to make a 4k
added on the 2013-10-24 12:23:26 by psonice psonice
added on the 2013-10-24 12:27:35 by bonefish bonefish
Quote:
Many a young programmer has ventured into engine- and tool-coding never to be seen again.


Words of wisdom.
added on the 2013-10-24 13:21:06 by Zavie Zavie
added on the 2013-10-24 13:37:36 by p01 p01
added on the 2013-10-24 19:36:05 by las las
thanks a ton guys! learning something myself as well, so thats all good. Since you are all my idols, your input is valuable :)
added on the 2013-10-24 19:45:32 by nic0 nic0
or perhaps: http://zine.bitfellas.org/article.php?zine=14&id=24

Basically, I guess, you could say that making a 1k/4k, would be like breaking every rule about coding ever made :)

It's about cheating, making things happen, more that about making pretty code or making it the "right" way.
added on the 2013-10-24 19:57:33 by maytz maytz
and p01 blahhh'ed me.
added on the 2013-10-24 19:58:13 by maytz maytz
Yeah, coding anti-style is important.

Make it as cheap as possible. Use global variables. Never ever write any deinit/cleanup code, the OS is good enough at this. Install a macro that instantly deletes the whole source file when you press the keys C, L, A, S and S in sequence. Write plain procedural code in C++ because it potentially optimizes better than C. If you make API calls, try setting all parameters that you don't really need to 0 instead of whatever default would be the most sensible in "real" code, or leave them out and see if it still works. BUT: Everything that doesn't survive the compilation process becomes more important. Make your variable names as clear as possible. Comment the shit out of any hack you type into the code.

Also, remember that you need to disable whatever runtime comes with your language/platform of choice. No libc, no STL, all you get is plain C pointers/arrays and the operating system's API. The exception are all the intrinsics that your compiler offers you - much of the stuff in math.h and string.h gets compiled to a single assembly instruction when the compiler settings are right. The links above should potentially lead you to some code that sets up the stuff correctly.

Apart from that: Yeah, use Crinkler and a 4K synth such as 4Klang or Clinkster from the get go, and also using eg. iq's 1K/4K framework is no shame. It's how it looks/sounds like in the end that's most important.
added on the 2013-10-24 22:03:35 by kb_ kb_
I've been (very slowly) writing a series of articles on how to make a 1k/4k for Linux. In Russian only, sorry, but you still can look at the code and screenshots: part1, part2, part4.
added on the 2013-10-25 06:19:13 by provod provod
Extra hint: Use static allocation almost everywhere. Reserving hundreds of MB directly in the
binary is basically free, and best of all: already initialized to 0!
added on the 2013-10-25 23:35:11 by T$ T$
If you go the assembly only way:
I suspect a certain consistent "style" really helps to get crinkler to compress your stuff well over the whole development process. Changing instruction order and applying magic things is IMHO only useful at the end of the development process when you have to kill of the last 100 bytes. Of course you can/should play around with that over the whole process to accumulate options, but since your compression rate is affected by all the things, you save yourself a lot of time by doing the code reordering at the end.
added on the 2013-10-26 13:44:19 by las las
funny (yet quite obvious) fact: larger original binaries due to duplicated code can actually be smaller after crinklering than code stuffed into loops or functions
added on the 2013-10-26 18:23:32 by T$ T$
FWIW, I started my modern small intro making after attending Revision 2012. I went to www.google.com and typed (literally) "how to make 4k intros" in the search box. In a very short time I learned about Crinkler, 4klang, the pouet.net "raymarching beginner's thread" and iq's intro framework. Before that, I hadn't really been following the modern Windows demo coding scene very much. After the introduction of 3d accelerators about the year 2000 or so, I had thought the whole demo scene thing had turned to uninteresting crap, so I stopped following. But after that 10+ year period of boring shit there's this shader programming thing, which made it interesting and fun again. I made the compofiller intro "My first GLSL raymarcher" 4k intro using the only Windows laptop I had access to, which didn't even have a real GPU, so everything was soft-rendered in a 320x200 window while debugging. At the party place I saw it on a real GPU for the first time (the compo pc, GTX 560 Ti or something), and I was totally blown away by the awesome fullscreen 60fps rendering.

TL;DR: go to Google.com and type what you want.
added on the 2013-10-26 18:40:19 by yzi yzi

login