Search found 174 matches

by Andlac028
Thu May 25, 2023 4:23 am
Forum: Support and Development
Topic: how can i access x and y love.touch.getPosition variables?
Replies: 6
Views: 1592

Re: how can i access x and y love.touch.getPosition variables?

You set bx to ConMouseX, which you initialize in load as latest active touch, which almost always would be none, so the loop is not called at all and ConMouseX is not set to any number, so it is nil.
by Andlac028
Wed May 24, 2023 6:48 pm
Forum: Support and Development
Topic: Get the dimensions of the overlapping section of two rectangles
Replies: 2
Views: 940

Re: Get the dimensions of the overlapping section of two rectangles

If you are sure, the rectangles overlap, you can find it this way. Imagine some situation: +--------------+ | | | +--------+ | | | | | | | | | +--|--------|--+ | | +--------+ Now we can see, that if we want to get x of overlap, it is math.max(x1, x2) where x1 and x2 are x positions of two rectangles...
by Andlac028
Wed May 24, 2023 6:41 pm
Forum: Support and Development
Topic: how can i access x and y love.touch.getPosition variables?
Replies: 6
Views: 1592

Re: how can i access x and y love.touch.getPosition variables?

You are checking only for touches, that are present during the game load (function love.load), I think, you wanted to use it in love.update, which is below and empty.
by Andlac028
Tue May 23, 2023 11:02 am
Forum: Support and Development
Topic: UDP networking on Chromebook.
Replies: 3
Views: 679

Re: UDP networking on Chromebook.

To install lua socket, or other lua libraries for lua, try to look at luarocks.

Not sure, how you run your code (I am not VS code user), but if you have love installed, just type love . in terminal (assuming you are in directory with main.lua, else use love path/to/game)
by Andlac028
Sun May 21, 2023 4:42 pm
Forum: Support and Development
Topic: killing threads externally
Replies: 5
Views: 1358

Re: killing threads externally

Maybe try to use thread:release(), but I am not sure, what it will do…

Otherwise use channels to communicate and divide work into smaller pieces, so that it will check if there are some new messages between tasks.
by Andlac028
Wed May 17, 2023 3:44 am
Forum: Support and Development
Topic: Users system
Replies: 2
Views: 730

Re: Users system

See docs for love.filesystem.load. It loads the code, but doesn’t run it. So you have to do something like:

Code: Select all

local chunk = love.filesystem.load(data_path)
users = chunk()
Or even better, wrap it in pcall or xpcall, so it wouldn’t crash in case of invalid config.
by Andlac028
Wed May 03, 2023 2:20 pm
Forum: Support and Development
Topic: FilterMode Bluriness and Workarounds
Replies: 10
Views: 2800

Re: FilterMode Bluriness and Workarounds

I'm wondering what veterans of LOVE2D would do here, if anything. Also, how easy would it be to submit a PR implementing a new filter that only interpolates on the border? Is that the kind of thing that would get merged, assuming that I wrote it properly? You can submit it as feature request in LÖV...
by Andlac028
Wed May 03, 2023 8:52 am
Forum: Support and Development
Topic: How to force rotation in Android
Replies: 9
Views: 4139

Re: How to force rotation in Android

Here you go, please let me know, if it worked (I changed display orientation to landscape in AndroidManifest.xml and added some code snippet from Stack overflow to GameActivity.java: to be more precise, I added setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); to onCreate method) Al...
by Andlac028
Tue May 02, 2023 8:25 pm
Forum: Support and Development
Topic: How to force rotation in Android
Replies: 9
Views: 4139

Re: How to force rotation in Android

I actually tried to build the apk (however I didn’t tested it), let me know, if you want to try it.
by Andlac028
Tue May 02, 2023 5:02 pm
Forum: Support and Development
Topic: How to force rotation in Android
Replies: 9
Views: 4139

Re: How to force rotation in Android

It's that you have to compile love apk yourself and change some code to be able to change orientation (to deny reverse landscape). I may try to compile it for you, but I cannot guarantee the result will work as expected, but you will also need to compile the apk and add .love file to it in compilati...