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

#### erico

• Community Developer
• Prof. Inline
• Posts: 4349
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #30 on: 2012-May-15 »
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?

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #31 on: 2012-May-15 »
Heres some filled circle eye candy.

Code: (glbasic) [Select]
`GLOBAL x , y , radius , r , g , b , size , col, num, radius1, p, countnum=100radius = 0radius1 = 10x=100y=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, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=202 ; num=100 ; radius=0 ; p=0FOR 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, colNEXT ; INC radius ; DEC num ; INC p ; NEXT x=302 ; num=100 ; radius=0 ; p=100FOR 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, colNEXT ; INC radius ; DEC num ; DEC p ; NEXT x=402 ; num=100 ; radius=0 ; p=100FOR 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, colDRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 3, 3, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=502 ; num=100 ; radius=0 ; p=100FOR 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, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=100 ; num=100 ; radius=0 ; p=100 ; y=200FOR 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, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=202 ; num=100 ; radius=0 ; p=100FOR loop = 1 TO num ; r = 20+num  ; g = 22*num ; b = 20*numFOR 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, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=302 ; num=100 ; radius=0 ; p=100FOR loop = 1 TO num ; r = 20-num  ; g = 44*num ; b = 34/numFOR 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, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=402 ; num=100 ; radius=0 ; p=10FOR loop = 1 TO num ; r = loop  ; g = loop/2 ; b = loop/2FOR a = 1 TO 360   col=RGB(r,g,b) ;  DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 3, 3, colNEXT ; INC radius ; DEC num ; INC p ; NEXTx=502 ; num=100 ; radius=0 ; count=0FOR loop = 1 TO num ; r = 255+loop  ; g = 100+loop ; b = loop/2FOR 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, colNEXT ; INC radius ; DEC num ; NEXTx=100 ; num=100 ; radius=0 ; count=0 ; y=300FOR loop = 1 TO num ; r = 100+loop  ; g = 200+loop ; b = 100+loop/2FOR 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, colNEXT ; INC radius ; DEC num ; NEXTx=202 ; num=100 ; radius=0 ; count=0 FOR loop = 1 TO num ; r = 255  ; g = 100 ; b = 0FOR 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, colNEXT ; INC radius ; DEC num ; NEXTx=302 ; num=100 ; radius=0 ; count=1 ; p=300FOR loop = 1 TO num ; r = 255  ; g = 255 ; b = 255FOR a = 0 TO 180 STEP count ; r=r+a/num ; g=g+g/num ; INC count ; IF count=3 THEN count=1col=RGB(r,g,b) DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, colDRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, colNEXT ; INC radius ; DEC num ; DEC p,10 ; NEXTx=402 ; num=100 ; radius=0 ; count=1 ; p=300FOR loop = 1 TO num ; r = 100  ; g = 0 ; b = 100FOR 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=1col=RGB(r,g,b) DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, colDRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, colNEXT ; INC radius ; DEC num ; DEC p,10 ; NEXTx=502 ; num=100 ; radius=0 ; count=1 ; p=300FOR loop = 1 TO num ; r = 100  ; g = 100 ; b = 10FOR 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=1col=RGB(r,g,b) DRAWRECT x-COS(a)*radius, y+SIN(a)*radius, 2, 2, colDRAWRECT x-COS(a)*radius, y-SIN(a)*radius, 2, 2, colDRAWRECT x+COS(a)*radius, y-SIN(a)*radius, 2, 2, colDRAWRECT x+COS(a)*radius, y+SIN(a)*radius, 2, 2, colNEXT ; INC radius ; DEC num ; DEC p,10 ; NEXTSHOWSCREENKEYWAITWEND`
Edit: Code tags are your friends /Moru :-)
« Last Edit: 2012-May-15 by Moru »
I like things and do stuff.

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #32 on: 2012-May-18 »
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.244SETTRANSPARENCY RGB(0,0,0) ; SETSCREEN 640,400,0LOADFONT "smalfont.bmp",1SETFONT 1GLOBAL a,b,col ; c=10 ; col=RGB(255,255,20)////////////////////////////// Title Screen//////////////////////////WHILE KEY(57)=FALSEFOR a=0 TO 200DRAWLINE 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,1IF b=20 THEN b=0NEXTPRINT "SCAPEGHOST", 235,10PRINT "After Eons of wandering aimlessly ",25,30PRINT "around mazes, you decide you want out!",2,50PRINT "By eating the Pills scattered around",15,70PRINT "your shadow of a body will find a new",8,90PRINT "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 highscoreSHOWSCREENWEND//// Maze stuffripple1=5 ; ripple2=20 ; count=1 ; syncgrafix1=10 ; wallsize=10 ; syncgrafix=5 ; effect1=10 ; count=0 ; effect=6DIM map[31][17] ; GOSUB mazescore=0 ; t\$="000"+score ; mdir=1 ; ans=0 ; anf=3//// Player stuffghostspeed=8 ; playerspeed=5 ; px=11 ; py=7game=1animovementdelayount=1ans=0 ; anf=3GOSUB grafixGOSUB setupghosts////////////////////////////////////////////////////////////////////////////////////////////////// MAIN LOOP///////////////////////////////////////////////////////////////////////////////////////////////WHILE NOT FALSEGOSUB domazebackgroundGOSUB drawmazeGOSUB movemuncher // & ghosts via a delayGOSUB statsSHOWSCREENWEND////RoutinesSUB 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 NEXTENDSUBSUB movemuncher:IF KEY(203)dirx=-1 ; diry=0ENDIFIF KEY(205)diry=0 ; dirx=1ENDIFIF KEY(200)diry=-1 ; dirx=0ENDIFIF KEY(208)diry=1 ; dirx=0ENDIF////Check LefyIF 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 ENDIFENDIF////Check RightIF 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 ENDIFENDIF////Check DownIF 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 UpIF 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 ENDIFENDIFENDSUBSUB moveghosts:INC ghostdelay ; IF ghostdelay=ghostspeed+1 THEN ghostdelay=0IF ghostdelay<ghostspeedGOTO movethespooksENDIFIF ghostdelay=ghostspeedFOR 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+1ENDIF IF ghost[a].x>INTEGER(px) AND map[ghost[a].x-1][ghost[a].y]=0ghost[a].x=ghost[a].x-1ENDIF IF ghost[a].y>INTEGER(py) AND map[ghost[a].x][ghost[a].y-1]=0ghost[a].y=ghost[a].y-1ENDIFIF ghost[a].y<INTEGER(py) AND map[ghost[a].x][ghost[a].y+1]=0ghost[a].y=ghost[a].y+1ENDIFNEXTENDIFmovethespooks: // via the drawmazeENDSUB// set up ghostsSUB setupghosts:TYPE spookx ; y ; im ; spooked ; deadENDTYPEGLOBAL ghost[] AS spookDIM ghost[4]RESTORE ghostdata// Set up xpos,ypos,anim image range, directionx/y, spooked(you ate the power pill,deadFOR 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=eNEXTSTARTDATA ghostdata:DATA 7,2,0,0,0DATA 12,4,4,0,0DATA 10,9,8,1,0DATA 1,8,12,1,0ENDDATAENDSUBSUB stats:// place checks here on mathsENDSUBSUB maze:RESTORE screenFOR y=0 TO 16FOR x=0 TO 29READ amap[x][y]=aIF a=5map[x][y]=1ENDIFNEXT ; NEXTSTARTDATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1DATA 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,1ENDDATAENDSUBSUB 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 NEXTENDSUBSUB grafix://LOADSPRITE "dot.bmp", 0DRAWRECT 0,0,2,2,RGB(255,255,255)GRABSPRITE 0,0,0,2,2//LOADANIM "wall.b//LOADANIM "player.bmp",3,22DRAWRECT 0,0,22,23,RGB(255,255,0)GRABSPRITE 3,0,0,22,23 // player//LOADANIM "ghosts.bmp",4,24,24DRAWRECT 0,0,22,23,RGB(0,255,255)GRABSPRITE 4,0,0,22,23//LOADSPRITE "nodot.bmp", 5//LOADANIM "score.bmp",6,162,33//BackgroundTYPE dot ; x ; y ; sx ; sy ; zz ; ENDTYPEGLOBAL spot[] AS dotDIM 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)NEXTENDSUB`

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

