Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Let's kick up the fun in here
#1
Graphics! The rules will be very lenient.

Rule list:
1) The source may be of any length as long as the program runs. Faster executing programs will be rated higher, however.
2) The program must be in VGA! Buffers, SetVideoSeg, and normal writing to plain &HA000 are permitted, and will not be given different scores. Flicker is a no-no, though. NO LIBS, JUST PURE QB
3) The program must be an effect of some sort. Not just a nice display, but an effect. Phong, fire, and perlin noise are all examples of effects.
4) Extra points if 3D, but if it looks worse as 3D than 2D, points deducted.
5) Limit one effect per program, that way the code is easier to understand.
6) Members may post multiple programs, but each will be scored individually.

6) SPAGHETTI CODE IS MINUS 100 POINTS!!!!!

I want to see what you guys can do. I'll try to research a new effect to enter as well, but I'll have one of you guys score mine Tongue
am an asshole. Get used to it.
Reply
#2
I knew I should have made that Feedback effect last night instead of a ball to ball collision. ;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#3
so, it has to be animated?
Or can it be a rendered frame or something that does nothing?
Reply
#4
Rel:
Ball to ball collision in your hands can be the base of something interesting...
Antoni
Reply
#5
Quote:so, it has to be animated?
Or can it be a rendered frame or something that does nothing?

As long as it's a true effect. Higher points for animated though.

Note to all: I'm going on vacation tomorrow, so you have a long time to do your entries ^_^
am an asshole. Get used to it.
Reply
#6
Here's mine. Tutorial I got from Hugo Elias. Thanks Antoni!!! The site is a goldmine!!!!

Antoni.. Yeah, I'll prolly do some Metaballs with it. ;*)

*Think Plasma inside Blobs...

I'll try to add the gel algo laterz...If I can. LOL


Code:
DECLARE SUB AF.Print (Layer%, offs%, Xpos%, Ypos%, text$, col%)
DECLARE SUB Rel.KgenFont (Layer%, offs%, X%, Y%, Font$, MinColor%, Italic%)
DECLARE SUB Grad (col1%, r1%, g1%, b1%, col2%, r2%, g2%, b2%)
DEFINT A-Z

'$DYNAMIC
RANDOMIZE TIMER
DIM Vpage1%(32001)
DIM Vpage2%(32001)

DIM cmap%(255)
DIM div5%(255 * 5)
DIM Lsin(-10 TO 370) AS SINGLE
DIM Lcos(-10 TO 370) AS SINGLE
DIM SHARED Ly&(199)
DIM textX%(10)
DIM textY%(10)
DIM text$(10)

DIM Layer1%
DIM Layer2%
DIM offs1%
DIM offs2%


Vpage1%(0) = 2560                      'Width 320*8
Vpage1%(1) = 200                       'Height
Vpage2%(0) = 2560                      'Width 320*8
Vpage2%(1) = 200                       'Height

Layer1% = VARSEG(Vpage1%(0))
Layer2% = VARSEG(Vpage2%(0))

offs1% = VARPTR(Vpage1%(2))
offs2% = VARPTR(Vpage2%(2))

FOR i% = 0 TO 255
    cmap%(i%) = 1 + INT(RND * 10)
NEXT i%

FOR i% = 0 TO 255 * 5
    div5%(i%) = i% \ 5
NEXT i%

FOR i% = -10 TO 370
    ax! = i% * 3.141593 / 180
    Lsin(i%) = SIN(ax!)
    Lcos(i%) = COS(ax!)
NEXT i%

FOR i% = 0 TO 199
    Ly&(i%) = i% * 320&
NEXT i%

RESTORE
FOR i% = 0 TO 10
    READ textX(i%)
    READ textY(i%)
    READ text$(i%)
NEXT i%

CLS
SCREEN 13
Grad 0, 0, 0, 0, 2, 0, 0, 0
Grad 2, 15, 0, 0, 63, 63, 0, 0
Grad 64, 63, 0, 0, 127, 63, 63, 0
Grad 128, 63, 63, 0, 255, 63, 63, 0


Xrad% = 40
Yrad% = 40
Freq% = 6
FoldLeng! = 0
Fdir! = .3
rotdir% = 1
bx% = 91
bxdir% = 1

