Search found 646 matches

by grump
Wed Aug 19, 2020 11:14 pm
Forum: Support and Development
Topic: Memory Profiling?
Replies: 27
Views: 10110

Re: Memory Profiling?

Sometimes, Löve objects take a long time to be cleaned up by the GC, letting many of them to accumulate and take a lot of memory. In these cases, it's best to explicitly release them with Object:release . I wonder if that's what's happening here. Memory occupied by LÖVE objects does not count towar...
by grump
Fri Aug 14, 2020 9:10 pm
Forum: Support and Development
Topic: Questions around love.run
Replies: 10
Views: 1261

Re: Order of callbacks?

Tangent question: love.graphics.present says it "will halt the program until ready" (when vsync is on). Does it halt all threads in the program or just the main one? That's more like a completely unrelated question. Only the main thread is concerned with rendering, and only the main thread should c...
by grump
Fri Aug 14, 2020 10:36 am
Forum: Support and Development
Topic: Questions around love.run
Replies: 10
Views: 1261

Re: Order of callbacks?

1. I clicked on the "Maximize" button. - Does this count as "mousepressed"? 2. Window is Maximized. Clicking on window borders, titles. and buttons does not generate mouse events. Alt+F4 does not generate key events either (except the keypressed event for the alt key ofc), even if you don't allow t...
by grump
Fri Aug 14, 2020 10:31 am
Forum: Support and Development
Topic: quit("restart") message passing
Replies: 5
Views: 2156

Re: quit("restart") message passing

I'm pretty sure you can't pass information directly to the new state.

Passing by file sounds like a workable solution to me.
by grump
Thu Aug 13, 2020 11:52 pm
Forum: Support and Development
Topic: Questions around love.run
Replies: 10
Views: 1261

Re: Order of callbacks?

There's probably no difference between "Window events" and "Input". Common sense says user input is processed in the window's message loop just as any other event.

Edit: on a second thought, I'm not sure I understand the question. Maybe you can clarify what you mean?
by grump
Sat Aug 08, 2020 9:12 pm
Forum: Support and Development
Topic: Game cannot find files when packaged as a .love file
Replies: 2
Views: 767

Re: Game cannot find files when packaged as a .love file

dofile doesn't know how to load from .love files. Use love.filesystem.load or loadstring, or require.
by grump
Sat Aug 08, 2020 6:02 pm
Forum: General
Topic: CPU Usage Spiking
Replies: 5
Views: 2322

Re: CPU Usage Spiking

One theory is that it has something to do with my many font size changes, which are mostly getting called inside various draw() calls. If that is one of the causes, is there a better way to do this? Create all font sizes beforehand, don't do it every frame. local font1 = love.graphics.newFont(32) l...
by grump
Sat Aug 08, 2020 6:00 pm
Forum: Support and Development
Topic: love.mousepressed called before or after love.update?
Replies: 1
Views: 664

Re: love.mousepressed called before or after love.update?

All event callbacks are called before update.
by grump
Wed Aug 05, 2020 6:07 pm
Forum: Support and Development
Topic: Most advanced music tracker format?
Replies: 10
Views: 2600

Re: Most advanced music tracker format?

I put the code on GitHub: https://github.com/megagrump/moonvox
Has a few bugs/typos fixed since I posted the example, and includes proper garbage collection handling.