Author Topic: ZParticle - Demo VI  (Read 17694 times)

0 Members and 1 Guest are viewing this topic.

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
ZParticle - Demo VI
« on: May 08, 2006 »
Starting on Demo VI now. Playing around with various ideas. Built a new scroller and a water effect for this one check it out.

http://www.scottshaver2000.com/blitz/demo6/demo6.exe

« Last Edit: May 10, 2006 by zparticle »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: ZParticle - Demo VI
« Reply #1 on: May 08, 2006 »
Now that is really looking very impressive indeed!

Great one Z! :D
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: ZParticle - Demo VI
« Reply #2 on: May 09, 2006 »
Nice water plasma type thing, it's looking good :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Ghost^BHT

  • Clueless and Happy
  • ^GVY
  • Pentium
  • ******
  • Posts: 931
  • Karma: 49
  • BYTE ME!
    • View Profile
Re: ZParticle - Demo VI
« Reply #3 on: May 09, 2006 »
Pretty nice start - hope to see something cool come out of this

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #4 on: May 10, 2006 »
« Last Edit: June 12, 2006 by zparticle »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: ZParticle - Demo VI
« Reply #5 on: May 10, 2006 »
Cool Fractals :D
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #6 on: May 10, 2006 »
« Last Edit: June 12, 2006 by zparticle »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: ZParticle - Demo VI
« Reply #7 on: May 10, 2006 »
I like fractals, I hope that you do something unusual with them in the finished demo because they can be really cool if used creatively. I liked the zoom.
Maybe a fractal fly through with a nice light blue colour palette?
Shockwave ^ Codigos
Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #8 on: May 10, 2006 »
Yeah not sure yet if I will use them. Just playing around with different ideas, thought I might try to do a sphere mapping of a fractal or something. That's probably a bit over me head though.  ;D

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: ZParticle - Demo VI
« Reply #9 on: May 10, 2006 »
Prefer the greyscale version myself, perhaps you could colour index it using the 0-255 grey shades and show with a custom 255 palette. And perhaps Alpha Blur it. Might look pretty sweet.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: ZParticle - Demo VI
« Reply #10 on: May 11, 2006 »
Cool fractals!!!

You could try doing what i did with the julia using this algo:

http://www.creativemagazine.com/science/Rings01/index.html

Here's a demo of it in FB:

http://rel.betterwebber.com/junk.php?id=33
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: ZParticle - Demo VI
« Reply #11 on: May 11, 2006 »
 :o Beautiful fractals Relsoft, props for including the source too.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #12 on: May 12, 2006 »
@relsoft: WOW! that Julia animation is beautiful!

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: ZParticle - Demo VI
« Reply #13 on: May 12, 2006 »
Thanks! But as you can see, the coloring algo wasn't mine. I just thought I could apply it to the julia because the mandel maps the julia. Prety cool algo to calculate color.  It's ironic that I haven't tried to apply it on the mandel itself and zoom. Maybe you could.  I llike your demos too.  The only problem is that I don't have Blitzmax. :*)


Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: ZParticle - Demo VI
« Reply #14 on: May 12, 2006 »
Nice stuff,  dudes  ;)
Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #15 on: May 16, 2006 »
Okay some more experimenting for this demo, this time plasma type stuff. There are 7 different variations on the plasma effect in this program and you can control various parameters at run time. For my life I can't get that wobbly effect everone else uses in their plasmas, guess I'm just dumb.  ;D

http://www.scottshaver2000.com/blitz/effects/plasma/plasma.exe


« Last Edit: June 12, 2006 by zparticle »

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: ZParticle - Demo VI
« Reply #16 on: May 16, 2006 »
Nice colors!!!

For the wobbly effect, it's not as hard as you might think.  Hre's my tute on the matter. :*)

http://petesqbsite.com/sections/zines/qbcm/issues/4-1/default.html#plasmas
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: ZParticle - Demo VI
« Reply #17 on: May 16, 2006 »
Very pretty colours Zparticle, and a great tut from Relsoft :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #18 on: May 16, 2006 »
new version up that should be faster, take less CPU and let's you go down to 1:1 scale

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: ZParticle - Demo VI
« Reply #19 on: May 16, 2006 »
Code: [Select]
Strict

Framework BRL.GlMax2D
Import BRL.System
Import BRL.Basic
Import BRL.Retro
Import BRL.Max2D
Graphics 640,480,32',60

Global scaleX:Float = 4
Global scaleY:Float = 4
Global angle:Float = 0
Global angleOff:Float = 4
Global plasma:Int = 1
Global factor:Float = 2

While Not KeyHit(KEY_ESCAPE)
Delay 20/scaleX
Cls

' space changes the effect
If KeyHit(KEY_SPACE)
plasma:+1
If plasma>7 Then plasma=1
Select plasma
Case 1
factor=2
Plasma1(factor)
Case 2
factor=2
Plasma2(factor)
Case 3
angle=0
factor=1
Plasma3(factor)
Case 4
angle=0
factor=1
Plasma4(factor)
Case 5
factor=2
Plasma5(factor)
Case 6
factor=2
Plasma6(factor)
Case 7
factor=2
Plasma7(factor)
End Select
End If