T# = TIMER
DO
        Frames& = Frames& + 1
        DEF SEG = Layer1%
            Acount% = Acount% + 1
            IF Acount% > 360 THEN Acount% = 360

            FoldLeng! = FoldLeng! + Fdir!
            IF FoldLeng! < -30 THEN
                Fdir! = -Fdir!
            ELSEIF FoldLeng! > 30 THEN
                Fdir! = -Fdir!
            END IF

            ang% = (ang% + rotdir%)
            IF ang% < 0 THEN
                rotdir% = -rotdir%
            ELSEIF ang% > 360 THEN
                rotdir% = -rotdir%
            END IF
            bx% = bx% + bxdir%
            IF bx% < 80 THEN
                bxdir% = -bxdir%
            ELSEIF bx% > 240 THEN
                bxdir% = -bxdir%
            END IF
            ty% = ABS(SIN(ang% * 3.141593 / 180)) * 50
            xx% = bx%
            yy% = 125 - ty%

            FOR angle% = 0 TO Acount%
                A% = ((Freq% * angle%) MOD 360)
                B% = (angle% + ang%) MOD 360
                X% = (Xrad% + FoldLeng! * Lsin((A%))) * Lsin((B%)) + xx
                Y% = (Yrad% + FoldLeng! * Lsin((A%))) * Lcos((B%)) + yy
                POKE offs1% + Ly&(Y%) + X%, 255
                POKE offs1% + Ly&(Y%) + X% + 1, 127
                POKE offs1% + Ly&(Y%) + X% - 1, 127
                POKE offs1% + Ly&((Y% - 1)) + X%, 127
                POKE offs1% + Ly&((Y% + 1)) + X%, 255
            NEXT angle%

        T! = (Frames&) * 3.141593 / 180
        X% = INT(COS(T! * 8) + SIN(T!) * 140)
        Y% = INT(SIN(T! + 2) * SIN(T! * 2) * 90)
        xx% = X% + 160
        yy% = Y% + 100
        IF xx% > 2 AND yy% > 2 AND xx% < 318 AND yy% < 198 THEN
            POKE woff1% + Ly&(yy%) + xx%, 255
            POKE woff1% + Ly&(yy%) + xx% + 1, 255
            POKE woff1% + Ly&(yy%) + xx% - 1, 255
            POKE woff1% + Ly&(yy% - 1) + xx%, 255
            POKE woff1% + Ly&(yy% + 1) + xx%, 255

            POKE woff1% + Ly&(200 - yy% + 1) + (320 - xx%), 255
            POKE woff1% + Ly&(200 - yy% - 1) + (320 - xx%), 255
            POKE woff1% + Ly&(200 - yy%) + (320 - xx% + 1), 255
            POKE woff1% + Ly&(200 - yy%) + (320 - xx% - 1), 255

        END IF

        T! = TIMER
        X% = INT(COS(T! * 8) + SIN(T!) * 140)
        Y% = INT(SIN(T! + 2) * SIN(T! * 2) * 90)
        xx% = X% + 160
        yy% = Y% + 100
        IF xx% > 2 AND yy% > 2 AND xx% < 318 AND yy% < 198 THEN
            POKE woff1% + Ly&(yy%) + xx%, 255
            POKE woff1% + Ly&(yy%) + xx% + 1, 255
            POKE woff1% + Ly&(yy%) + xx% - 1, 255
            POKE woff1% + Ly&(yy% - 1) + xx%, 255
            POKE woff1% + Ly&(yy% + 1) + xx%, 255

            POKE woff1% + Ly&(200 - yy% + 1) + (320 - xx%), 255
            POKE woff1% + Ly&(200 - yy% - 1) + (320 - xx%), 255
            POKE woff1% + Ly&(200 - yy%) + (320 - xx% + 1), 255
            POKE woff1% + Ly&(200 - yy%) + (320 - xx% - 1), 255

        END IF
        IF (Frames& AND 7) = 1 THEN
            texX% = textX%(Textidx%)
            texY% = textY%(Textidx%)
            tex$ = text$(Textidx%)
            AF.Print Layer1%, offs1%, texX%, texY, tex$, 245
            IF (Frames& AND 15) = 1 THEN
                Textidx% = (Textidx% + 1) MOD 11
            END IF
        END IF
    clrmap% = INT(RND * 5)
    FOR C& = 321 TO 64000 - 321 STEP 4
        DEF SEG = Layer1%
        p& = offs1% + C&
        clr% = PEEK(p& + 1) + PEEK(p& - 1) + PEEK(p& - 320) + PEEK(p& + 320) + PEEK(p&)
        clr% = div5%(clr%)
        clrmap% = (clrmap% + 1) AND 255
        clr% = clr% - cmap%(clrmap%)
        IF clr% < 0 THEN clr% = 0
        n1% = clr%
        ''2
        p& = p& + 1
        clr% = PEEK(p& + 1) + PEEK(p& - 1) + PEEK(p& - 320) + PEEK(p& + 320) + PEEK(p&)
        clr% = div5%(clr%)
        clrmap% = (clrmap% + 1) AND 255
        clr% = clr% - cmap%(clrmap%)
        IF clr% < 0 THEN clr% = 0
        n2% = clr%
        ''3
        p& = p& + 1
        clr% = PEEK(p& + 1) + PEEK(p& - 1) + PEEK(p& - 320) + PEEK(p& + 320) + PEEK(p&)
        clr% = div5%(clr%)
        clrmap% = (clrmap% + 1) AND 255
        clr% = clr% - cmap%(clrmap%)
        IF clr% < 0 THEN clr% = 0
        n3% = clr%
        ''4
        p& = p& + 1
        clr% = PEEK(p& + 1) + PEEK(p& - 1) + PEEK(p& - 320) + PEEK(p& + 320) + PEEK(p&)
        clr% = div5%(clr%)
        clrmap% = (clrmap% + 1) AND 255
        clr% = clr% - cmap%(clrmap%)
        IF clr% < 0 THEN clr% = 0
        n4% = clr%
        DEF SEG = Layer2%
        p2& = offs2% + C& - 320
        POKE p2&, n1%
        p2& = p2& + 1
        POKE p2&, n2%
        p2& = p2& + 1
        POKE p2&, n3%
        p2& = p2& + 1
        POKE p2&, n4%
    NEXT C&
    PUT (0, 0), Vpage2%(0), PSET
    FOR i% = 3 TO 32001
        Vpage1%(i%) = Vpage2%(i%)
    NEXT i%
