New version after 3 months, and turtle graphics
Lua Carousel » Devlog

This version may matter a lot to some people. I massively sped up `print` calls in Carousel. So if you are in the habit of printing a lot to the lower half of the screen, you'll want this.
Someone asked me if LÖVE or other languages support Turtle graphics like in Logo. The answer is: no, but it's easy to build. Then of course I had to build it in Carousel:
X, Y = Safe_width/2, 200
angle = 90
state = 'down'
color(0,0,1)
function up()
state = 'up'
end
function down()
state = 'down'
end
function forward(d)
local a = angle*pi/180
local x2 = boundx(X+d*cos(a))
local y2 = boundy(Y+d*sin(a))
if state == 'down' then
line(X,Y, x2,y2)
local a2 = 15*pi/180
line(x2,y2, x2-10*cos(a-a2), y2-10*sin(a-a2))
line(x2,y2, x2-10*cos(a+a2), y2-10*sin(a+a2))
end
X,Y = x2,y2
end
function left()
turn(-90)
end
function right()
turn(90)
end
function turn(da)
angle = angle+da
end
function boundx(x)
return max(0, min(Safe_width, x))
end
function boundy(y)
return max(0, min(Safe_height, y))
end
forward(100)
turn(120)
forward(100)
turn(120)
forward(100)
If you try pasting this program into Lua Carousel, remember to first run the abbreviations on one of the example screens. Or if you've deleted that screen, here are the abbreviations I used in this post:
g = love.graphics line = g.line color = g.setColor min, max = math.min, math.max pi, cos, sin = math.pi, math.cos, math.sin
Files
carousel-bj.love 118 kB
Oct 05, 2024
carousel-bj-safe.love 118 kB
Oct 05, 2024
Get Lua Carousel
Lua Carousel
Write programs on desktop and mobile
| Status | In development |
| Category | Tool |
| Author | Kartik Agaram |
| Tags | LÖVE |
More posts
- Programming on your device with your preferred language53 days ago
- Lua Carousel: program on the device you have, with docs at your fingertipsMay 12, 2025
- Pong Wars, MMO editionFeb 16, 2025
- New version after 41 days, and stop-motion animationFeb 15, 2025
- Drawing with a pen on a pendulumJan 11, 2025
- New version after 16 daysJan 04, 2025
- New version after 9 daysDec 19, 2024
- New version after 3 daysNov 17, 2024
- New version after 40 daysNov 14, 2024
- Turn your phone or tablet into a chess clockNov 01, 2024
Leave a comment
Log in with itch.io to leave a comment.