Search found 860 matches

by pgimeno
Wed Feb 21, 2018 7:17 pm
Forum: General
Topic: Grab part of screen, draw, replace
Replies: 4
Views: 63

Re: Grab part of screen, draw, replace

To make it general, you need two canvases. One would be the back buffer, and the other the copied quad. You would draw to the backbuffer canvas rather than to the screen, and in love.draw, you would draw the backbuffer to the screen. To copy a quad, you need to draw that canvas on the second canvas....
by pgimeno
Mon Feb 19, 2018 6:45 pm
Forum: Support and Development
Topic: Camera and pause problem
Replies: 4
Views: 144

Re: Camera and pause problem

How about this?

Code: Select all

function pause.draw()
  love.graphics.push()
  love.graphics.origin()
  love.graphics.draw(pause.screen)
  -- find the correct coordinates here, probably using font:getWidth("Paused") to centre
  love.graphics.print("Paused", some_x, some_y)
  love.graphics.pop()
end
by pgimeno
Fri Feb 16, 2018 5:43 pm
Forum: Support and Development
Topic: Disable key repeat?
Replies: 22
Views: 669

Re: Disable key repeat?

Sounds like you don't want to use the best way, so maybe you should ask about the next best way instead?
by pgimeno
Fri Feb 16, 2018 5:38 pm
Forum: Support and Development
Topic: Enumerate files outside of root / save directory, recursively
Replies: 22
Views: 550

Re: Enumerate files outside of root / save directory, recursively

...I still disagree with this one; the snippet i reposted should fix all problems without needing to call ffi.C.PhysFS_mount more than once and check whether it failed. ... assuming the Windows version is not statically linked like my Linux versions are. I didn't suggest calling it, just trying to ...
by pgimeno
Fri Feb 16, 2018 3:18 pm
Forum: Support and Development
Topic: Enumerate files outside of root / save directory, recursively
Replies: 22
Views: 550

Re: Enumerate files outside of root / save directory, recursively

If this only happens because you tried to do ffi.load("love") then you missed the fact that on linux, you don't do that. I was just objecting to coffeecat's proposal to always load love: This semantics is probably related to the fact that "Windows symbols are bound to a specific DLL name", while sy...
by pgimeno
Fri Feb 16, 2018 10:25 am
Forum: Support and Development
Topic: Enumerate files outside of root / save directory, recursively
Replies: 22
Views: 550

Re: Enumerate files outside of root / save directory, recursively

I think the best practice is to always use ffi.load("love"). It's an already loaded dynamic library, and each dynamic library is loaded at most one time for one executable. Therefore ffi.load("love") does no actual loading. Does not work for me in Linux. $ love . Error: main.lua:8: liblove.so: cann...
by pgimeno
Thu Feb 15, 2018 9:53 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

Hello, welcome to the forums! Once development finishes, the source directory is typically zipped and either renamed to .love or appended to the executable. Saving to that directory would mean to rezip what you save. Löve does not make this possible (it would take a disproportionately big amount of ...
by pgimeno
Thu Feb 15, 2018 12:56 am
Forum: Support and Development
Topic: Enumerate files outside of root / save directory, recursively
Replies: 22
Views: 550

Re: Enumerate files outside of root / save directory, recursively

I've found this but I don't know how well it is supported across platforms: https://github.com/spacewander/luafilesystem

I don't think there's a built-in way to do it with Lua.
by pgimeno
Thu Feb 15, 2018 12:29 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)

Problem is the luajit does not include love functions. Eventually I understood that luajit is somewhat embedded into LOVE, that's why string.dump can exist, too. That doesn't matter for compiling the code. I've tested under linux: $ cat > main.lua function love.draw() love.graphics.print("Hello, wo...
by pgimeno
Wed Feb 14, 2018 12:24 pm
Forum: Games and Creations
Topic: Shipped my first project: tanz.love - A euclidean rhythm generation toy/tool.
Replies: 6
Views: 415

Re: Shipped my first project: tanz.love - A euclidean rhythm generation toy/tool.

Here's how I reproduce it: - Start with a fresh copy (delete or rename the save folder). - Set the fade balance to the centre approximately (wouldn't it make more sense if that was the default?). - Change # to 2 (in the R channel, first drums) - Change ⬌ to 4 - Go to the L channel - Change # to 3 - ...