Search found 863 matches

by pgimeno
Fri Feb 23, 2018 12:18 pm
Forum: General
Topic: Need help with (big) Table iteration
Replies: 4
Views: 174

Re: Need help with (big) Table iteration

Try adding [url=viewtopic.php?f=5&t=82562] to see if that helps. If it does, you may want to invest some time looking into spritebatches.
by pgimeno
Fri Feb 23, 2018 8:17 am
Forum: Support and Development
Topic: Ellipsis not working?
Replies: 8
Views: 104

Re: Ellipsis not working?

It's actually a difference between Lua and LuaJIT. Lua 5.1 still recognizes arg, but LuaJIT doesn't. See http://luajit.org/faq.html (third item). $ lua Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > function x(...) for k,v in next,arg do print(k,v) end end; x(1,2,3) 1 1 2 2 3 3 n 3 > $ luajit ...
by pgimeno
Thu Feb 22, 2018 10:08 pm
Forum: Support and Development
Topic: How I make collision affect objects?
Replies: 1
Views: 59

Re: How I make collision affect objects?

There are two ways: 1. Implement it yourself. 2. Use a pre-made library. Each of these options has several ramifications. The choice depends on your skills, the project that you aim for and, for the first option, the work you want to invest into it. A simple model that fits typical map-based games, ...
by pgimeno
Wed Feb 21, 2018 7:17 pm
Forum: General
Topic: Grab part of screen, draw, replace
Replies: 4
Views: 141

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: 163

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: 707

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: 577

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: 577

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: 577

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: 96

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 ...