#### erico

• Community Developer
• Prof. Inline
• Posts: 4349
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #33 on: 2012-May-18 »
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

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

#### kanonet

• Administrator
• Prof. Inline
• Posts: 1142
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #34 on: 2012-May-18 »
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

#### Schranz0r

• Premium User :)
• Administrator
• Prof. Inline
• Posts: 5077
• O Rly?
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #35 on: 2012-May-18 »
@I love my Brick:

PLS use the CODETAG!!!

the button with the "#", thx!
I DGArray's

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #36 on: 2012-May-20 »
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

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.

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #37 on: 2012-May-20 »
@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.

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #38 on: 2012-May-20 »
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.

#### erico

• Community Developer
• Prof. Inline
• Posts: 4349
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #39 on: 2012-May-20 »
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!

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #40 on: 2012-May-21 »
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.

#### Albert

• Dr. Type
• Posts: 257
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #41 on: 2012-May-21 »
I want this thread with lotsa of screenshots!

#### I love my Brick

• Mr. Drawsprite
• Posts: 61
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #42 on: 2012-May-23 »
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

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.

#### Albert

• Dr. Type
• Posts: 257
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #43 on: 2012-May-24 »
Im posting the "PAC MAN" code here that I lost interest with.

I've compiled it, nice stuff!

#### Albert

• Dr. Type
• Posts: 257
##### Re: Toying with COS & SIN commands to produce 2D effects.
« Reply #44 on: 2012-May-24 »
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]