Search found 2859 matches

by zorg
Sun May 24, 2020 6:06 pm
Forum: Libraries and Tools
Topic: easier copy/paste between hex RGB(A) and LÖVE
Replies: 5
Views: 98

Re: easier copy/paste between hex RGB(A) and LÖVE

While i can appreciate the work put in the project, the hoops required to be done might put people off to build this themselves... For a tool, it's probably fine. For a snippet, one could just use this: love.system.setClipboardText(colorFromValueString(love.system.getClipboardText())) or something s...
by zorg
Sun May 24, 2020 4:05 pm
Forum: Libraries and Tools
Topic: easier copy/paste between hex RGB(A) and LÖVE
Replies: 5
Views: 98

Re: easier copy/paste between hex RGB(A) and LÖVE

or if you prefer a string input instead, you can do something like this, based on the above code: local function colorFromValueString(str) local str = str:gsub('0[xX]','') -- get rid of hex prefix if it exists local val = tonumber(str, 16) -- base 16 number conversion -- from here, same as above loc...
by zorg
Sat May 23, 2020 6:15 pm
Forum: Support and Development
Topic: old error showing each time I try to run my code
Replies: 1
Views: 43

Re: old error showing each time I try to run my code

Hi and welcome to the forums!

I know it's a silly question, but are you absolutely sure you saved the file?
by zorg
Fri May 22, 2020 11:13 am
Forum: General
Topic: Removing a table from another table
Replies: 5
Views: 109

Re: Removing a table from another table

the array part is whichever n,n+1,...,n+k continuous sequence of positive whole numbers that lua decides is the array part. Only for n = 1 :) Maybe true for the range ipairs iterates over, but e.g. the # operator isn't guaranteed to give back e.g. 3 in a case like this: local a = { [1] = true, [2] ...
by zorg
Fri May 22, 2020 7:33 am
Forum: General
Topic: Removing a table from another table
Replies: 5
Views: 109

Re: Removing a table from another table

table.insert by default inserts at the end of the array part of the table. the array part is whichever n,n+1,...,n+k continuous sequence of positive whole numbers that lua decides is the array part. if you only ever used table.insert to insert stuff into your objects table, then you can simply itera...
by zorg
Thu May 21, 2020 10:20 pm
Forum: Support and Development
Topic: How is related the output of love.window.getDPIScale() with DPI categories?
Replies: 1
Views: 61

Re: How is related the output of love.window.getDPIScale() with DPI categories?

No, the wiki page says that the highdpi flag needs to be set(enabled) for OSX to utilize the retina display fully, and that on Android systems, it's forced to be always on. As for what the function itself returns, as examples: - if the OS shows 1 screen pixel as a 1x1 actual physical element, then t...
by zorg
Thu May 21, 2020 1:03 pm
Forum: Support and Development
Topic: Load from file
Replies: 11
Views: 354

Re: Load from file

Hi and welcome to the forums! Löve has a line iterator function built-in: love.filesystem.lines That said, everything in love.filesystem (except for DroppedFiles) only has access to two places, the project's save directory and the directory where your main.lua is (or the inside of the .love file, if...
by zorg
Tue May 19, 2020 5:20 pm
Forum: Support and Development
Topic: Help with spawning multiple objects
Replies: 5
Views: 289

Re: Help with spawning multiple objects

Add to that the people who don't even realize that push is an external library someone else made, and is not part of löve either...
by zorg
Tue May 19, 2020 1:03 am
Forum: Support and Development
Topic: bad argument #2 to 'newSource' (string expected, got no value)
Replies: 3
Views: 143

Re: bad argument #2 to 'newSource' (string expected, got no value)

Also, because you will most probably run into it, 11.3 uses the 0-1 color range now instead of what the 0.10.something version most CS50 courses use, which used the 0-255 range... contemplation regarding a pinned post stating all this to people coming from the harvard CS50 course rising, although ul...
by zorg
Tue May 19, 2020 12:59 am
Forum: Support and Development
Topic: How to properly setup Love2D - LUA on Windows 10 ?
Replies: 8
Views: 289

Re: How to properly setup Love2D - LUA on Windows 10 ?

And while we're at it, to pre-empt a few things; As far as i know, the CS50 courses use an older version of löve (0.10.something); while you should use the latest (11.3 at the moment) version, you need to be aware that there were quite some changes, most visibly the fact that colors are 0-1 floats n...