Search found 3480 matches
- Sun Apr 20, 2025 5:52 am
- Forum: Support and Development
- Topic: Using modules that return two instances of a class
- Replies: 4
- Views: 1046
Re: Using modules that return two instances of a class
An alternative solution if it's warranted, is to use love.filesystem.load instead of require, but while the former supports multiple return values, only the latter supports caching of the module required, meaning that loading a file multiple times *will* create separate instances of it, while requir...
- Sun Apr 20, 2025 5:50 am
- Forum: Support and Development
- Topic: issue with drawing images
- Replies: 3
- Views: 601
Re: issue with drawing images
A bit more coherent explanation on what's wrong specifically with your code: - You are nesting callback functions, which should not be done (in this case, it's technically not an issue, but still not good form) - love.load is, by a large margin, not needed to be used; anything in that can just go in...
- Sat Apr 12, 2025 5:02 am
- Forum: Support and Development
- Topic: ImageData FFI access for floating point formats
- Replies: 4
- Views: 1087
Re: ImageData FFI access for floating point formats
As far as i know, it should use IEEE; which format did you try with FFI though? single or double precision?
- Sun Apr 06, 2025 4:53 pm
- Forum: Support and Development
- Topic: Layers display and movement
- Replies: 2
- Views: 774
Re: Layers display and movement
When I launch the game, nothing moves, and I have no idea why. Previously, I tried moving the entire background as a single entity (without separating layers), and everything worked smoothly. Can't say i can figure this one out by looking at the code sadly, although i haven't used STI myself, so i ...
- Fri Mar 28, 2025 10:31 pm
- Forum: Support and Development
- Topic: Multiple audio.newSource of same fileI
- Replies: 4
- Views: 2105
Re: Multiple audio.newSource of same fileI
For one of your latter questions, this is specific to audio source objects; Images don't exactly have issues with you drawing multiple of them out, unlike you expecting to be able to play a source multiple times in a way that they would overlap.
- Sat Mar 08, 2025 7:18 am
- Forum: Support and Development
- Topic: How to determine if a value is a LÖVE object?
- Replies: 5
- Views: 1249
Re: How to determine if a value is a LÖVE object?
I am creating an API with editable properties and would like to have basic type checking in it. For regular Lua values this is simple enough but I can't find a way to check if a value is a LÖVE object. I thought to extract Object:typeOf for this but calling it with non LÖVE objects actually causes ...
- Mon Mar 03, 2025 2:16 pm
- Forum: General
- Topic: I’m very excited to install love for the first time, but I can’t enter the program. Please give me some guidance.
- Replies: 5
- Views: 2343
Re: I’m very excited to install love for the first time, but I can’t enter the program. Please give me some guidance.
How are you trying to run your code? I'm assuming you gave löve a path, and you included main.lua, which you shouldn't; path ends at the containing folder, so remove main.lua and it should run.
- Thu Feb 27, 2025 10:08 am
- Forum: Support and Development
- Topic: How to unmount the default source directory or .love file
- Replies: 2
- Views: 986
Re: How to unmount the default source directory or .love file
What mountpoint did you mount the newly mounted archive into? If you didn't supply one, it put the files into the root of the virtual file system, which is probably not the best of ideas. Give the method a second parameter e.g. "mounts/"..tostring(id)" or whatever, and then you can fr...
- Mon Feb 17, 2025 6:48 am
- Forum: Support and Development
- Topic: love.graphics.print makes pixelated text blurry.
- Replies: 5
- Views: 2554
Re: love.graphics.print makes pixelated text blurry.
A bit more explanation, setDefaultFilter should have been called *before* you create a font, and it would have worked as well... if that was the only issue.
- Mon Feb 17, 2025 6:46 am
- Forum: General
- Topic: Why is my screen center this
- Replies: 3
- Views: 3531
Re: Why is my screen center this
You could also use the following function to make the center point (0,0) on the coordinate system you use: love.graphics.translate(-love.graphics.getWidth()/2, -love.graphics.getHeight()/2) Now, "normally", the above should account for DPI scaling (the functions that don't are getPixelWidt...