Search found 2325 matches

by zorg
Wed Aug 15, 2018 4:52 pm
Forum: Support and Development
Topic: [SOLVED] How can i rewind a sound source, now that love.audio.rewind(source) has been removed?
Replies: 2
Views: 75

Re: [SOLVED] How can i rewind a sound source, now that love.audio.rewind(source) has been removed?

There's a simpler solution

Code: Select all

sound:seek(0)
This is functionally equivalent to the old source:rewind function, and it continues playing without you needing to call play, if it was playing already.
by zorg
Wed Aug 15, 2018 6:52 am
Forum: Support and Development
Topic: Micro lag/Skipping; I'm at a loss.
Replies: 4
Views: 170

Re: Micro lag/Skipping; I'm at a loss.

pgimeno wrote:
Tue Aug 14, 2018 7:44 pm
[*] Avoid string concatenation when possible. string.format is much slower, but it will avoid creation of intermediate strings that will need to be GC'd.
I kinda believed that .. was slower than string.format though? I'm guessing you benchmarked them?
by zorg
Sun Aug 12, 2018 8:10 pm
Forum: Support and Development
Topic: i am looking for an example to make a text blink
Replies: 4
Views: 158

Re: i am looking for an example to make a text blink

use a timer, if some time elapsed, flip a boolean variable; if it's false, do nothing (or draw your text in the "off" state, different color or whatever), if it's true, draw your text "normally".
by zorg
Fri Aug 10, 2018 1:47 pm
Forum: Support and Development
Topic: I want 2 texts with the same font but with 2 different sizes??
Replies: 10
Views: 240

Re: I want 2 texts with the same font but with 2 different sizes??

Apart from clicking the link in my previous post that takes you to its wiki article, here's a quick code you can look at: myFontFileData = love.filesystem.newFileData('relative.path.to.your.font.ttf') myFont120pt = love.graphics.newFont(myFontFileData, 120) myFont50pt = love.graphics.newFont(myFontF...
by zorg
Fri Aug 10, 2018 9:51 am
Forum: Support and Development
Topic: I want 2 texts with the same font but with 2 different sizes??
Replies: 10
Views: 240

Re: I want 2 texts with the same font but with 2 different sizes??

It seems to be that way, though i'm not sure whether there are any optimizations under the hood or not; I wanted to say that you could cheat a bit by creating a Rasterizer instead, and then creating two differently sized fonts using that instead of the font file, but apparently the rasterizers thems...
by zorg
Fri Aug 10, 2018 6:58 am
Forum: Support and Development
Topic: I want 2 texts with the same font but with 2 different sizes??
Replies: 10
Views: 240

Re: I want 2 texts with the same font but with 2 different sizes??

create another font with the same ttf file, but with a size of 50; assuming you assigned both of them to separate variables, you can setFont them whenever you want to switch fonts.
by zorg
Thu Aug 09, 2018 2:46 pm
Forum: Support and Development
Topic: -bash: love: command not found
Replies: 6
Views: 185

Re: -bash: love: command not found

that usually happens when you try to run main.lua directly with löve, and not the folder, as it was said above.
by zorg
Tue Aug 07, 2018 4:08 pm
Forum: Support and Development
Topic: Keyboard handling not working
Replies: 5
Views: 211

Re: Keyboard handling not working

keystate = {} function love.keypressed(key,scancode) keystate[scancode] = true end function love.keyreleased(key, scancode) keystate[scancode] = false end About the simplest state system one can write that works; not sure why you'd want to loop over all of them; usually you'd just want to query for...
by zorg
Mon Aug 06, 2018 11:12 pm
Forum: General
Topic: custom fixed timestep
Replies: 6
Views: 231

Re: custom fixed timestep

You do multiply the speed of your objects with the dt regardless of how you edited love.run, right?
otherwise don't expect it to work the way you want it to.
by zorg
Mon Aug 06, 2018 11:03 pm
Forum: Support and Development
Topic: [CLOSED] Problem with overlapping - white sparking lines
Replies: 2
Views: 121

Re: Problem with overlapping - white sparking lines

The pixel borders should be the same colors as the edges of each tile.