Search found 515 matches

by MrFariator
Mon Jun 26, 2023 5:07 pm
Forum: General
Topic: How to get the size of the image knowing the scale given to it when drawing
Replies: 4
Views: 706

Re: How to get the size of the image knowing the scale given to it when drawing

If you have an image, you can get its dimensions with getDimensions. Multiply these by your scaling factor.
by MrFariator
Sun Jun 25, 2023 10:25 pm
Forum: Support and Development
Topic: Timer as Integer ?
Replies: 9
Views: 1186

Re: Timer as Integer ?

I believe you need to post your code if you want further help. Particularly that post about your timer being a variable and not a number, which shouldn't be an issue. Essentially, you'd keep your timer variable as-is, but when you display it on-screen, you'd apply math.floor (or other rounding mecha...
by MrFariator
Wed May 31, 2023 11:44 am
Forum: Support and Development
Topic: Iteration order
Replies: 18
Views: 3945

Re: Iteration order

It doesn't. Since the behavior is not codified in any official reference or specification as far as I'm aware, that behavior may be subject to changes between versions of lua/luajit. Can think of it like undefined behavior, that may work for you in the moment, but not necessarily in different enviro...
by MrFariator
Sun May 14, 2023 9:02 am
Forum: General
Topic: Is there a way to add a toolbar to the window?
Replies: 2
Views: 1181

Re: Is there a way to add a toolbar to the window?

I'm not sure there's any easy way to implement (presumably) Windows-style toolbars directly from löve and lua itself, without modidying löve C++ source code to add the needed hooks and functionalities. You could maybe call some of the Windows system functions via luajit's FFI (eq. CreateWindowEx ), ...
by MrFariator
Sat May 13, 2023 12:45 am
Forum: Support and Development
Topic: I finnally started using bump.lua for my collisions, however I still have problems understanding it
Replies: 3
Views: 979

Re: I finnally started using bump.lua for my collisions, however I still have problems understanding it

As it says, your "blocks" variable is undefined (nil value). If you try to treat an undefined variable like a table, then you're bound to get errors like that. You'll need to do something like this in your code to make it work (assuming you have defined "world" somewhere else in ...
by MrFariator
Fri May 12, 2023 10:17 pm
Forum: Support and Development
Topic: I finnally started using bump.lua for my collisions, however I still have problems understanding it
Replies: 3
Views: 979

Re: I finnally started using bump.lua for my collisions, however I still have problems understanding it

What's the error? Always make sure to attach an error log if you want help. The code you posted doesn't really tell us anything, assuming the variables "blocks" and "world" actually exist.
by MrFariator
Wed May 10, 2023 12:57 am
Forum: General
Topic: Does SNESAPU.DLL and libgme.dll work in LOVE2D
Replies: 33
Views: 26700

Re: Does SNESAPU.DLL and libgme.dll work in LOVE2D

These are audio playback related libraries, so there's no difference in how you use them in a platformer, grand strategy or a racing title. You'll load the library (presumably at startup), and then periodically give it the appropriate commands to play, pause and switch tracks as the rest of your gam...
by MrFariator
Sun Apr 30, 2023 10:09 pm
Forum: Support and Development
Topic: is love good for making fantasy consoles?
Replies: 2
Views: 839

Re: is love good for making fantasy consoles?

I guess as far as lua goes, pico8 also uses lua for its scripting interface.
As far as löve goes, what you can or can't do with it in regards to making a fantasy console just comes down to your capabilities as a developer, and what you actually want to do with it.
by MrFariator
Sat Apr 29, 2023 10:16 am
Forum: Support and Development
Topic: What's up with gamepad axes?
Replies: 13
Views: 2208

Re: What's up with gamepad axes?

Games sometimes also tailormake their deadzones, so to perhaps suit the specific game's needs. Admittedly this won't always work, but for games that target specific controllers (eq. console exclusives), they have a pretty good idea of what the ranges they're working with.
by MrFariator
Sat Apr 29, 2023 1:10 am
Forum: Support and Development
Topic: LUA attempt to index global anim8 a nil value
Replies: 2
Views: 654

Re: LUA attempt to index global anim8 a nil value

Welcome to the forums, but please, for future reference, use code tags to make your code more readable. I don't see any immediate problems with how you're using anim8 in what you've posted. Could you provide a .love or a zip of your project, so we could perhaps inspect things further? Also do note t...