Author Topic: Short Intro Challenge Keftales.  (Read 4031 times)

0 Members and 1 Guest are viewing this topic.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Short Intro Challenge Keftales.
« on: June 11, 2006 »
I had a line to spare so I added windowed mode so I could display the credits in the title bar :p

This effect is using the classic Keftales formula, I've added some attractive copper stlye colours, animated the colours, moved them around and done a real time zoom on it too.

Hope you like it :)

Code: [Select]
#DEFINE PTC_WIN
 #Include Once "tinyptc.bi"
 If( ptc_open( "DBF ZOOMING AND MOVING KEFTALES BY SHOCKWAVE^DBF *IN 20 LINES* ESC EXIT", 640, 480 ) = 0 ) Then End
 dim shared buffer(640*480) as integer
 dim shared as double zf
 dim shared as integer mvx,mvy,gadd,gadd2,x,y
 do             
    gadd=gadd+3
    gadd2=gadd2+20
    zf=.011+(.01*sin(gadd/191))
    mvx=499*sin(gadd/153)
    mvy=499*cos(gadd/131)
    for y=0 to 479       
    for x=0 to 640
        pwr=120+119*sin((((x+mvx)*(y+mvy))+gadd2) * zf)         
        buffer(x+(y*640))=rgb(pwr,pwr*y shr 9, pwr * y *culp)
    next
    next
 ptc_update@buffer(0)
 loop until inkey$<>""
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Tetra

  • DBF Aficionado
  • ******
  • Posts: 2532
  • Karma: 83
  • Pirate Monkey!
    • View Profile
Re: Short Intro Challenge Keftales.
« Reply #1 on: June 11, 2006 »
 8) Nice going :) you managed to cram a lot of stuff into that one, particularly like the range of colors on the screen
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: Short Intro Challenge Keftales.
« Reply #2 on: June 11, 2006 »
It's really cool what can be done in 20 lines :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2723
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: Short Intro Challenge Keftales.
« Reply #3 on: June 11, 2006 »
Really cool   8)
Challenge Trophies Won:

Offline Optimus

  • DBF Aficionado
  • ******
  • Posts: 2452
  • Karma: 128
    • View Profile
    • Optimouse Demo Site
Re: Short Intro Challenge Keftales.
« Reply #4 on: June 11, 2006 »
Heh,. keftales ;)
I like very much the colors.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: Short Intro Challenge Keftales.
« Reply #5 on: June 12, 2006 »
Cheers Optimus :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4380
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Short Intro Challenge Keftales.
« Reply #6 on: October 28, 2011 »
...
Code: [Select]
...
        buffer(x+(y*640))=rgb(pwr,pwr*y shr 9, pwr * y *culp)
...

Sorry for bringing this topic up, but I currently try to fork code to add some more examples to TinyC5. Since I do not know Freebasic, what is the meaning of the culp multiplier ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline neriakX

  • Atari ST
  • ***
  • Posts: 115
  • Karma: 29
  • CodeNoob
    • View Profile
Re: Short Intro Challenge Keftales.
« Reply #7 on: October 28, 2011 »
unbelievable ... 20 lines. it's looking very nice! k++ for the source :)
cheers,
neriakX

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: Short Intro Challenge Keftales.
« Reply #8 on: October 29, 2011 »
Sorry Benny, it's old code!
That variable doesn't seem to do anything.. I've just forgotten to take it out :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: Short Intro Challenge Keftales.
« Reply #9 on: October 29, 2011 »
That variable doesn't seem to do anything.. I've just forgotten to take it out :)

I do that all the time - often I'll build something on top of an older program, which itself was recycled, and before I know it I've got lines from a program I made 5 years ago lurking in new code :o
You are our 9001st visitor.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4380
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Short Intro Challenge Keftales.
« Reply #10 on: October 29, 2011 »
Sorry Benny, it's old code!
That variable doesn't seem to do anything.. I've just forgotten to take it out :)

Alright, no worries. I just wanted to convert the code to javascript and don't wanted to make a mistake. Hope you don't mind if I use that code (credits are of course give to you).
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: Short Intro Challenge Keftales.
« Reply #11 on: October 29, 2011 »
What is a keftale anyway? I googled and just found an old Kefren's demo :)
raizor

Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: Short Intro Challenge Keftales.
« Reply #12 on: November 10, 2011 »
What is a keftale anyway? I googled and just found an old Kefren's demo :)

This.
Challenge Trophies Won: