@TokOut You need to do more studying instead of programming and posting code. You're above program can be done with a lot less code (see below). The more you learn, the better you'll understand how to do more with less code.
function setup()
tab={}
for z=1,30 do
table.insert(tab,color(math.random(255),math.random(255),math.random(255)))
end
end
function draw()
background(0)
for z=#tab,1,-1 do
fill(tab[z])
ellipse(WIDTH/2,HEIGHT/2,z*20)
end
end
displayMode(FULLSCREEN)
function setup()
tab={}
for z=1,45 do
table.insert(tab,color(math.random(255),math.random(255),math.random(255)))
end
end
function draw()
background(0)
for z=#tab,1,-1 do
fill(tab[z])
ellipse(WIDTH/2,HEIGHT/2,z*20)
end
restart()
end
@TokOut There's no reason to call restart() every draw cycle, and even more code can be taken out.
displayMode(FULLSCREEN)
function draw()
background(0)
for z=40,1,-1 do
fill(math.random(255),math.random(255),math.random(255))
ellipse(WIDTH/2,HEIGHT/2,z*20)
end
end
@tokOut Thanks for sharing your project, it's very.... "russianesque", both in the code and art style.
Actually the coding style reminds me a lot of the what I did on my graphic calculator 20+years ago.. And then my mother got me a couple Ti graphic calculators gamebooks and I eventually found out about the wonders of loops
So yeah, loops, you should really try to get familliar with them. Read @dave1707 's code some more and check out @Ignatz 's tutorials, they will help you a lot ! https://coolcodea.wordpress.com
Comments
There is a new code given - This content is outdated
@TokOut You need to do more studying instead of programming and posting code. You're above program can be done with a lot less code (see below). The more you learn, the better you'll understand how to do more with less code.
But the ellipse don't change his color - It is not animated - @dave1707
This is better:
@TokOut - you should still study dave's code, because it is good.
Ok. And this is to my code:
@TokOut There's no reason to call restart() every draw cycle, and even more code can be taken out.
UPDATED CODE AT HEAD POINT
- More Ellipses with BackGoing Color
Ellipses on Rects (coordinates z and v)
Shader by Rect Ellipses
3D Effect in the middle ellipses
The interesting thing about this is sometimes I seem to be looking down a hole and other times it looks like a mountain peak.
@tokOut Thanks for sharing your project, it's very.... "russianesque", both in the code and art style.
Actually the coding style reminds me a lot of the what I did on my graphic calculator 20+years ago.. And then my mother got me a couple Ti graphic calculators gamebooks and I eventually found out about the wonders of loops
So yeah, loops, you should really try to get familliar with them. Read @dave1707 's code some more and check out @Ignatz 's tutorials, they will help you a lot !
https://coolcodea.wordpress.com
This page regroups a few more tutorials too, including some very basic ones: https://www.kidscodecs.com/codea-tutorials/