Search found 638 matches

by grump
Sat Oct 24, 2020 1:36 pm
Forum: Support and Development
Topic: Is DDS cross platform? (+ related question)
Replies: 2
Views: 118

Re: Is DDS cross platform? (+ related question)

DXTn is widely supported on desktop machines. BCn seems to be the standard on mobile. As far as I know, there is no common denominator that works everywhere.
by grump
Sat Oct 24, 2020 1:14 pm
Forum: Support and Development
Topic: simple particle question
Replies: 7
Views: 184

Re: simple particle question

love.graphics.newRectangle does not even exist. That "self-explanatory" error message explains to you that ParticleSystem can only emit Textures.

Draw the rectangle to a Canvas to use it as a texture.
by grump
Thu Oct 22, 2020 1:43 pm
Forum: General
Topic: Love CPU usage
Replies: 39
Views: 18299

Re: Love CPU usage

5000 distinct images per frame is not only an unrealistic scenario, it is also the worst possible way to render graphics. Switching textures is expensive, and it breaks batching. Better performance can be achieved by using sprite atlases (many images in one single texture), and Quad s to render them...
by grump
Wed Oct 21, 2020 10:54 am
Forum: Support and Development
Topic: Using shader in Love2D
Replies: 2
Views: 105

Re: Using shader in Love2D

See the "Shader language" part of love.graphics.newShader for basic differences. The variables provided by the Shadertoy runtime (buffers, time, etc.) should be documented on their site somewhere - you have to implement most of those yourself in LÖVE.
by grump
Mon Oct 12, 2020 10:05 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 1666

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

I would be concerned with using LÖVE's systems/API at any point before love.load() is called. Later than that should be fine (after all systems were initialized). AFAIK, love.load has no technical relevance. Anything you can do in in love.load, you can do at the top level of main.lua. The error her...
by grump
Mon Sep 28, 2020 12:18 pm
Forum: Support and Development
Topic: Love2D and HTML5 games
Replies: 8
Views: 881

Re: Love2D and HTML5 games

ivan wrote:
Mon Sep 28, 2020 6:46 am
https://2dengine.com/superchains/
That's not working for me in Firefox 81.0

Code: Select all

Uncaught ReferenceError: SharedArrayBuffer is not defined
    Love https://2dengine.com/superchains/love.js:9
    applicationLoad https://2dengine.com/superchains/:35
    onload https://2dengine.com/superchains/:1
by grump
Mon Sep 28, 2020 12:14 pm
Forum: Support and Development
Topic: Documentation lists multiple versions of the same function
Replies: 2
Views: 484

Re: Documentation lists multiple versions of the same function

There is only one function, but what that function does depends on the number and the types of the call arguments. love.graphics.newFont('myfont.ttf') -- create font with default size and options love.graphics.newFont('myfont.ttf', 32) -- create font at size 32 with default options love.graphics.new...
by grump
Mon Sep 14, 2020 10:18 pm
Forum: Support and Development
Topic: 'untrusted' code
Replies: 10
Views: 3797

Re: 'untrusted' code

LÖVE does nothing to protect the user's system from malicious code. You can sandbox code with setfenv , but that may not be very practical for modding, and it's only superficially secure and no defense against JIT exploits , or other kinds of exploits. There is always a risk involved when running un...
by grump
Sun Sep 13, 2020 7:14 pm
Forum: Support and Development
Topic: Getting a key as a number
Replies: 8
Views: 3745

Re: Getting a key as a number

var = { {}, {}, {} } I want some way to get var[1] to return as the number 1, var[2] to return as the number 2, etc. Is there something built-in to do this, or would I need a complicated function? I'm trying to make sense of your question, but I'm not sure I understand what you mean. The three tabl...
by grump
Wed Sep 09, 2020 5:36 am
Forum: Support and Development
Topic: Help with making a wait() function
Replies: 2
Views: 3942

Re: Help with making a wait() function

That code shouldn't crash. If it crashes then something is wrong with your system. It may result in a "Application is not responding" message from your OS if the value for seconds is sufficiently large, but it shoudn't crash.

Love already has a function for that, btw: love.timer.sleep.