Home
Admin | Edit

Chmmr - TIC-80 256 bytes

link

First TIC-80 code golf program written in JavaScript, with simple sound, a 256 bytes combo, both binary and code (without comments) is 256 bytes.

Was playing with harmonic oscillators at the time which i ported to the TIC-80 platform, i worked a bit on it until i was satisfied with the colors and 'composition' which remind me of console video-games such as Metroid.

The algorithm produce autonomous art with Euler spiral patterns.

The background sound is very low level, i struggled to fit interesting sound in 256 bytes so it sounds likes some ambient lofi NES like buzzing.

Made two versions, the original party version had two mistakes which were fixed later on; a slightly different palette because of a mistake given to the binary packing tool and the usage of time() function so the result was different for each runs.

// title:Chmmr
// author:grz
// desc:256b for flash party 2021
// script:js
m=Math
x=[5,3,8,0,9]
y=[4,1,7,9,1]
s=0
p=0
cls(0)
TIC={f(){p+=0.02
s+=p
for(i=2e3;i--;){q=i%5
l=0.5-q/5
x[q]+=m.cos(s*s**l)/2e4
y[q]-=m.sin(s*s**l)/2e4
pix(x[q]*240&255,(y[q]*136+64)&127,1+q-p*3%5)
poke(65445+(i&63),i+p<<1&32)}}}.f

Versions

party version (different results each runs)

non default palette test (took extra bytes i guess ?)

back to topLicence Creative Commons