Author Topic: ASCIIVID  (Read 2916 times)

0 Members and 1 Guest are viewing this topic.

Offline Deleter

  • C= 64
  • **
  • Posts: 72
  • Karma: 11
    • View Profile
    • Deleter's Rants
ASCIIVID
« 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

Download the player, the video maker, and a sample video both compiled and uncompiled (raw bmps) 7.48 mb

Offline Ghost^BHT

  • Clueless and Happy
  • ^GVY
  • Pentium
  • ******
  • Posts: 931
  • Karma: 49
  • BYTE ME!
    • View Profile
Re: ASCIIVID
« Reply #1 on: July 12, 2006 »
very cool :) Nice job  :cheers:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: ASCIIVID
« Reply #2 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
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: ASCIIVID
« Reply #3 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.
« Last Edit: July 12, 2006 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Tetra

  • DBF Aficionado
  • ******
  • Posts: 2532
  • Karma: 83
  • Pirate Monkey!
    • View Profile
Re: ASCIIVID
« Reply #4 on: July 12, 2006 »
Nice one Deleter
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: ASCIIVID
« Reply #5 on: July 12, 2006 »
Really cool work for such a limited palette, nice one Deleter :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Deleter

  • C= 64
  • **
  • Posts: 72
  • Karma: 11
    • View Profile
    • Deleter's Rants
Re: ASCIIVID
« Reply #6 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.

Offline Dad1916

  • Atari ST
  • ***
  • Posts: 110
  • Karma: 3
    • View Profile
    • Quadriga demo group
Re: ASCIIVID
« Reply #7 on: July 12, 2006 »
couldn't make our the video but the concept and execution is sweet.  O0 O0

Offline Deleter

  • C= 64
  • **
  • Posts: 72
  • Karma: 11
    • View Profile
    • Deleter's Rants
Re: ASCIIVID
« Reply #8 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

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.