Search found 14 matches

by Kartik Agaram
Tue Aug 09, 2022 9:31 am
Forum: Support and Development
Topic: creating low-power apps without animations
Replies: 8
Views: 1762

Re: creating low-power apps without animations

That makes sense. This thread also reminded me of Canvas which might be a better way to save power. Do you turn each of your layers into canvases?
by Kartik Agaram
Mon Aug 08, 2022 3:27 pm
Forum: Support and Development
Topic: creating low-power apps without animations
Replies: 8
Views: 1762

Re: creating low-power apps without animations

Thanks everyone for the extremely illuminating answers!
Have fun getting a blinking cursor with that.
That is, in fact, the one bit of animation I was hoping to retain :D Which introduces problems of redrawing the character under the cursor as well..
by Kartik Agaram
Mon Aug 08, 2022 4:25 am
Forum: Support and Development
Topic: creating low-power apps without animations
Replies: 8
Views: 1762

creating low-power apps without animations

I have this idea for an app that draws to the screen as little as possible. So I tried modifying love.run (from https://love2d.org/wiki/love.run) to only draw on events: function love.run() love.graphics.setBackgroundColor(1,1,1) love.graphics.origin() love.graphics.clear(love.graphics.getBackground...
by Kartik Agaram
Mon Jul 25, 2022 9:55 pm
Forum: Support and Development
Topic: alt-tab into LÖVE window sometimes emits 'tab' keypress event
Replies: 5
Views: 1546

alt-tab into LÖVE window sometimes emits 'tab' keypress event

Here's a simple .love file. I'll also paste in all of main.lua: Text = '' function love.draw() love.graphics.setColor(1,1,1) love.graphics.print(Text) end function love.keypressed(key, scancode, isrepeat) if key == 'tab' then Text = Text..key elseif key == 'escape' then Text = '' end end As you can ...
by Kartik Agaram
Sun Jul 03, 2022 3:14 pm
Forum: Games and Creations
Topic: Building a text editor in LÖVE
Replies: 11
Views: 3879

export

I built an exporter to markdown+SVG -- as a separate app. You can see it in action in this video: https://merveilles.town/@akkartik/108580451364837131. This way people who need the export functionality can get it, without complicating the code for everyone else.
by Kartik Agaram
Fri Jun 17, 2022 10:55 pm
Forum: Games and Creations
Topic: Building a text editor in LÖVE
Replies: 11
Views: 3879

Re: Building a text editor in LÖVE

Thanks everyone, I reduced the write frequency. I ended up going with a single timer. Now all the places where I was writing before simply set a dirty bit to schedule a save. Then I periodically save inside update based on the timestamp of the dirty bit. This seems equivalent to all your suggestions...
by Kartik Agaram
Fri Jun 17, 2022 1:12 pm
Forum: Games and Creations
Topic: Building a text editor in LÖVE
Replies: 11
Views: 3879

Re: Building a text editor in LÖVE

https://superuser.com/questions/1117900 ... hard-drive

Thanks for raising the issue. SSD lifetime wasn't on my radar at all. I'm still thinking about the best way to deal with it.
by Kartik Agaram
Fri Jun 17, 2022 4:09 am
Forum: Games and Creations
Topic: Building a text editor in LÖVE
Replies: 11
Views: 3879

Re: Building a text editor in LÖVE

My editor autosaves whenever something changes in the file. Clicking on the button mutates the underlying file.
by Kartik Agaram
Fri Jun 17, 2022 1:40 am
Forum: Games and Creations
Topic: Building a text editor in LÖVE
Replies: 11
Views: 3879

Building a text editor in LÖVE

I've always wanted an editor for plain text that would let me seamlessly insert line drawings. I finally got around to this desire after discovering LÖVE. http://akkartik.name/lines.html I've had only good experiences so far with Lua and LÖVE. They let me build apps with just Lua that is easy for an...