Search found 2835 matches

by slime
Mon Sep 14, 2020 10:34 pm
Forum: Support and Development
Topic: 'untrusted' code
Replies: 10
Views: 1169

Re: 'untrusted' code

Using setfenv with carefully selected functions to expose (without reducing functionality so much that the types of add-ons are limited significantly) and preventing bytecode from being loaded by add-ons has worked pretty well for Vendetta Online , which is a MMOFPS that has had client side Lua add-...
by slime
Mon Sep 14, 2020 11:21 am
Forum: Ports
Topic: Love.js - A Direct Emscripten Port
Replies: 151
Views: 149150

Re: Love.js - A Direct Emscripten Port

If you use scissors, you might need to specify some setCanvas flags. Like the *boolean stencil (false)* on this page: https://love2d.org/wiki/love.graphics.setCanvas Much like the android port, this one is quite picky this things. FWIW, scissors don't need any special setup or setCanvas flags - the...
by slime
Sun Aug 30, 2020 3:55 pm
Forum: Support and Development
Topic: Greyscale image with 1 byte per pixel
Replies: 2
Views: 1234

Re: Greyscale image with 1 byte per pixel

A shader is the only way. Modern GPUs support color component swizzles when creating a texture which would let you do that, but not all GPUs support it and love doesn't provide a way to use that capability at the moment. Here's an example of a basic shader: vec4 effect(vec4 vcolor, Image tex, vec2 t...
by slime
Sat Aug 29, 2020 10:03 pm
Forum: Support and Development
Topic: Multiple Shader and specifically a Moonshine obeservation
Replies: 4
Views: 1102

Re: Multiple Shader and specifically a Moonshine obeservation

Ah, in that case I'd expect most of the performance drop to be caused by the specific effects you're using being rendered to screen_width * screen_height number of pixels pixels at least 20 times (a GPU bottleneck, and more than 20 times if the effects are doing more than one full-screen pass). Depe...
by slime
Sat Aug 29, 2020 9:53 pm
Forum: General
Topic: Love CPU usage
Replies: 32
Views: 13162

Re: Love CPU usage

I'm currently on a Macbook Pro and even an empty application with vsync off and just the sleep the CPU is up to ~103% here is the love file for testing purpose. There was a bug in the version of OpenAL Soft shipped with the original love 11.3 download for macOS which caused increased CPU usage on a...
by slime
Sat Aug 29, 2020 4:55 pm
Forum: Support and Development
Topic: Multiple Shader and specifically a Moonshine obeservation
Replies: 4
Views: 1102

Re: Multiple Shader and specifically a Moonshine obeservation

20 * 10000 is 200,000 individual calls to love.graphics.draw. Most of them will be batched together automatically by LÖVE (since only the color and transformation state change), but even so that's a lot of work being done each frame, with little purpose. Did you mean for your code to do that?
by slime
Sat Aug 22, 2020 7:22 pm
Forum: Support and Development
Topic: Memory Profiling?
Replies: 25
Views: 1838

Re: Memory Profiling?

Garbage collection is local to individual threads / Lua instances, it's just the internal memory address space used by LuaJIT 2.0 that is shared (so in practice the only Lua thing shared is the memory cap).
by slime
Sat Aug 22, 2020 4:02 pm
Forum: Support and Development
Topic: Memory Profiling?
Replies: 25
Views: 1838

Re: Memory Profiling?

What if I use love multithreading? Am I correct that every love thread creates separated Lua environment? LuaJIT's hard memory limit is per process rather than per Lua instance within a process unfortunately, so spreading memory across multiple threads won't raise the limit. That being said, most m...
by slime
Sun Jul 26, 2020 6:26 pm
Forum: Support and Development
Topic: Blur on retina resolution
Replies: 2
Views: 1039

Re: Blur on retina resolution

Setting highdpi to true should work. If you use love.window.setMode you'll need to set it there as well.

For pixel truetype fonts, you may also want to use mono hinting (love.graphics.newFont(filename, size, "mono")).
by slime
Sun Jul 05, 2020 4:58 pm
Forum: Support and Development
Topic: Save on iOS?
Replies: 2
Views: 544

Re: Save on iOS?

File saving and loading should work fine on iOS. It uses the app's sandboxed Application Support directory.