Search found 2329 matches

by zorg
Tue Aug 21, 2018 9:48 pm
Forum: Support and Development
Topic: [Solved... again]
Replies: 4
Views: 67

Re: [Solved... again]

Also, stop deleting the meaningful part of your thread titles, it's bad form.
you wanted "[Solved] Easy decompression of code in exe files"
by zorg
Tue Aug 21, 2018 7:03 pm
Forum: Support and Development
Topic: Lua Project for High School Students
Replies: 3
Views: 56

Re: Lua Project for High School Students

Hi and welcome to the forums! Without giving you any code at first, let me try to just explain a bit how you could tackle these elements you want to implement. To block something from going outside the screen is the same as making a number be between two others (and then you do this for the other ax...
by zorg
Tue Aug 21, 2018 5:40 pm
Forum: Support and Development
Topic: [Solved... again]
Replies: 4
Views: 67

Re: Easy decompression of code in exe files

Yes, since it's a zip file at the end of an executable; zip files have footers, or in other words, the part that the operating system understands a file to be a zip archive is at the end of the file, and extracting a zip file is not rocket science either. That said, encryption is not what protects y...
by zorg
Tue Aug 21, 2018 9:50 am
Forum: Games and Creations
Topic: Slot machine game
Replies: 2
Views: 73

Re: Slot machine game

How about a link to the game proper? I am assuming you made it, since you are talking about it like so.
Is it for all platforms? Was it made with Löve? Is it commercial or free? Is it open-source?

And, why not use löve's own random generator implementation?
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: 86

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

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

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

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

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

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.