Search found 4835 matches

by bartbes
Sat Aug 04, 2018 8:24 am
Forum: Support and Development
Topic: Can I save an image loaded with love.graphics.newImage() as png?
Replies: 6
Views: 5571

Re: Can I save an image loaded with love.graphics.newImage() as png?

Yes, but not easily. I think you have to draw the Image to a Canvas, then get ImageData from that. Then you can use the ImageData:encode function to save it.
by bartbes
Sat Aug 04, 2018 8:22 am
Forum: Support and Development
Topic: Runing love2d inside python
Replies: 2
Views: 5806

Re: Runing love2d inside python

It looks like lupa explicitly supports loading lua binary modules. So if you compile (lib)love against lupo it might work.
by bartbes
Sat Aug 04, 2018 8:16 am
Forum: Support and Development
Topic: [Solved] Help Building Love2D from Source
Replies: 3
Views: 4288

Re: Help Building Love2D from Source

I remember looking at this a while back, it looks like msvc changed its standard library in an incompatible way again. Omitting that line is indeed a possible fix, and it might be the one I end up going for.
by bartbes
Tue Jul 10, 2018 5:13 pm
Forum: Support and Development
Topic: Help, I upgraded to 11.1 and now everything's fucked
Replies: 3
Views: 3476

Re: Help, I upgraded to 11.1 and now everything's fucked

Okay, let's do this one by one.. I decided to upgrade and adapt my game so it would be compatible. Once I did this, trying to run love resulted in the error: love: error while loading shared libraries: liblove-11.1.so: cannot open shared object file: No such file or directory I'm guessing you're run...
by bartbes
Sun Jul 01, 2018 11:33 am
Forum: Support and Development
Topic: Creating an instance of the Image class from C++ and pushing it to Lua
Replies: 5
Views: 4939

Re: Creating an instance of the Image class from C++ and pushing it to Lua

Well, you create a FileData from the downloaded data, then create an ImageData from that, you then use that ImageData to create an Image::Slices object, and use that to create an Image.
by bartbes
Sat Jun 30, 2018 7:39 pm
Forum: General
Topic: lua 5.1
Replies: 2
Views: 2874

Re: lua 5.1

Note that the lua 5.1 docs specify the following behaviour for the length operator: function len_event (op) if type(op) == "string" then return strlen(op) -- primitive string length elseif type(op) == "table" then return #op -- primitive table length else local h = metatable(op)....
by bartbes
Sat Jun 30, 2018 7:54 am
Forum: Support and Development
Topic: Creating an instance of the Image class from C++ and pushing it to Lua
Replies: 5
Views: 4939

Re: Creating an instance of the Image class from C++ and pushing it to Lua

This is kind of vague, what do you want to know? You can definitely just instantiate an Image. Are you looking for luax_pushtype?
by bartbes
Mon Jun 25, 2018 8:30 pm
Forum: Support and Development
Topic: [SOLVED] Can os.execute() be executed after LÖVE is closed?
Replies: 2
Views: 2884

Re: [SOLVED] Can os.execute() be executed after LÖVE is closed?

You could also try calling love.window.close, then call os.execute, and re-open the window with love.window.setMode after, that way you have a single continuous love process, if you want.
by bartbes
Sun Jun 24, 2018 8:04 am
Forum: Support and Development
Topic: Prevent freezing while working with large files?
Replies: 28
Views: 19594

Re: Prevent freezing while working with large files?

Can't you just get an actual file handle in append mode and keep appending that way? Sure sounds more efficient than repeatedly opening and closing the same file.
by bartbes
Sat Jun 23, 2018 8:51 am
Forum: General
Topic: Trying to draw a textured polygon
Replies: 4
Views: 4514

Re: Trying to draw a textured polygon

Note that love.graphics.quad, contrary to what the name might suggest, did not draw Quads at all, it drew quadrilaterals. Anyway, the answer is to use a Mesh. Note that shaders are supported everywhere love is, but on phones/embedded devices the shaders need to be OpenGL ES-compliant too.