Search found 515 matches

by MrFariator
Sun Nov 12, 2023 7:18 am
Forum: Support and Development
Topic: Adjusting hitboxes using bounce
Replies: 6
Views: 4017

Re: Adjusting hitboxes using bounce

Can you provide more code? These snippets shouldn't affect the size of the collision box present in the bump world, after it has been added. Are you using any other bump functions on your player object, like world:update? Also keep in mind, that if you want your collision box to be one pixel smaller...
by MrFariator
Sat Nov 04, 2023 5:29 pm
Forum: Support and Development
Topic: More filesystem questions
Replies: 5
Views: 6351

Re: More filesystem questions

love.filesystem.createDirectory creates the requested directories. However, if the directories already exist, the function basically does nothing. The return value (boolean) will tell you if the request was a success (created/exists) or not (could not create directory).
by MrFariator
Fri Nov 03, 2023 11:08 pm
Forum: Support and Development
Topic: How to reference Bump's "bounce variable
Replies: 5
Views: 1817

Re: How to reference Bump's "bounce variable

Going to need to see more code to properly inspect what the issue could be. Can you provide a minimal working example? At the very least, going to need to see what your collision filter is ("bounce" in your code), and how you have defined your entities (the contents of "listofBad"...
by MrFariator
Fri Nov 03, 2023 3:27 am
Forum: Support and Development
Topic: How to reference Bump's "bounce variable
Replies: 5
Views: 1817

Re: How to reference Bump's "bounce variable

When you are looping through the collisions, you're accidentally using the wrong variable to access the list of collisions: for i = 1, len do if cols[v].bounce.x > v.x then -- the '[v]' should be '[i]' -- ... end end In addition, it might be wise to first check that the collision response is a bounc...
by MrFariator
Sun Oct 29, 2023 3:26 am
Forum: Support and Development
Topic: Fixed screen in Menori
Replies: 1
Views: 2892

Re: Fixed screen in Menori

I'm not familiar with Menori, but I presume you can render its output (and any other things you need) onto a canvas. You can then figure out the biggest rectangle that respects the desired aspect ratio, and then render the canvas to the screen with those dimensions.
by MrFariator
Wed Oct 25, 2023 10:41 pm
Forum: Support and Development
Topic: Copying a file from a local directory to the LOVE save directory
Replies: 2
Views: 8958

Re: Copying a file from a local directory to the LOVE save directory

You could potentially use os.execute, and run some copy commands to transfer those files over. These commands may be platform specifc, like using robocopy on windows. This method may flash a command prompt on users' screens, but if you mean to do the file transfers as a one-time thing (eg. when firs...
by MrFariator
Fri Oct 20, 2023 12:18 am
Forum: Support and Development
Topic: How do I make a value absolute?
Replies: 5
Views: 3006

Re: How do I make a value absolute?

If you mean to take the absolute value of a number, the function you're looking for is math.abs:

Code: Select all

local value = -2
value = math.abs(value)
print(value) -- prints 2
However, if you mean something like a constant value, ie. a value that can not be changed, that's a bit more complicated topic.
by MrFariator
Sun Oct 08, 2023 4:01 pm
Forum: Support and Development
Topic: I have a question about how lua works in general
Replies: 8
Views: 7360

Re: I have a question about how lua works in general

Well, as the error warns you, you can not index a function. To illustrate it, consider this minimum example: local function myFunction() end -- an empty function that does nothing myFunction() -- ok myFunction.someValue() -- error, can not index a function The same goes for situations, like trying t...
by MrFariator
Sat Sep 23, 2023 2:21 am
Forum: General
Topic: I just accidentally found a literal zip bomb for the ram in love
Replies: 3
Views: 6346

Re: I just accidentally found a literal zip bomb for the ram in love

While it's surprising that your example creates so much garbage, it's not also not particularly special, now is it? There are many ways to fill up RAM (excessive table creation, loading a bunch of assets into memory), force heavy CPU loads (just modifying love.run slightly could do), or cause excess...
by MrFariator
Tue Sep 19, 2023 12:09 am
Forum: Support and Development
Topic: Need help understanding bump.lua and also why my bullets act this way
Replies: 3
Views: 933

Re: Need help understanding bump.lua and also why my bullets act this way

Right, I think I intended to do that modification as well (either doing what you did, or assigning to a local variable), but must've slipped my mind.