Search found 116 matches

by MrFariator
Sat Nov 02, 2019 7:16 pm
Forum: General
Topic: LÖVE 11.3 released!
Replies: 31
Views: 11847

Re: LÖVE 11.3 released!

That's a lövely series of updates and fixes. I particularly like FLAC support and love.window.get/setVsync, good stuff.
by MrFariator
Mon Oct 21, 2019 3:40 pm
Forum: General
Topic: How much objects can Love2d display at one time?
Replies: 4
Views: 1624

Re: How much objects can Love2d display at one time?

To add to Luke's post, it is worth noting that in the last few releases of LÖVE draw calls get automatically batched (since 11.0). So if you are drawing multiple quads from the same source image one after another, without modifying the love.graphics state (eq. setting a canvas, shader, color, etc), ...
by MrFariator
Sun Oct 06, 2019 11:25 am
Forum: Support and Development
Topic: [SOLVED] How to get the string length?
Replies: 5
Views: 1440

Re: How to get the string length?

Any of these methods work.

Code: Select all

-- all print 4
local str = "asdf"
print(#str)
print(string.len(str))
print(str:len())
This page lists the available string methods.
by MrFariator
Sun Oct 06, 2019 11:12 am
Forum: Support and Development
Topic: [SOLVED] How to make a linebreak?
Replies: 6
Views: 1467

Re: How to make a linebreak?

local myText = [[this is where my text goes and it will handle linebreaks]] function love.draw () love.graphics.print(myText, 10, 10) end One thing to keep in mind is that all contents between [[]] will be caught, so it will also take the indentation into account if present. Example: function love....
by MrFariator
Fri Sep 27, 2019 5:51 pm
Forum: Support and Development
Topic: Jerking in move
Replies: 2
Views: 1023

Re: Jerking in move

A couple of things are at play here. First, in your love.update you have the following: function love.update(dt) -- ... local dx,dy = Player.x - camera.x, Player.y - camera.y camera:move(dx/2, dy/2) Player:update(dt) end Here you are updating the camera before player moves. What this effectively doe...
by MrFariator
Fri Sep 27, 2019 5:27 pm
Forum: Support and Development
Topic: Is there a Virus in LÖVE?
Replies: 2
Views: 937

Re: Is there a Virus in LÖVE?

I believe whatever anti-virus software you are using may be just be overtly cautious, and blocking the application even though it's a false-positive. This is pretty common in Windows 10 with Windows Defender, for instance. The love2d binaries you can download from the official repositories are safe,...
by MrFariator
Fri Sep 27, 2019 3:04 pm
Forum: General
Topic: How to create an animation from a .png image (without quads)?
Replies: 6
Views: 1171

Re: How to create an animation from a .png image (without quads)?

By quads, I presume you tried making a sprite sheet with each of the individual frames? For an animation like this, you could very well just code the animation with love.graphics.setColor to change the transparency, and then just adjusting the draw coordinates you pass to love.graphics.draw. You cou...
by MrFariator
Thu Sep 26, 2019 1:53 pm
Forum: Support and Development
Topic: a super fast AABB collision detection ( Minkowski Sums )
Replies: 13
Views: 1955

Re: a super fast AABB collision detection ( Minkowski Sums )

I can vouch for the reduced memory footprint and garbage generation with oniietzschan's edits. My game doesn't have a huge number of physical objects, but the smaller memory footprint was immediately noticeable from minor testing when I took his changes few months ago.
by MrFariator
Sun Aug 25, 2019 1:21 pm
Forum: Support and Development
Topic: [bump] how to detect side collision
Replies: 6
Views: 1051

Re: [bump] how to detect side collision

For wall-jumps, in my game I simply use bump's queryRect method: When player presses the jump button while in mid-air, query a couple pixels wide rectangle on either side of the player's collision box for tiles (remember to use an appropriate filter), check if there is a surface the player can jump ...
by MrFariator
Sat Jun 15, 2019 5:56 pm
Forum: Support and Development
Topic: What are the names of RT/LT/RB/LB buttons for Love 2D ?
Replies: 4
Views: 2366

Re: What are the names of RT/LT/RB/LB buttons for Love 2D ?

triggerright - right trigger, axis value triggerleft - left trigger, axis value rightshoulder - right shoulder, button value leftshoulder - left shoulder, button value Axis values you get with using getGamepadAxis and button values you get with isGamepadDown . When querying the axis state, I recomm...