Search found 1548 matches

by raidho36
Wed Feb 21, 2018 6:55 pm
Forum: General
Topic: Grab part of screen, draw, replace
Replies: 4
Views: 63

Re: Grab part of screen, draw, replace

You can draw to an intermediate render target, then perform manipulations with it, and finally put it on the screen.
by raidho36
Sat Feb 17, 2018 12:05 pm
Forum: Support and Development
Topic: Disable key repeat?
Replies: 22
Views: 669

Re: Disable key repeat?

LÖVE mainly handles input via events, the "isDown" is for quick and dirty hacks mid-development and you shouldn't rely on it.
by raidho36
Fri Feb 16, 2018 7:34 pm
Forum: Games and Creations
Topic: Metal Slug Type Game [Prototype]
Replies: 2
Views: 251

Re: Metal Slug Type Game [Prototype]

Odd choice of player sprites.
by raidho36
Fri Feb 16, 2018 7:31 pm
Forum: Support and Development
Topic: Disable key repeat?
Replies: 22
Views: 669

Re: Disable key repeat?

My input library (see signature) supports "wasDown" function which returns "true" or "false" if the key was depressed or released on the previous frame.
by raidho36
Fri Feb 16, 2018 4:05 pm
Forum: Support and Development
Topic: Disable key repeat?
Replies: 22
Views: 669

Re: Disable key repeat?

The isDown function returns "true" for as long as the button is depressed, "false" otherwise. Simple, really. You can get individual press or release events using event handler, and they will indicate if it's a system repeated press or not.
by raidho36
Fri Feb 16, 2018 8:05 am
Forum: Support and Development
Topic: luajit - attempt to index global 'love' (a nil value)
Replies: 18
Views: 568

Re: luajit - attempt to index global 'love' (a nil value)

Well it's a given that bytecode generated for Lua 5.1 will not work with Lua 5.2 either, so that's not really an argument.

As far as I'm concerned, Lua 5.2 or 5.3 didn't add anything that LuaJIT 5.1 doesn't have.
by raidho36
Thu Feb 15, 2018 5:47 pm
Forum: Support and Development
Topic: luajit - attempt to index global 'love' (a nil value)
Replies: 18
Views: 568

Re: luajit - attempt to index global 'love' (a nil value)

Note that JIT is disabled by default on mobile - on iOS it's because JIT violates AppStore policy, and on Android it's because often enough performance will be many times worse than in interpreted mode. If you want to improve performance, there is a number of tricks you can employ. Use FFI C structs...
by raidho36
Thu Feb 15, 2018 2:21 pm
Forum: Support and Development
Topic: Ternary operator for just two possibilities?
Replies: 9
Views: 244

Re: Ternary operator for just two possibilities?

You check against "1", not "variable", so it doesn't work. Note that this is not a real ternary operator, it's just the way Lua's "and" and "or" work allows to make things like that. It will fail to work if your first value resolves to "false" and will return the second value instead.
by raidho36
Thu Feb 15, 2018 10:08 am
Forum: Support and Development
Topic: A question about writing and appending with love.filesystem
Replies: 3
Views: 93

Re: A question about writing and appending with love.filesystem

It's not like you would want users to be able to screw up the config file without being able to revert to defaults by deleting it, forcing complete re-install if anything goes wrong.