Search found 160 matches

by ReFreezed
Mon Oct 19, 2020 12:41 am
Forum: General
Topic: Optimization entry in wiki
Replies: 4
Views: 256

Re: Optimization entry in wiki

I don't think that page has any serious problems. Using locals is generally faster than having table lookups. I did a little testing too and my results regarding math.sin is similar to yours, i.e. it doesn't seem to matter if 'sin' is local or not - it's basically the same speed. It might have somet...
by ReFreezed
Fri Oct 09, 2020 12:18 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 739

Re: Created .exe, when running .exe error unable to load audio file

Make sure the audio files are in the .love file. All files for your game, except the .dll files, should be in the .love file.
by ReFreezed
Sat Oct 03, 2020 4:05 pm
Forum: Support and Development
Topic: How to move a part of a canvas
Replies: 4
Views: 245

Re: How to move a part of a canvas

Just draw 'image' to different coordinates?

Code: Select all

canvas:renderTo(function()
	love.graphics.draw(image, 100, 100)
end)
by ReFreezed
Mon Sep 28, 2020 1:21 am
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 17
Views: 14565

Re: LuaPreprocess

I know what you mean, but unlike C/C++ there's only one language here. There are other preprocessors for Lua that has like a separate language for the "metaprogram" but that is something I specifically wanted to avoid. It's all Lua here. Another difference to C/C++ is that actual human-readable Lua ...
by ReFreezed
Sun Sep 27, 2020 2:41 pm
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 17
Views: 14565

Re: LuaPreprocess

@ivan I don't agree that unnecessary complexity is being added. I've used the library in multiple projects now and I've found that it makes a bunch of different tasks easier to do, and other tasks that weren't even possible before now becoming possible, without saying anything specific. (That exampl...
by ReFreezed
Sat Sep 26, 2020 11:35 pm
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 17
Views: 14565

Re: LuaPreprocess

Update 1.11.1 Changes since 1.11: Library: Huge numbers are now outputted as '1/0' instead of 'math.huge'. Fixed newToken("pp_keyword",...) not accepting all preprocessor keywords. Better error message for unescaped newlines in string literals. Other: Preprocess.cmd returns %ERRORLEVEL%. ---- More ...
by ReFreezed
Tue Sep 08, 2020 8:53 pm
Forum: General
Topic: export video from love2d
Replies: 6
Views: 5563

Re: export video from love2d

Expanding on the ImageData idea, a simple solution is to use love.graphics.captureScreenshot to capture each frame. No canvas required. Of course, none of these methods capture any sound. Your best bet is probably to use an external recording program as LÖVE indeed does not provide a way to encode v...
by ReFreezed
Thu Sep 03, 2020 4:06 pm
Forum: Support and Development
Topic: how get matrix from image
Replies: 9
Views: 2985

Re: how get matrix from image

Depends on what you call best. (...) You're right. I wasn't thinking about the FFI approach. I would say mapPixel is more of a "Lua" way of doing things as with FFI you're directly reading from and writing to memory (i.e. bypassing everything in Lua completely). It depends on what the OP is looking...
by ReFreezed
Thu Sep 03, 2020 8:38 am
Forum: Support and Development
Topic: how get matrix from image
Replies: 9
Views: 2985

Re: how get matrix from image

I meant that it's not useful for manipulating the object because there's no setString, so there doesn't seem to be much point in manipulating the string itself, or am I missing something again? You can use the modified string as an argument when calling newImageData() though. Anyway, using ImageDat...
by ReFreezed
Mon Aug 31, 2020 8:53 am
Forum: Support and Development
Topic: Using Lua-stdlib
Replies: 2
Views: 1795

Re: Using Lua-stdlib

I agree with zorg. That library collection doesn't look very useful. It's better to focus on specific problems as they appear. As you say, simplicity is part of the idea of Lua, and adding "standard" things that you don't for sure know will help is only going to be clutter. Game development is messy...