### Author Topic: ASCII Plasma + floormapper (QB45 code but runs on XP)  (Read 10027 times)

0 Members and 1 Guest are viewing this topic.

#### relsoft

• Posts: 3303
• Karma: 47
##### ASCII Plasma + floormapper (QB45 code but runs on XP)
« on: July 09, 2006 »
Press ALT+Enter when theprog runs ;*)

Code: [Select]
`'I am crazy!!!'Plasma and Floormapper in TextMode!!!'Relsoft 2003DECLARE SUB BlobsTxt (Intensity%)DECLARE SUB DrawBlob (bx%, by%)DECLARE SUB Mode7Text (sx%, sy%, sz%, horz%)DEFINT A-ZRANDOMIZE TIMERCLSSCREEN 0WIDTH 80, 50CONST PI = 3.14151693#CONST FALSE = 0, TRUE = NOT FALSEDIM SHARED Lsin1%(-1024 TO 1024)DIM SHARED Lsin2%(-1024 TO 1024)DIM SHARED Lsin3%(-1024 TO 1024)DIM SHARED Lsin!(-10 TO 370)DIM SHARED Lcos!(-10 TO 370)Â  Â  Â  Â  FOR i% = -1024 TO 1024Â  Â  Â  Â  Lsin1%(i%) = SIN(i% / (16)) * 16Â  Â  Â  Â  Lsin2%(i%) = SIN(i% / (32)) * 64Â  Â  Â  Â  Lsin3%(i%) = SIN(i% / (32)) * 8Â  Â  NEXT i%Â  Â  j! = 255 / 360 * 2Â  Â  k! = 255 / 360 * 8Â  Â  l! = 255 / 360 * 4Â  Â  FOR i% = 0 TO 255Â  Â  Â  Â  m% = INT(a!)Â  Â  Â  Â  n% = INT(b!)Â  Â  Â  Â  o% = INT(c!)Â  Â  Â  Â  r% = 63 * ABS(SIN(m% * PI / 180))Â  Â  Â  Â  g% = 63 * ABS(SIN(n% * PI / 180))Â  Â  Â  Â  b% = 63 * ABS(SIN(o% * PI / 180))Â  Â  Â  Â  a! = a! + j!Â  Â  Â  Â  b! = b! + k!Â  Â  Â  Â  c! = c! + l!Â  Â  Â  Â  OUT &H3C8, i%Â  Â  Â  Â  OUT &H3C9, r%Â  Â  Â  Â  OUT &H3C9, g%Â  Â  Â  Â  OUT &H3C9, b%Â  Â  NEXTDir% = 1DEF SEG = &HB800DOÂ  Â  counter& = (counter& + Dir%)Â  Â  IF counter& > 600 THEN Dir% = -Dir%Â  Â  IF counter& < -600 THEN Dir% = -Dir%Â  Â  offset% = 0Â  Â  FOR y% = 1 TO 50Â  Â  Â  Â  FOR x% = 1 TO 80Â  Â  Â  Â  Â  Â  c% = Lsin3%(x%) + Lsin1%(x% + counter&) + Lsin2%(y% + counter&)Â  Â  Â  Â  Â  Â  c% = c% + Lsin3%(c%) + Lsin1%(c% + counter&) + Lsin2%(counter& - y% + x%)Â  Â  Â  Â  Â  Â  POKE offset%, 177 + (c% AND 1)Â  Â  Â  Â  Â  Â  POKE offset% + 1, c% AND 15Â  Â  Â  Â  Â  Â  offset% = offset% + 2Â  Â  Â  Â  NEXT x%Â  Â  NEXT y%Â  Â  WAIT &H3DA, 8LOOP UNTIL INKEY\$ <> ""CLShorz% = 10sx% = 30sy% = 30sz% = 40Mode7Text sx%, sy%, sz%, horz%ENDSUB Mode7Text (sx%, sy%, sz%, horz%)'256*126 = 32256'((256*126)+4)\2 =16130'256*8 =2048'32256\2=16128FOR i% = 0 TO 359Â  Â  RA! = i% * (3.141593 / 180)Â  Â  Lcos!(i%) = COS(RA!)Â  Â  Lsin!(i%) = SIN(RA!)NEXT i%Â  Â  FOR i% = -1024 TO 1024Â  Â  Â  Â  Lsin1%(i%) = SIN(i% / (16)) * 32Â  Â  Â  Â  Lsin2%(i%) = SIN(i% / (32)) * 16Â  Â  Â  Â  Lsin3%(i%) = SIN(i% / (32)) * 32Â  Â  NEXT i%Â  Â  j! = 255 / 360 * 8Â  Â  k! = 255 / 360 * 8Â  Â  l! = 255 / 360 * 16Â  Â  FOR i% = 0 TO 255Â  Â  Â  Â  m% = INT(a!)Â  Â  Â  Â  n% = INT(b!)Â  Â  Â  Â  o% = INT(c!)Â  Â  Â  Â  r% = 63 * ABS(SIN(m% * PI / 180))Â  Â  Â  Â  g% = 63 * ABS(SIN(n% * PI / 180))Â  Â  Â  Â  b% = 63 * ABS(SIN(o% * PI / 180))Â  Â  Â  Â  a! = a! + j!Â  Â  Â  Â  b! = b! + k!Â  Â  Â  Â  c! = c! + l!Â  Â  Â  Â  OUT &H3C8, i%Â  Â  Â  Â  OUT &H3C9, r%Â  Â  Â  Â  OUT &H3C9, g%Â  Â  Â  Â  OUT &H3C9, b%Â  Â  NEXTSpaceZ! = sz%ScaleY! = sy%ScaleX! = sx%Horizon% = horz%countdir% = 1counter% = 50t# = TIMERDOÂ  Â  F& = (F& + 1) AND &H7FFFFFFFÂ  Â  counter% = (counter% + countdir%)Â  Â  IF counter% < 2 THENÂ  Â  Â  Â  countdir% = -countdir%Â  Â  ELSEIF counter% > 700 THENÂ  Â  Â  Â  countdir% = -countdir%Â  Â  END IFÂ  Â  pd% = (pd% + 1) AND 1023Â  Â  ci% = (ci% + 1) AND (3)Â  Â  px% = SIN(ci% / counter%) * 4Â  Â  py% = COS(ci% / counter%) * 8Â  Â  Angle = (Angle + 1) MOD 359Â  Â  xv! = Lcos!(Angle)Â  Â  yv! = Lsin!(Angle)Â  Â  offset% = (80 * 4)Â  Â  FOR ya% = 4 TO 50Â  Â  Â  Â  Â  Â  Distance! = (SpaceZ! * ScaleY!) / (ya% + Horizon%)Â  Â  Â  Â  Â  Â  HorizScale! = (Distance! / ScaleX!)Â  Â  Â  Â  Â  Â  LineDX! = (-yv! * HorizScale!)Â  Â  Â  Â  Â  Â  LineDy! = (xv! * HorizScale!)Â  Â  Â  Â  Â  Â  SpaceX! = ((Distance! * xv!)) - (40 * LineDX!)Â  Â  Â  Â  Â  Â  SpaceY! = ((Distance! * yv!)) - (25 * LineDy!)Â  Â  Â  Â  Â  Â  ldx& = LineDX! * 1024Â  Â  Â  Â  Â  Â  ldy& = LineDy! * 1024Â  Â  Â  Â  Â  Â  sx& = SpaceX! * 1024Â  Â  Â  Â  Â  Â  sy& = SpaceY! * 1024Â  Â  Â  Â  Â  Â  pxysin% = Lsin3%(px% + py%)Â  Â  FOR xa% = 1 TO 80Â  Â  Â  Â  Â  Â  xx% = sx& \ 1024' + (pd%)Â  Â  Â  Â  Â  Â  yy% = sy& \ 1024' + (pd%)Â  Â  Â  Â  Â  Â  c% = Lsin1%(xx% + px%) + Lsin2%(yy% + py%) + pxysin%Â  Â  Â  Â  Â  Â  c% = Lsin2%(xx% - counter%) + Lsin3%(Lsin1%(yy% - counter%) - Lsin3%(xx% - counter% - c%))Â  Â  Â  Â  Â  Â  POKE offset%, 177 + (c% AND 1)Â  Â  Â  Â  Â  Â  POKE offset% + 1, c% AND 15Â  Â  Â  Â  Â  Â  offset% = offset% + 2Â  Â  Â  Â  Â  Â  sx& = sx& + ldx&Â  Â  Â  Â  Â  Â  sy& = sy& + ldy&Â  Â  NEXT xa%Â  Â  NEXT ya%Â  Â  WAIT &H3DA, 8LOOP UNTIL INKEY\$ <> ""END SUB`
Exe in attachment.....
« Last Edit: July 11, 2006 by relsoft »
Challenge Trophies Won:

