Dark Bit Factory & Gravity

GENERAL => Challenges & Competitions => Topic started by: Deleter on July 12, 2006

Title: ASCIIVID
Post by: Deleter on July 12, 2006
Since you asked, here is mine. FYI, this plays in the console, so its limited to 16 colors that I can't change. The only thing I could have done better would have been to use either different characters (which my sub to do this didnt work so hot) or to use a character that is half on and use a different backcolor to achieve a sort of mixing

Download just the player and a sample video (http://fileanchor.com/41820-d)

Download the player, the video maker, and a sample video both compiled and uncompiled (raw bmps) 7.48 mb (http://www.deleter.phatcode.net/asciivid.rar)
Title: Re: ASCIIVID
Post by: Ghost^BHT on July 12, 2006
very cool :) Nice job  :cheers:
Title: Re: ASCIIVID
Post by: Jim on July 12, 2006
Thanks for posting! :cheers:

Is this freebasic?  I can't seem to get asciivid.bas to compile, it's complaining about 'Draw String fnt'.

I was trying to change this bit
Code: [Select]
        tmpPal=abs(f.c(2)-pal(tmp,0))+ _
               abs(f.c(1)-pal(tmp,1))+ _
               abs(f.c(0)-pal(tmp,2))
to
Code: [Select]

dr = f.c(2)-pal(tmp,0)
dg = f.c(1)-pal(tmp,1)
db = f.c(0)-pal(tmp,2)
tmpPal = dr*dr+dg*dg+db*db
so instead of adding the rgb differences together it uses Pythagoras to get a better idea of the difference.

You're right 16 colours is really tough, especially when the input is almost totally grey and there's only black and white in your palette.  The ascii characters 176,177,178 have stipple patterns of varying darkness (25%,50%,75%).  You can make lots more colours by using them and taking a weighted average of the foreground and background colours.

Jim
Title: Re: ASCIIVID
Post by: Clyde on July 12, 2006
Wow Deleter that is simply amazing, welldone dude.

@Jim/Deleter I did notice that line 31 of "ascvidplay.bas" had a missing quote at the end:     

Code: [Select]
print "could not open file

And adding a closing speech mark, it all worked hunky dori.

Cheers and all the best,
Clyde.
Title: Re: ASCIIVID
Post by: Tetra on July 12, 2006
Nice one Deleter
Title: Re: ASCIIVID
Post by: Shockwave on July 12, 2006
Really cool work for such a limited palette, nice one Deleter :)
Title: Re: ASCIIVID
Post by: Deleter on July 12, 2006
Wow Deleter that is simply amazing, welldone dude.

@Jim/Deleter I did notice that line 31 of "ascvidplay.bas" had a missing quote at the end:     

Code: [Select]
print "could not open file

And adding a closing speech mark, it all worked hunky dori.

Cheers and all the best,
Clyde.

yeah freebasic will add that for you, it was not intential. ;) thanks for the kind comments  and yeah I was aware of those ascii characters. I was thinking about doing something with them. Maybe I will grayscale the image or something and use those to get more greys.
Title: Re: ASCIIVID
Post by: Dad1916 on July 12, 2006
couldn't make our the video but the concept and execution is sweet.  O0 O0
Title: Re: ASCIIVID
Post by: Deleter on July 12, 2006
Ok did it. The result isn't too spectacular, but I think thats more because of my shoddy videos than of the program.

Download grayasciivid.rar (http://fileanchor.com/43584-d)

If you want to make your own video, you have to do several things.
1)Make the video
2)extract the video using a proggie (such as irfan view, which is free)
3)rename the frames 000 - ### (this is easy to do using irfan view, just do a batch rename)
4)put them all in a folder (with the name of what you want your video to be) in the directory of grayasciivid
5)open grayasciivid.bas
6)change the variable "vidname" to the name of your video
7)change head.frames to how many frames you have (should be ###+1)
8)If you have something other than 8 fps (dont go too much faster or it wont play at the right speed), change the constant "tbf" to be the number of seconds between frames (8 fps=.125)
9)Run the program all the way through, if you want, you can modify it so it doesnt wait and display the video and save time, its not that hard.
10)Thats all. I added drag and drop player functionality to grayasciividplay so you can just drop your video on to it.

good day.