Hacker News new | ask | show | jobs
by loveJesus 2262 days ago
Praise the Lord, I found https://in4k.github.io/wiki/win32 to have useful links. Particularly Compofiller studio is quite easy to get started with and rather well done. To make a final compressed executable takes a couple of steps, where you have to switch the mode and minify the shader code which is on the Compofiller UI before creating the executable. If you can do some coding on shadertoy.com it is rather easy to transfer to a production here.

For the music, a suggestion would be to download the free version of renoise.com which is full featured and works fine for making demos. It is a good piece of software and worth the amount they ask for the full version if you can do it too i think. And then download the http://4klang.untergrund.net/ 4klang vst and use it with Renoise. You set up multiple instruments that link to the same instance of the VST instead of multiple instances of the VST and use different channels for each instrument (basically use the version that shows up top after you create one instance) and you can start by loading one of the preset patches included with 4klang. You record the songs in the 4klang vst and then put the generated files in the compofiller studio project directory and once it recompiles it has your new song.

I played around with this for the release i helped make for revision 2020 ( https://www.pouet.net/prod.php?which=85364 glsl source included ) Glory to Jesus, After this you can go lower level with the other 4k tutorials learning how to integrate with other assemblers or perhaps C++ compilers including Visual Studio community edition. It is possible to make even 4ks in C. If you want to get started in assembler i would recommend starting with the 256byte intros in a freedos installation. While I included source code in a 256byte that was presented at revision, i would start out with other tutorials.

Start out by researching some basic instructions to be able to set memory in a loop to a pointer in es:di. The basic instructions to set memory and registers, increment, compare, jump. Look a little bit into interrupts to be able to detect a keypress, or set graphics mode with 256 colors.

So for a freedos program you can do this with "mov ax, 13h; int 10h;" at the beginning of the program, set a label for the frame_loop_aleluya, then a label for the pixel_loop_aleluya (praising God in my code makes it more enjoyable) write to 0xA0000 for 320*200 bytes in the pixel_loop then detecting if a keypress has been made with "mov ah, 1;int 16h;jz frame_loop_aleluya" and then back to text mode "mov ax, 3h; int 10h" at the end of your program with ret. You can play around with that to make your first own little asm intro. Compile it with nasm to a .com. This is included in freedos.There is a little more boilerplate that goes into a .com as well, put "BITS 16; org 100h; section .text;" and a start: label . This works if you have no memory variables of your own, which is fine for a first step.

Sorry, this is my first hacker news comment so i will see how this looks and make corrections if needed, and post a small full sample program as a reply. God guide us and bless you in Jesus name

2 comments

Praise the Lord! https://gist.github.com/loveJesus/29b85c3d8d6f4fa5cc85d4f33c... is a verbosely commented simple intro that compiles to 44 bytes. The source is just over the length where I think it would be better to visit the link than post it directly. If someone else could tell me their thoughts on proper protocol here i appreciate it. God guide us and bless you in Jesus Holy name
Perhaps you could also make a YouTube video showing what the intro does, installing Freedos and nasm is not that simple.
May I recommend to add some breaks into your text for easier reading. You have to insert an empty line for it to work. (Press return not just once but twice.)
God be praised, thanks!