' up arrow increases scale
If KeyHit(KEY_UP)
scaleX:+1
scaleY:+1
' down arrow decreases scale
Else If KeyHit(KEY_DOWN) And scaleX>1
scaleX:-1
scaleY:-1
End If

' right arrow increases factor
If KeyDown(KEY_RIGHT)
factor:+.01
' left arrow decreases factor
Else If KeyDown(KEY_LEFT) And scaleX>1
factor:-.01
End If

Select plasma
Case 1
Plasma1(factor)
Case 2
Plasma2(factor)
Case 3
Plasma3(factor)
Case 4
Plasma4(factor)
Case 5
Plasma5(factor)
Case 6
Plasma6(factor)
Case 7
Plasma7(factor)
End Select
DrawStats()

Flip
angle:+angleOff
Wend
End

Function DrawStats()
SetScale(1,1)
SetColor(0,0,0)
DrawText("Â  Â  Â Plasma (Space): "+plasma,10,10)
DrawText("Â  Â Scale (Up/Down) : "+scaleX,10,25)
DrawText("Factor (Left/Right): "+factor,10,40)
SetColor(255,255,255)
DrawText("Â  Â  Â Plasma (Space): "+plasma,9,9)
DrawText("Â  Â Scale (Up/Down) : "+scaleX,9,24)
DrawText("Factor (Left/Right): "+factor,9,39)
End Function

Function Plasma1(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
' nice pulsing
Local sxf:Float = Sin(x*scaleX*factor)
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local rindex:Int = Abs(256*( sxf + syf + Sin(angle) ))
Local gindex:Int = Abs(256*( cyf + sxf + Cos(angle) ))
Local bindex:Int = Abs(256*( cyf + sxf ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma2(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
' cool
Local sxf:Float = Sin(x*scaleX*factor)
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local cxf:Float = Cos(x*scaleX*factor)
Local sa:Float = Sin(angle)
Local ca:Float = Cos(angle)
Local rindex:Int = Abs(256*( sxf + cyf + sa ))
Local gindex:Int = Abs(256*( syf + cxf + ca ))
Local bindex:Int = Abs(256*( ca + sa ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma3(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
' very cool
Local sxf:Float = Sin(x*scaleX*factor)
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local cxf:Float = Cos(x*scaleX*factor)
Local sa:Float = Sin(angle)
Local ca:Float = Cos(angle)
Local rindex:Int = Abs(256*( sxf + cyf + sa ))
Local gindex:Int = Abs(256*( syf + cxf + ca ))
Local bindex:Int = Abs(256*( ca + sa + cyf + sxf ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma4(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
Local sxf:Float = Sin(x*scaleX*factor)
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local cxf:Float = Cos(x*scaleX*factor)
Local sa:Float = Sin(angle)
Local ca:Float = Cos(angle)
Local rindex:Int = Abs(256*( sxf + cyf + Sin(angle/45*(x/2)) ))
Local gindex:Int = Abs(256*( syf + cxf + Cos(angle/45*(y/2)) ))
Local bindex:Int = Abs(256*( ca + sa ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma5(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local cxf:Float = Cos(x*scaleX*factor)
Local sa:Float = Sin(angle)
Local ca:Float = Cos(angle)
Local rindex:Int = Abs(256*( syf + sa ))
Local gindex:Int = Abs(256*( cyf + ca ))
Local bindex:Int = Abs(256*( cxf + sa ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma6(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
Local syf:Float = Sin(y*scaleY*factor)
Local cyf:Float = Cos(y*scaleY*factor)
Local rindex:Int = Abs(256*( cyf + Cos(angle*x/factor) ))
Local gindex:Int = Abs(256*( syf + Cos(angle*x/factor) ))
Local bindex:Int = Abs(256*( cyf + Cos(angle*x/factor) ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function Plasma7(factor:Float)
SetScale(scaleX,scaleY)
Local xlimit:Int = GraphicsWidth()/scaleX
Local ylimit:Int = GraphicsHeight()/scaleY
For Local x:Int = 0 To xlimit
For Local y:Int = 0 To ylimit
Local sxf:Float = Sin(x*scaleX*factor)
Local cxf:Float = Cos(x*scaleX*factor)
Local rindex:Int = Abs(256*( cxf + Cos(angle*y/factor) ))
Local gindex:Int = Abs(256*( sxf + Cos(angle*y/factor) ))
Local bindex:Int = Abs(256*( cxf + Cos(angle*y/factor) ))
SetColor rindex,gindex,bindex
ScaleDrawRect(x,y,1,1)
Next
Next
End Function

Function ScaleDrawRect(x:Int,y:Int,w:Int,h:Int)
Local sx:Float,sy:Float
GetScale(sx,sy)
DrawRect(sx*x,sy*y,w,h)
End Function