Search found 2323 matches

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: 93

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: 189

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: 189

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: 189

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: 158

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: 189

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: 182

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: 107

Re: Problem with overlapping - white sparking lines

The pixel borders should be the same colors as the edges of each tile.
by zorg
Sun Aug 05, 2018 4:46 am
Forum: Support and Development
Topic: Can someone give me some straight up way to make simple game states?
Replies: 4
Views: 430

Re: Can someone give me some straight up way to make simple game states?

Here's a technique I like to use. It's very simple, you just implement each state in its own .lua file as if it were main, and let main.lua dispatche the callbacks to the current state. (This example uses globals, but you can also do "local menu = {} ... return menu" if you prefer.) (...) That's co...
by zorg
Fri Aug 03, 2018 9:47 pm
Forum: General
Topic: I'm already pretty sold but I'd like reassurance that LÖVE is the right choice.
Replies: 3
Views: 279

Re: I'm already pretty sold but I'd like reassurance that LÖVE is the right choice.

On the other hand, I do know what Papers, please is, and yes, i'd think that's the easiest thing you could implement on your list! :3 (unless you have an affinity with shaders and the glsl language, or graphical programming) Dynamic lighting is possible, yes; in many ways as well, including either "...