Search found 14 matches

by Moonkis
Tue Aug 01, 2017 4:38 pm
Forum: Support and Development
Topic: Reading input (keyboard, mouse) on an unfocused window?
Replies: 5
Views: 4199

Re: Reading input (keyboard, mouse) on an unfocused window?

love (and SDL, the library love uses for cross-platform input) don't have that capability. What sort of thing would you use it for? Ah, I see. I imagine it being platform dependent. In this case I would use it to create a few graphical twitch/stream tools that are ran in the background, and needs t...
by Moonkis
Tue Aug 01, 2017 4:15 pm
Forum: Support and Development
Topic: Reading input (keyboard, mouse) on an unfocused window?
Replies: 5
Views: 4199

Reading input (keyboard, mouse) on an unfocused window?

Well as the title says I'm wondering if it's at all possible within love to read keystrokes, mouse inputs when the game is unfocused (foreground)? isDown, keypressed and keyreleased seems to produce nothing when the window isn't focused.
by Moonkis
Tue Mar 21, 2017 4:27 pm
Forum: General
Topic: What code editor do you use ?
Replies: 195
Views: 294731

Re: What code editor do you use ?

I used to use Sublime Text 2, but I switched to Atom a long time ago, I just fancied the editor more I guess. So Atom is what I use, with a bunch of packages (mainly not Lua specific). Apparently there is an auto-complete package. I love it since I can use it as a portable-version, it works on Windo...
by Moonkis
Sun Aug 10, 2014 8:36 am
Forum: Support and Development
Topic: Drawing a tilemap on a canvas, problem with culling.
Replies: 2
Views: 3272

Drawing a tilemap on a canvas, problem with culling.

I'm currently participating in the gbjam3, and so far it's going pretty good. To get the scaling smooth (with no gap between tiles or the like) I'm drawing everything to a canvas, then scaling and translating it by the cameras origin. The problem is that I'm not sure how to get the culling to work, ...
by Moonkis
Sun Feb 23, 2014 12:50 pm
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

Ipairs is unsafe with either adding or removing, but next (and thus pairs) is safe when removing, but not adding. The relevant line from the manual : The behavior of next is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existin...
by Moonkis
Sun Feb 23, 2014 10:48 am
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

If we are only iterating and adding in a loop (no removal) is it safe to use the iterator-loops like ipairs and pairs?
by Moonkis
Sat Feb 22, 2014 6:24 pm
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

One minor thing: - Instead of if e:isAlive() == false then you can do if not e:isAlive() then . Not really important, but I think it looks better, and it takes less time to type. You can do whatever you want to do, though. As for your solution, that's not the way I would do it, but I guess if it wo...
by Moonkis
Sat Feb 22, 2014 4:34 pm
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

Fruit[2] isn't touched here because when Fruit[1] is removed, Fruit[2] becomes Fruit[1], while the index is at 2. I hope that makes sense. It's a bit confusing. :P As for your for-loop, I don't think it affects it, but I'm not sure. Since you're using pairs, I'm assuming you have a table that looks...
by Moonkis
Sat Feb 22, 2014 3:54 pm
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

It depends on how you're iterating. If you have a loop that starts at the end and iterates until the beginning adding -1 each time, it's harmless. Now if you have a normal for-loop, you're really messing it up. Here's what I mean: Fruits = { { Color = { 255, 0, 0, 255 }, Taste = 'Great!', Size = 64...
by Moonkis
Sat Feb 22, 2014 3:31 pm
Forum: Support and Development
Topic: Problem with drawing moving sprites.
Replies: 21
Views: 8451

Re: Problem with drawing moving sprites.

Yes, it works now. I see no problem what so ever here, it may be your computer. Have you tried spamming bullets (Holding spacebar)? Its then the problem arises. I "kind" of fixed this, by basically move the table.remove(...) into it's own loop which runs after the update-loop. Is table.re...