SpaceCat's Game Dev Heroes!
Log In
Community
Classroom
Members
Leaderboards
About
Log In
2
Youssef Badawy
15d •
Feedback Plz?
--Clouds system--
--I mad e a small project. its a clouds spawn system.--
-Is it good?🤔 -Need your feedback.
--here is the code--
clouds={}
function make_clouds()
c={}
c.x=rnd(160)
c.y=rnd(60)
c.spd=rnd(0.5)+0.2
add(clouds,c)
end
function update_clouds()
for c in all(clouds) do
c.x+=c.spd
if c.x>128 then
c.x=-16
c.y=rnd(60)
end
end
end
function draw_clouds()
for c in all(clouds) do
spr(1,c.x,c.y,2,2)
end
end
function _init()
for i=1,15 do
make_clouds()
end
end
function _update()
update_clouds()
end
function _draw()
cls(12)
draw_clouds()
end
Like
3
5 comments
2
--Clouds system--
SpaceCat's Game Dev Heroes!
skool.com/spacecat
Learn pixel art and game development with the wonderful Pico-8 Game Engine! Discussion, courses, and resources to learn to make your own games!
124
Members
1
Online
1
Admin
JOIN GROUP
Leaderboard (30-day)
1
Marko Zakrajsek
+20
2
Youssef Badawy
+11
3
Quintin Balsdon
+7
4
Dennis Guy
+5
5
Enzo Carretto
+4
See all leaderboards
Powered by