LOOP UNTIL INKEY$ <> ""

DEF SEG
CLS
SCREEN 0
WIDTH 80
PRINT "FPS:"; Frames& / (TIMER - T#)
PRINT "Fire by Relsoft"
C$ = INPUT$(1)
END

DATA 100,50,"Fire by Relsoft"
DATA 10,40,"From a tutorial by Hugo Elias."
DATA 140,140,"Greetz to..."
DATA 40,170,"God"
DATA 10,160,"Anya Therese"
DATA 10,20,"Rosmelly"
DATA 180,110,"Peter"
DATA 40,60,"Lily"
DATA 160,140,"Marie"
DATA 10,160,"Cristina"
DATA 40,140,"And all the QBasicnews people."

REM $STATIC
SUB AF.Print (Layer%, offs%, Xpos%, Ypos%, text$, col%)
'Prints the standard 8*8 CGA font
'Paramenters:
'Segment=the Layer to print to
'Xpos,Ypos=the coordinates of the text
'Text$=the string to print
'col= is the color to print(gradient)

X% = Xpos%
Y% = Ypos%
Spacing% = 8
  FOR i% = 0 TO LEN(text$) - 1
    X% = X% + Spacing%
    Offset% = 8 * ASC(MID$(text$, i% + 1, 1)) + 14
    FOR J% = 0 TO 7
      DEF SEG = &HFFA6
      Bit% = PEEK(Offset% + J%)
      DEF SEG = Layer%
      IF Bit% AND 1 THEN POKE offs% + Ly&(Y% + J%) + X%, col% + J%
      IF Bit% AND 2 THEN POKE offs% + Ly&(Y% + J%) + (X% - 1), col% + J%
      IF Bit% AND 4 THEN POKE offs% + Ly&(Y% + J%) + (X% - 2), col% + J%
      IF Bit% AND 8 THEN POKE offs% + Ly&(Y% + J%) + (X% - 3), col% + J%
      IF Bit% AND 16 THEN POKE offs% + Ly&(Y% + J%) + (X% - 4), col% + J%
      IF Bit% AND 32 THEN POKE offs% + Ly&(Y% + J%) + (X% - 5), col% + J%
      IF Bit% AND 64 THEN POKE offs% + Ly&(Y% + J%) + (X% - 6), col% + J%
      IF Bit% AND 128 THEN POKE offs% + Ly&(Y% + J%) + (X% - 7), col% + J%
    NEXT J%
  NEXT i%

END SUB

SUB Grad (col1, r1, g1, b1, col2, r2, g2, b2)

cols = col2 - col1 + 1
rstep! = (r2 - r1) / cols
gstep! = (g2 - g1) / cols
bstep! = (b2 - b1) / cols
r! = r1
g! = g1
B! = b1
FOR col = col1 TO col2
  r! = r! + rstep!
  g! = g! + gstep!
  B! = B! + bstep!
  red% = INT(r!)
  Green% = INT(g!)
  Blue% = INT(B!)
  OUT &H3C8, col
  OUT &H3C9, red%
  OUT &H3C9, Green%
  OUT &H3C9, Blue%
NEXT col

END SUB
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#7
7.8FPS on a 1100mHz. And the writing is very faded. But it's a cool effect...
Reply
#8
Does the word exe mean a thing?

10 FPS on a 233 cyrix.

;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#9
Ahem... 24.8FPS compiled :roll:
Reply
#10
Coolness rel. about (roughtly) 18.22117647058824 fps compiled, heh.

Wow i googled "Hugo Elias" and found his site (I think?). WOW what a fucking genious, his site is awesome. I read for about 2 hours about perlin noise, fractals, fire, particles, etc etc all this shit really detailed and yet easy to understand. Great stuff.. Maybe ill make a demo some time, i duno.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)