Search found 1495 matches

by pgimeno
Wed Feb 06, 2019 12:47 pm
Forum: Support and Development
Topic: [RESOLVED] i compile the .love and it dont run
Replies: 4
Views: 413

Re: i compile the .love and it dont run

Looking at componnents/FileCreator.lua showed some bits of very system-specific code. That obviously won't work in my Linux system.
by pgimeno
Tue Feb 05, 2019 7:50 pm
Forum: Support and Development
Topic: [SOLVED] Avoiding callback hell
Replies: 6
Views: 597

Re: [SOLVED] Avoiding callback hell

I'm still not 100% sure of what you need. But if you're looking for a canned solution, it may be timer.script from vrld's hump or the coil cooperative multithreading lib . Personally, for certain use cases (not sure if they match yours), I would go with making my own coroutine-based system, where th...
by pgimeno
Tue Feb 05, 2019 11:38 am
Forum: Support and Development
Topic: What's the best approach for fonts?
Replies: 6
Views: 457

Re: What's the best approach for fonts?

In terms of performance, I don't expect any difference beyond the initial font creation and the video memory that the fonts consume and that isn't available for other stuff (that's probably not an issue). My post was about the looks. I've made a comparison program: local lg = love.graphics local def...
by pgimeno
Mon Feb 04, 2019 11:01 am
Forum: Support and Development
Topic: What's the best approach for fonts?
Replies: 6
Views: 457

Re: What's the best approach for fonts?

Bitmaps don't scale down well to under 50% of the size, and I don't know if the bitmap that LÖVE generates for the font uses mipmaps internally. You could test scaling a font to under 50%, and if it looks jagged at some points, it means it doesn't use mipmaps. In that case, the best solution might b...
by pgimeno
Mon Feb 04, 2019 10:41 am
Forum: Support and Development
Topic: Cant find the error in my code. "attempt to index global `self´ (a nil value)"
Replies: 1
Views: 331

Re: Cant find the error in my code. "attempt to index global `self´ (a nil value)"

Hi, welcome to the forums. There are a number of issues in your code. One is that there is an imbalance of if...end inside function Butterfly:update(), which makes it end prematurely, causing the rest of the code execute before calling the function. That's what's causing the first error. Try to be r...
by pgimeno
Sun Feb 03, 2019 6:13 pm
Forum: General
Topic: slower sandboxed lua
Replies: 2
Views: 309

Re: slower sandboxed lua

You're looking at the wrong project. Try Minetest instead of Minecraft.

In particular, this mod implements a LuaController, with a fairly secure sandbox:
https://github.com/minetest-mods/meseco ... controller
by pgimeno
Sat Feb 02, 2019 8:09 pm
Forum: Support and Development
Topic: "Islands" not being generated after certain x/y value
Replies: 3
Views: 367

Re: "Islands" not being generated after certain x/y value

The # operator isn't guaranteed to work unless the arrays start in 1. I think LuaJIT is more forgiving about not starting exactly with 1, but not as much as 1000 times more forgiving. The problem seems to be in the iteration limit for the drawing loop. Changing it to this worked for me: for x = isla...
by pgimeno
Sat Feb 02, 2019 9:06 am
Forum: General
Topic: LuaSocket Help?
Replies: 6
Views: 449

Re: LuaSocket Help?

by pgimeno
Fri Feb 01, 2019 8:07 pm
Forum: General
Topic: LuaSocket Help?
Replies: 6
Views: 449

Re: LuaSocket Help?

The code is somewhat hard to follow for me. What I could notice is an alarming lack of calls to socket.select(). Also, sockets typically have either a high timeout (if they're designed to be blocking) or a zero timeout (if not), because socket.select() usually does the wait. For an example of a (col...