#### Ghost^BHT

• Clueless and Happy
• ^GVY
• Pentium
• Posts: 931
• Karma: 49
• BYTE ME!
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #1 on: July 09, 2006 »
Man, the colors sux but the code is cool

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #2 on: July 09, 2006 »
The colours are probably like that because of the screen mode.
Nice one Rel
Shockwave ^ Codigos
Challenge Trophies Won:

#### Optimus

• Posts: 2452
• Karma: 128
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #3 on: July 09, 2006 »
The floor mapper looks really cool! The plasma goes a bit too fast for the char resolution. Nice colors!

So,. is ANSI also accepted on the competition? Normally, ASCII means monochrome characters and ANSI is the VGA chars with colors. At the beginning by reading that the compo is ASCII I thought I should be restricted to the ASCII mode, but if I can also do something in ANSI then cool! There is a diferrence between ASCII and ANSI. Maybe you can refer that ANSI is also allowed to the compo thread so that we know?
Challenge Trophies Won:

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #4 on: July 09, 2006 »
Yes, by all means use ansi.
The theme of the comp is to create effects from characters, whether they are monochrome or if they use any screen palette, whether they just use the standard ascii set or any extended characters is cool, just have at it and see what you can do!
Shockwave ^ Codigos
Challenge Trophies Won:

