Author Topic: Toying with COS & SIN commands to produce 2D effects.  (Read 22653 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4168
    • View Profile
    • Portfolio
That list is quite promising!
I´m particularly found of:

Shapes - vector images from my idea of what can help quickly to outline your idea
Built in animator.
Built in canvass - draw them on screen and see how they look - you can cut a group out and save them as oe sprite.

Things from some other places I find interesting:

light table for animations
stencil for the outlines, easier to color something?

I´m not really sure ´redo´ is needed, like if you have a spare screen or an animation set, you can use other frames to test variations. IMO

Again, it feels quite promising, how long till you believe it will be ready to ship?

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
Heres some filled circle eye candy.

Code: GLBasic [Select]
GLOBAL x , y , radius , r , g , b , size , col, num, radius1, p, count
num=100
radius = 0
radius1 = 10
x=100
y=100

////
/////
// Da Loop
/////
////

WHILE TRUE
FOR loop = 1 TO num ; r = 70  ; g = 60  ; b = 50
FOR a = 1 TO 360 ; r=r+p ; b=b+p ; g=g+p  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=202 ; num=100 ; radius=0 ; p=0
FOR loop = 1 TO num ; r = 10/num  ; g = 10/num  ; b = 10/num
FOR a = 1 TO 360 ; r=r+p/a*b ; b=b+p/a+g ; g=g+p/a
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=302 ; num=100 ; radius=0 ; p=100
FOR loop = 1 TO num ; r = 30+loop*num/2  ; g = 40+loop*num/3  ; b = 200+loop*num/4
FOR a = 1 TO 360 ; r=r+p*loop ; b=b+p*loop ; g=g+p*loop
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; DEC p ; NEXT

x=402 ; num=100 ; radius=0 ; p=100
FOR loop = 1 TO num ; r = 250  ; g = 100 ; b = 255
FOR a = 1 TO 180 ; r=r-1 ; b=b-0.1 ; g=g+0.1  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
DRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=502 ; num=100 ; radius=0 ; p=100
FOR loop = 1 TO num ; r = 20  ; g = 22  ; b = 20
FOR a = 1 TO 360 ; r=r*p ; b=b+p ; g=g+p  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=100 ; num=100 ; radius=0 ; p=100 ; y=200
FOR loop = 1 TO num ; r = 20  ; g = 22  ; b = 20
FOR a = 1 TO 360 ; r=r*p ; b=b-p ; g=g+p/a  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=202 ; num=100 ; radius=0 ; p=100
FOR loop = 1 TO num ; r = 20+num  ; g = 22*num ; b = 20*num
FOR a = 1 TO 360 //; r=r+a ; b=b+a ; g=g+b  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=302 ; num=100 ; radius=0 ; p=100
FOR loop = 1 TO num ; r = 20-num  ; g = 44*num ; b = 34/num
FOR a = 1 TO 360 ; r=r+a ; g=g+b  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=402 ; num=100 ; radius=0 ; p=10
FOR loop = 1 TO num ; r = loop  ; g = loop/2 ; b = loop/2
FOR a = 1 TO 360  
col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; INC p ; NEXT

x=502 ; num=100 ; radius=0 ; count=0
FOR loop = 1 TO num ; r = 255+loop  ; g = 100+loop ; b = loop/2
FOR a = 1 TO 360 ; INC count ; IF count=2 THEN count=0  
IF count=1 THEN col=RGB(r,g,b) ; IF count=0 THEN col=RGB(0,0,0)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; NEXT

x=100 ; num=100 ; radius=0 ; count=0 ; y=300
FOR loop = 1 TO num ; r = 100+loop  ; g = 200+loop ; b = 100+loop/2
FOR a = 0 TO 360 STEP 5; INC count ; IF count=3 THEN count=0  
IF count=1 THEN col=RGB(r,g,b) ; IF count=0 THEN col=RGB(r/2,g/2,b/2) ; IF count=2 THEN col=RGB(r*2,g*2,b*2)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; NEXT

x=202 ; num=100 ; radius=0 ; count=0
FOR loop = 1 TO num ; r = 255  ; g = 100 ; b = 0
FOR a = 0 TO 360 ; INC count ; IF count=3 THEN count=0  
IF count=1 THEN col=RGB(r,g,b) ; IF count=0 THEN col=RGB(r/2,g/2,b/2) ; IF count=2 THEN col=RGB(r*2,g*2,b*2)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, col
NEXT ; INC radius ; DEC num ; NEXT

x=302 ; num=100 ; radius=0 ; count=1 ; p=300
FOR loop = 1 TO num ; r = 255  ; g = 255 ; b = 255
FOR a = 0 TO 180 STEP count ; r=r+a/num ; g=g+g/num ; INC count ; IF count=3 THEN count=1
col=RGB(r,g,b)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, col
DRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, col
NEXT ; INC radius ; DEC num ; DEC p,10 ; NEXT

x=402 ; num=100 ; radius=0 ; count=1 ; p=300
FOR loop = 1 TO num ; r = 100  ; g = 0 ; b = 100
FOR a = 0 TO 180 STEP count ; r=r+a/num ; g=g+g/num ; b=b+p/num ; INC count ; IF count=3 THEN count=1
col=RGB(r,g,b)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, col
DRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, col
NEXT ; INC radius ; DEC num ; DEC p,10 ; NEXT

x=502 ; num=100 ; radius=0 ; count=1 ; p=300
FOR loop = 1 TO num ; r = 100  ; g = 100 ; b = 10
FOR a = 0 TO 90 STEP count ; r=r+a/num ; g=g+g/num ; b=b+p/num ; INC count ; IF count=3 THEN count=1
col=RGB(r,g,b)
DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, col
DRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, col

DRAWRECT x+COS(a)*radius, y-SIN(a)*radius, 2, 2, col
DRAWRECT x+COS(a)*radius, y+SIN(a)*radius, 2, 2, col

NEXT ; INC radius ; DEC num ; DEC p,10 ; NEXT


SHOWSCREEN
KEYWAIT
WEND
 

Edit: Code tags are your friends /Moru :-)
« Last Edit: 2012-May-15 by Moru »
I like things and do stuff.

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
Im posting the "PAC MAN" code here that I lost interest with. There are a million such clones out there and this slowly sank into my mind.  So, I changed a few things, the ghosts see through walls (C`mon, Ghosts cant see through solid matter?) and home in on you - resulting in a very difficult challenge. I had planned a maze that took skill to master without loosing lifes but time/life/another clone of it etc put me off.

You will find in this code a prog that allows you to explore the maze with moving ghosts that hunt you.  Erm, thats all I`m afraid.  Ive substitued LOADSPRITE with bland blocks. 

Theres no pro code here folks, just a foundation I typed up over several evenings to get things running.

If any of you admire it, explore it and make/add changes.

Code: GLBasic [Select]
///////
The code
//////

// --------------------------------- //
// Project: PACMAN
// Start: Friday, February 17, 2012
// IDE Version: 10.244
SETTRANSPARENCY RGB(0,0,0) ; SETSCREEN 640,400,0
LOADFONT "smalfont.bmp",1
SETFONT 1
GLOBAL a,b,col ; c=10 ; col=RGB(255,255,20)
//////////////////////////
//// Title Screen
//////////////////////////
WHILE KEY(57)=FALSE

FOR a=0 TO 200
DRAWLINE 0,a-1,640,a-1,RGB(col+10/2+b,col+10+b,col+a+b)
DRAWLINE 0,400-a,640,400-a,RGB(col+10/2+b,col+10+b,col+a+b)
INC b,1
IF b=20 THEN b=0
NEXT

PRINT "SCAPEGHOST", 235,10
PRINT "After Eons of wandering aimlessly ",25,30
PRINT "around mazes, you decide you want out!",2,50
PRINT "By eating the Pills scattered around",15,70
PRINT "your shadow of a body will find a new",8,90
PRINT "existence within the world of man...",15,110
//// Yawn...not another fecking Pac Man Clone :)
PRINT "<SPACE>",250,300
//INC nextpage ; IF nextpage=500 THEN nextpage=0 ; GOSUB highscore

SHOWSCREEN

WEND

//// Maze stuff
ripple1=5 ; ripple2=20 ; count=1 ; syncgrafix1=10 ; wallsize=10 ; syncgrafix=5 ; effect1=10 ; count=0 ; effect=6
DIM map[31][17] ; GOSUB maze

score=0 ; t$="000"+score ; mdir=1 ; ans=0 ; anf=3

//// Player stuff
ghostspeed=8 ; playerspeed=5 ; px=11 ; py=7

game=1
animovementdelayount=1
ans=0 ; anf=3

GOSUB grafix

GOSUB setupghosts


///////////////////////////////////////////////
////////////////////////////////////////////////
/// MAIN LOOP
////////////////////////////////////////////////
///////////////////////////////////////////////
WHILE NOT FALSE

GOSUB domazebackground

GOSUB drawmaze

GOSUB movemuncher // & ghosts via a delay

GOSUB stats

SHOWSCREEN

WEND

////Routines



SUB drawmaze:

        INC count,1
        FOR y=0 TO 16
        FOR x=0 TO 29

                                xx=x*wallsize+SIN(count+y*ripple1)*effect1 // For the walls
                                yy=y*wallsize+SIN(count+x*ripple1)*20 // For the walls

                                xxx=px*wallsize+SIN(count+py*ripple1)*effect1 // To Clip player and spooks to maze
                                yyy=py*wallsize+SIN(count+px*ripple1)*20 // Ditto

                                        IF map[x][y]=-1 // -1=no pill, 0=pill

                                DRAWSPRITE 5,xx*2,yy*2

                                        ENDIF

                                        IF map[x][y]=0 // Draw pill

                                DRAWSPRITE 0,xx*2,yy*2

                                        ENDIF

                                        IF map[x][y]=1 // Maze Walls

                                        col=RGB(COS(count+y*2+x*2.5)*100+100,SIN(count+y*5)*100+100,SIN(count+x*5)*100+100)
                                        DRAWRECT xx*2+effect,yy*2+effect,wallsize,wallsize,RGB(COS(count+y*2)*100+100,SIN(count+y*5)*127+127,SIN(count+x*5)*127+127)
                                       
                                        ENDIF

                                        //DRAWANIM 3,image,xxx*2,yyy*2 // Draw Player
                                        DRAWSPRITE 3,xxx*2,yyy*2
                                        FOR a=0 TO 3

                                IF ghost[a].x=x AND ghost[a].y=y // Draw Spooks

                                        DRAWSPRITE 4,xx*2,yy*2

                                ENDIF

                                        NEXT
        NEXT
        NEXT

ENDSUB

SUB movemuncher:


IF KEY(203)
dirx=-1 ; diry=0
ENDIF


IF KEY(205)
diry=0 ; dirx=1
ENDIF

IF KEY(200)
diry=-1 ; dirx=0
ENDIF

IF KEY(208)
diry=1 ; dirx=0
ENDIF
////Check Lefy
IF dirx=-1 AND map[INTEGER(px-1)][INTEGER(py)]<>1

        INC movementdelay ; IF movementdelay > playerspeed THEN DEC px ; GOSUB moveghosts

        IF movementdelay = playerspeed + 1
        dirx=0 ; movementdelay=0
        ENDIF

ENDIF
////Check Right
IF dirx=1 AND map[INTEGER(px+1)][INTEGER(py)]<>1

        INC movementdelay ; IF movementdelay > playerspeed THEN INC px ; GOSUB moveghosts

        IF movementdelay = playerspeed + 1
        dirx=0 ; movementdelay=0
        ENDIF

ENDIF
////Check Down
IF diry=1 AND map[INTEGER(px)][INTEGER(py+1)]<>1
       
        INC movementdelay ; IF movementdelay > playerspeed THEN INC py ; GOSUB moveghosts

        IF movementdelay = playerspeed + 1
        diry=0 ; movementdelay=0
        ENDIF
       
ENDIF
////Check Up
IF diry=-1 AND map[INTEGER(px)][INTEGER(py-1)]<>1
       
        INC movementdelay ; IF movementdelay > playerspeed THEN DEC py ; GOSUB moveghosts

        IF movementdelay = playerspeed + 1
        diry=0 ; movementdelay=0
        ENDIF

ENDIF

ENDSUB


SUB moveghosts:

INC ghostdelay ; IF ghostdelay=ghostspeed+1 THEN ghostdelay=0
IF ghostdelay<ghostspeed
GOTO movethespooks
ENDIF

IF ghostdelay=ghostspeed
FOR a=0 TO 3
 
IF ghost[a].x<INTEGER(px) AND map[ghost[a].x+1][ghost[a].y]=0

        ghost[a].x=ghost[a].x+1

ENDIF

       
IF ghost[a].x>INTEGER(px) AND map[ghost[a].x-1][ghost[a].y]=0

ghost[a].x=ghost[a].x-1

ENDIF

       
IF ghost[a].y>INTEGER(py) AND map[ghost[a].x][ghost[a].y-1]=0

ghost[a].y=ghost[a].y-1

ENDIF


IF ghost[a].y<INTEGER(py) AND map[ghost[a].x][ghost[a].y+1]=0

ghost[a].y=ghost[a].y+1

ENDIF
NEXT
ENDIF



movethespooks: // via the drawmaze

ENDSUB// set up ghosts


SUB setupghosts:

TYPE spook
x ; y ; im ; spooked ; dead
ENDTYPE

GLOBAL ghost[] AS spook
DIM ghost[4]



RESTORE ghostdata
// Set up xpos,ypos,anim image range, directionx/y, spooked(you ate the power pill,dead
FOR a=0 TO 3
        READ aa,b,c,d,e
        ghost[a].x=aa ; ghost[a].y=b ; ghost[a].im=c ; ghost[a].spooked=d ; ghost[a].dead=e
NEXT

STARTDATA ghostdata:

DATA 7,2,0,0,0
DATA 12,4,4,0,0
DATA 10,9,8,1,0
DATA 1,8,12,1,0

ENDDATA

ENDSUB


SUB stats:
// place checks here on maths
ENDSUB

SUB maze:

RESTORE screen

FOR y=0 TO 16
FOR x=0 TO 29

READ a
map[x][y]=a
IF a=5
map[x][y]=1

ENDIF
NEXT ; NEXT

STARTDATA screen:

DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,0,0,0,1,0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,1,1,0,1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,1,1,1,1,0,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,0,0,0,1,0,0,0,-1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,1,1,0,1,2,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,0,0,0,0,1,1,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,1,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
ENDDATA

ENDSUB


SUB domazebackground:



FOR a=0 TO 499

        IF spot[a].y<300
               
                DRAWRECT spot[a].x,spot[a].y,spot[a].zz,spot[a].zz,RGB(0,0,a)

        ELSE

                DRAWRECT spot[a].x,spot[a].y,spot[a].zz,spot[a].zz,RGB(0,10,a/10)
       
        ENDIF
       
        INC spot[a].zz,1
       
                IF spot[a].zz>20
                        spot[a].zz=RND(5)
                        spot[a].x=RND(639)
                        spot[a].y=RND(399)
                ENDIF
       
NEXT

ENDSUB

SUB grafix:

//LOADSPRITE "dot.bmp", 0
DRAWRECT 0,0,2,2,RGB(255,255,255)
GRABSPRITE 0,0,0,2,2
//LOADANIM "wall.b
//LOADANIM "player.bmp",3,22
DRAWRECT 0,0,22,23,RGB(255,255,0)
GRABSPRITE 3,0,0,22,23 // player
//LOADANIM "ghosts.bmp",4,24,24
DRAWRECT 0,0,22,23,RGB(0,255,255)
GRABSPRITE 4,0,0,22,23
//LOADSPRITE "nodot.bmp", 5
//LOADANIM "score.bmp",6,162,33
//Background
TYPE dot ; x ; y ; sx ; sy ; zz ; ENDTYPE

GLOBAL spot[] AS dot
DIM spot[1000]
FOR a=0 TO 999
        spot[a].x=RND(639) ; spot[a].y=RND(399)
        IF RND(1)=0
                spot[a].sx=2
        ELSE
                spot[a].sx=-2
        ENDIF

        IF RND(1)=0
                spot[a].sy=-2
        ELSE
                spot[a].sy=2
        ENDIF
                spot[a].zz=RND(5)
NEXT

ENDSUB

 


« Last Edit: 2012-May-18 by Schranz0r »
I like things and do stuff.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4168
    • View Profile
    • Portfolio
I will sure check this out later.
That data statement there gives me itches as I use similar stuff to draw solaris map(board game) in a way that editing it creates newer maps.I took me ages to understand DATA capabilities back on the COCO days, so I´m quite found of its uses.

Don´t let down because of other/similar games, I´m sure you can beat others attempts or even better, add to the pot.
One successful ´pac man´ always open doors and call attention to other versions too.

You could make into a ROGUE LIKE PACMAN... such a game would make my day :booze:

But I´m just being cheerishable, I certainly understand the life/work/things/other ideas detracting us to pursue one idea. 

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
I think forum *love*ed up your code a bit, can you put it in code blocks plz, so your formation is saved?
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5006
  • O Rly?
    • View Profile
@I love my Brick:

PLS use the CODETAG!!!

the button with the "#", thx!
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
I will sure check this out later.
That data statement there gives me itches as I use similar stuff to draw solaris map(board game) in a way that editing it creates newer maps.I took me ages to understand DATA capabilities back on the COCO days, so I´m quite found of its uses.

Don´t let down because of other/similar games, I´m sure you can beat others attempts or even better, add to the pot.
One successful ´pac man´ always open doors and call attention to other versions too.

You could make into a ROGUE LIKE PACMAN... such a game would make my day :booze:

But I´m just being cheerishable, I certainly understand the life/work/things/other ideas detracting us to pursue one idea.

Thanks buddy.
I like things and do stuff.

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
@I love my Brick:

PLS use the CODETAG!!!

the button with the "#", thx!

Ouch. Erm, really sorry to have caused you distress. By the way, what does @ mean before my name?
Please dont shout as that is rude.
I like things and do stuff.

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
That list is quite promising!
I´m particularly found of:

Shapes - vector images from my idea of what can help quickly to outline your idea
Built in animator.
Built in canvass - draw them on screen and see how they look - you can cut a group out and save them as oe sprite.

Things from some other places I find interesting:

light table for animations
stencil for the outlines, easier to color something?

I´m not really sure ´redo´ is needed, like if you have a spare screen or an animation set, you can use other frames to test variations. IMO

Again, it feels quite promising, how long till you believe it will be ready to ship?

Thanks for the input.

((All the routines I have described work. The fill routine was a right bugger though and held me back many evenings in coding it.  Setpixel can be very slow when measured by Getpixel....I found a work around that reduced my previous idea and allowed a fast fill inside a polygon.  I was left with a bugbear about GLBasic.))

Right now Im adding new ideas that have sprung from the development of this prog.

I try it out on my Son and Daughter and they tell me what needs to be added. (My Daughter told me to add stencils - pacman,invader,coin,diamond etc) My Son just loved it and really liked it when he saved his images and then printed them on screen.

So, I`m working with my kids on this one & sometimes they think out of the box and surprise me by thier idea.

I like things and do stuff.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4168
    • View Profile
    • Portfolio
So, I`m working with my kids on this one & sometimes they think out of the box and surprise me by thier idea.

Best input in the universe! :good:

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
Great words!

Children love & embrace the world whilst we adults worry about it & the mistakes we make.

Ah well, back to my brick :) Just glad Im not a real priest - feck, that must be an even harder life. :)
I like things and do stuff.

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
I want this thread with lotsa of screenshots!

Offline I love my Brick

  • Mr. Drawsprite
  • **
  • Posts: 61
    • View Profile
Sure, I agree and that will happen. Just a few more tweaks and improvements to go - almost there. The more you complete something the more you find a way to stream line other areas of your code. I hate to say this but, Math is fun! If my younger self could see me now :D

I will remove the colour picker sound effect and all others before I submit the prog here.  The kids love the sound effects but us adults may find them distracting.
I like things and do stuff.

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Im posting the "PAC MAN" code here that I lost interest with.

I've compiled it, nice stuff!


Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
I've assembled the first few codesnippets into one bundle.

Also I've shot some screenshots:

Tunnel
Spiral1
Spiral2
PolySpiral2
Patterns1
Patterns2
Bat 'n ball
Flag
Wormhole

[attachment deleted by admin]