2 days, um no, 0 days since last bug
My goal with Lua Carousel like with my other recent projects is to get to a point of zero updates. I want to get to an artifact that is runnable forever. My choices of Lua and LÖVE are driven by this goal.
But it's very much an aspirational goal so far. Right now I'll take 1 day without a new version :D In 14 days since launch I've put out 25 versions. But there are some early signs of progress. We just had 2 whole days without a new version! And then right as I was working on a post to celebrate this milestone -- I found a bug X-( Errors in the `car.mousepressed` handler would crash Carousel.
To celebrate (or mourn) the milestone, here's a program I made this morning:
Rects = {} function car.draw() for _,r in ipairs(Rects) do color(r.r, r.g, r.b) rect(r.mode, r.x,r.y, r.w,r.h) end end function car.mousepressed(x,y, button) local r = randrect() if oaa(r) then r.mode = 'line' else r.mode = 'fill' end table.insert(Rects, r) end function oaa(a) for _,r in ipairs(Rects) do if oa(a, r) then return true end end end function s(lo, hi, b) return lo <= b and hi >= b end function overlaps(alo,ahi, blo,bhi) return s(alo,ahi, blo) or s(alo,ahi, bhi) or s(blo,bhi, alo) or s(blo,bhi, ahi) end function oa(a, b) return overlaps(a.x, a.x+a.w, b.x,b.x+b.w) and overlaps(a.y, a.y+a.h, b.y, b.y+b.h) end function randrect() local w = rand(30, 120) local h = rand(90, 300) local x = rand(Safe_width-w-5) local y = rand(Safe_height-h-5) return {x=x, y=y, w=w, h=h, r=rand(), g=rand(), b=rand()} end
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 it, here are the abbreviations this program uses:
g = love.graphics rect = g.rectangle color = g.setColor rand = math.random
Once you get it running, try clicking with a mouse or finger. Where you click won't matter, and you'll be able to create images like you see above.
Files
Get Lua Carousel
Lua Carousel
Write programs on desktop and mobile
Status | In development |
Category | Tool |
Author | Kartik Agaram |
Tags | LÖVE |
More posts
- New version after 3 days16 days ago
- New version after 40 days19 days ago
- Turn your phone or tablet into a chess clock33 days ago
- Guest program: bouncing balls49 days ago
- New version after 3 months, and turtle graphics60 days ago
- Interactively zooming in to the Mandelbrot set on a touchscreen79 days ago
- A little timer app80 days ago
- New version after 4 monthsJun 28, 2024
- Visualizing the digits of πMay 04, 2024
- A little recursion problemApr 15, 2024
Leave a comment
Log in with itch.io to leave a comment.