Fire
Warming up with a 32 bytes fire effect for MSDOS after a few years break from the demoscene for studies and work.
Actually I tried to do this three years earlier but failed to go below 33 bytes. This intro is 31 bytes + 1 byte of padding just for fun.
Fire ?
This effect uses the classic technique:
Generating pseudo-random pixels at the base of the screen. For each pixel, average the current pixel and the three neighbours below it.
Ideally there should some decay too to make the flames disapear quicker but that was asking too much for 32 bytes.
Source code
; $
; $$
; $$$
; $ $$$$$$$
; $$$$$$$$$
; $$ $$$$ $$$$ $$
; $$$$$$ $$$$$
; $$$$ $$$$$$$
; $$$$$$$ $$$$$$
; $$$ $$$$$
; $$$$ $$$
; $$ $$
; $$ $$$
; $ $$
;
; 32bytes fire effect
; Mathieu 'P01' HENRI
; ___________________
; http://www.p01.org
; http://www.256b.com
.model tiny
.code
.386
org 100h
start:
mov al,13h
int 10h
mov bh,0a5h
mov es,bx
mov ds,bx
mainLoop:
xor byte ptr[bx],al
inc bl
lodsb
add al,al
add al,[si+319]
add al,[si]
shr al,2
or al,128
stosb
jmp mainLoop
db 3 ; lovely padding
end start
Feedback
Of course you can find this 32b Fire on Pouet.net.