#### Optimus

• Posts: 2452
• Karma: 128
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #5 on: July 09, 2006 »
Ok, cool! That's fine for me..

Actually, I know some people from Pouet who would start bitching like hell about the diferrence of ASCII and ANSI
Challenge Trophies Won:

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #6 on: July 09, 2006 »
So do I
Gladly we don't have too much bitching here, just lots of happy coding!
I've seen previews of the winners banners that Wham is drawing for this comp and they look great btw!
Shockwave ^ Codigos
Challenge Trophies Won:

#### Clyde

• A Little Fuzzy Wuzzy
• Posts: 7271
• Karma: 71
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #7 on: July 09, 2006 »
It's pretty quick is that. Is the Plasma the texture used on the floormapper, as it was so fast I may of missed the 2 if they were seperate.

Welldone dude,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

#### relsoft

• Posts: 3303
• Karma: 47
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #8 on: July 10, 2006 »
It's pretty quick is that. Is the Plasma the texture used on the floormapper, as it was so fast I may of missed the 2 if they were seperate.

Welldone dude,
Clyde.
Nope, the floormapper gets textured "real-time".  Calculate the pixel then the texel and plot. :*)
Challenge Trophies Won:

#### Tetra

• Posts: 2532
• Karma: 83
• Pirate Monkey!
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #9 on: July 10, 2006 »
Nice one Relsoft

Running the exe on my computer was a bit jumpy   my crappy computer
Challenge Trophies Won:

#### TinDragon

• Pentium
• Posts: 644
• Karma: 24
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #10 on: July 10, 2006 »
I am afriad I dont really see a plasma or a floormapper, it just looks like random colored squares with a very rare at times look as if there trying to make a pattern like a plasma, guess it could be running to fast on my setup

#### relsoft

• Posts: 3303
• Karma: 47
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #11 on: July 10, 2006 »
I am afriad I dont really see a plasma or a floormapper, it just looks like random colored squares with a very rare at times look as if there trying to make a pattern like a plasma, guess it could be running to fast on my setup

Download the latest attachment in the first post and see if it is still fast. :*)
Challenge Trophies Won:

#### TinDragon

• Pentium
• Posts: 644
• Karma: 24
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #12 on: July 10, 2006 »
I can see a bit more that it is like a plasma shape at times but it's still seems way to fast, think the color restriction is a bit of a problem making it seem worse than it probably is.

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #13 on: July 10, 2006 »
Do you know what is really cool about this? It's that it's in proper text mode and the effect still runs while you are moving the window. Sure it runs really fast here too but I can still see what it is, perhaps it may run better on other systems with a smaller sine addition?

A question Rel, is there any way of compiling a fb program so that there is no dos window?
Shockwave ^ Codigos
Challenge Trophies Won:

#### Clyde

• A Little Fuzzy Wuzzy
• Posts: 7271
• Karma: 71
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #14 on: July 10, 2006 »
Yeah use in the compiler options in FB or after your programs name if your using the command prompt. -s gui ( switch graphic user interface )
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #15 on: July 10, 2006 »
Cool, got it to work from the command line, thanks Clyde sorry to topic hijack Rel.
Shockwave ^ Codigos
Challenge Trophies Won:

#### Optimus

• Posts: 2452
• Karma: 128
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #16 on: July 10, 2006 »
Oh, and don't forget to press space or anything. Yes there are two parts and I would press escape in the plasma part if I hadn't read here there is a floor part too.
Challenge Trophies Won:

#### relsoft

• Posts: 3303
• Karma: 47
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #17 on: July 11, 2006 »
You guys are  running this in a window?

Press ALT+Enter when theprog runs ;*)
Challenge Trophies Won:

#### Shockwave

• good/evil
• Founder Member
• Posts: 17378
• Karma: 497
• evil/good
##### Re: ASCII Plasma + floormapper (QB45 code but runs on XP)
« Reply #18 on: July 11, 2006 »
It makes all the difference. I must admit that I was running this in windowed mode.
Shockwave ^ Codigos
Challenge Trophies Won: