Search found 3713 matches
- Tue Apr 15, 2025 6:09 pm
- Forum: Support and Development
- Topic: Using modules that return two instances of a class
- Replies: 4
- Views: 1042
Re: Using modules that return two instances of a class
Modules typically define classes. Returning instances is somewhat ugly. Anyway, a long time ago, I was told a trick to return multiple values from a module: return a function that returns these values. In your case, it would involve replacing the last line with this: return function() return player1...
- Mon Apr 14, 2025 7:01 pm
- Forum: Support and Development
- Topic: ImageData FFI access for floating point formats
- Replies: 4
- Views: 1079
Re: ImageData FFI access for floating point formats
You'll have to build the float yourself. These functions work, more or less (note: use int16_t * instead of uint16_t * to access the pixels as FFI data): local bit = require('bit') local AND = bit.band local SHL = bit.lshift local SHR = bit.rshift local ldexp = math.ldexp local frexp = math.frexp lo...
- Thu Apr 03, 2025 6:18 pm
- Forum: General
- Topic: Mouse Position to Isometric to Tiles?
- Replies: 7
- Views: 3577
Re: Mouse Position to Isometric to Tiles?
tf:setMatrix( ts, -ts, 0, x0, .5*ts, .5*ts, -ts, y0, 0, 0, 1, 0, 0, 0, 0, 1) Hi, how did you reach that formulation? I can see the x0, y0 as the position elements, but the X basis vector and Y basis vector (with a Z component), those are wooshing over my head. They are column vectors. Only the Z ve...
- Mon Mar 31, 2025 7:48 pm
- Forum: General
- Topic: Mouse Position to Isometric to Tiles?
- Replies: 7
- Views: 3577
Re: Mouse Position to Isometric to Tiles?
I like taking advantage of Löve built-in objects. Such a pity that Transform:transformPoint and Transform:inverseTransformPoint don't support 3D coordinates, even though the matrix is a complete 4x4 one. It's as if Löve is not made for isometric games. local map = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ...
- Sun Mar 30, 2025 11:54 am
- Forum: General
- Topic: Startup time too long
- Replies: 16
- Views: 5306
Re: Startup time too long
no, the no game window is instant Then BrotSagtMist is probably right. The love.conf function must not be in main.lua; it must be inside a file called conf.lua. Did you place it there? Also, with the configuration you wrote, you should not even have a window opening. If you have one, it means you d...
- Sat Mar 29, 2025 11:57 am
- Forum: General
- Topic: Startup time too long
- Replies: 16
- Views: 5306
Re: Startup time too long
There are two similar reports:
viewtopic.php?t=83312
viewtopic.php?t=83045
Does the No Game screen also take forever to show up?
viewtopic.php?t=83312
viewtopic.php?t=83045
Does the No Game screen also take forever to show up?
- Tue Mar 18, 2025 6:49 pm
- Forum: Support and Development
- Topic: Tilemap drawing issues
- Replies: 2
- Views: 1405
Re: Tilemap drawing issues
I tried, but stumbled on some errors when I attempted to make up some assets in order to run and debug it. If you can provide a fully runnable program with just enough assets as for it to run (the assets can be just placeholders, they don't need to be your original assets), that would help me help y...
- Wed Mar 12, 2025 7:00 pm
- Forum: Ports
- Topic: So love.js doesn't support goto?
- Replies: 3
- Views: 1826
Re: So love.js doesn't support goto?
goto is a Lua 5.2 thing, and LuaJIT implements it as an extension . However, love.js can't run LuaJIT and runs PUC Lua 5.1 instead, as far as I know, so I'm afraid you're out of luck. You can always try to compile your own PUC Lua 5.1 backporting the goto extension from 5.2, but I guess that's not a...
- Sat Mar 08, 2025 10:34 am
- Forum: Support and Development
- Topic: How to determine if a value is a LÖVE object?
- Replies: 5
- Views: 1248
Re: How to determine if a value is a LÖVE object?
I was thinking something not too different from what zorg has posted. zorg's code has some bugs and some redundancy, though. - The first two lines should be swapped, otherwise you would always need to pass a string as the second parameter and the second line would be redundant. - The line `if not x ...
- Mon Mar 03, 2025 7:31 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: 2331
Re: I’m very excited to install love for the first time, but I can’t enter the program. Please give me some guidance.
If you're using drag and drop, drag the whole folder, not the main.lua file.