Search found 28 matches

by test
Fri May 10, 2019 4:05 pm
Forum: Support and Development
Topic: Slash in parenthesis [SOLVED]
Replies: 2
Views: 780

Slash in parenthesis [SOLVED]

Code: Select all

for i = 1, 4 do img[i] = love.graphics.newImage('1' .. '/' .. i .. '.png') end
I want to open the i.png in the folder which is named '1'. How can I achieve this? Thanks.
by test
Fri May 10, 2019 3:03 pm
Forum: Support and Development
Topic: Performance question [SOLVED]
Replies: 2
Views: 809

Performance question [SOLVED]

In update function, should I write this

Code: Select all

x = x + vx * dt
or

Code: Select all

if vx ~= 0 then x = x + vx * dt end
? Which is the fastest code?
And not about this question,
why

Code: Select all

v.x, v.y = v.x + v.vx * dt, v.y + v.vy * dt
gives error?
by test
Thu May 09, 2019 9:34 am
Forum: Support and Development
Topic: question about tables [SOLVED]
Replies: 3
Views: 1062

question about tables [SOLVED]

Code: Select all

local p = {}
for i = 1, 2 do p[i] = {x = (2 * i - 1) * w / 4, y = h / 2, w = 100, h = 100, xx = x, yy= y} end
I want to set xx to x and yy to y. But I don't want to do it with a new line(example: p.xx = p.x)
by test
Tue May 07, 2019 7:04 pm
Forum: Support and Development
Topic: random number without duplicate [SOLVED]
Replies: 6
Views: 1044

random number without duplicate [SOLVED]

Code: Select all

local x = love.math.random(1, 4)
local y = love.math.random(1, 4) -- y ~= x
I want x to be different than y. For example 2 and 3 but not 3 and 3.
by test
Sat May 04, 2019 3:14 pm
Forum: Support and Development
Topic: Android Resolution Problem [SOLVED]
Replies: 7
Views: 1000

Re: Android Resolution Problem

Thanks. I think I am going to solve this situation (not a problem) by creating a 1920x1080 canvas and setting dpi to 1.
by test
Sat May 04, 2019 3:04 pm
Forum: Support and Development
Topic: Android Resolution Problem [SOLVED]
Replies: 7
Views: 1000

Re: Android Resolution Problem

Thanks pgimeno. But why did you say dirty for the code you writed? It works. If I use this code and build APK, is it bad pratice? What is the correct way?
by test
Sat May 04, 2019 1:18 pm
Forum: Support and Development
Topic: Android Resolution Problem [SOLVED]
Replies: 7
Views: 1000

Re: Android Resolution Problem

So if I use old version of love, dpi is off as default right? Because there is no problem for old versions.
by test
Sat May 04, 2019 9:53 am
Forum: Support and Development
Topic: Android Resolution Problem [SOLVED]
Replies: 7
Views: 1000

Android Resolution Problem [SOLVED]

When I open my love file, the screen resolution is not 1920x1080. But my phone's resolution is 1920x1080. When I open with an old version of Love, it works in 1920x1080. I do not use google play version. I use the updated APK verslon which is on the love's website. I used t.window.width and t.window...
by test
Fri May 03, 2019 11:25 am
Forum: Support and Development
Topic: Testing on android issue [SOLVED]
Replies: 1
Views: 629

Testing on android issue [SOLVED]

When I test it on a PC it works, but on android the squares are not visible. local w, h local p = {} for i = 1, 2 do p[i] = {} end function love.load() w, h = love.graphics.getDimensions() for i = 1, 2 do p[i].element = i p[i].x, p[i].y = (2 * i - 1) * w / 4, h / 2 p[i].w, p[i].h = 100, 100 p[i].xx,...
by test
Thu May 02, 2019 6:31 pm
Forum: Support and Development
Topic: Rotating in love.graphics.rectangle [SOLVED]
Replies: 2
Views: 692

Rotating in love.graphics.rectangle [SOLVED]

Code: Select all

for i, v in ipairs(projectiles) do love.graphics.rectangle('fill', v.x, v.y, v.w, v.h, v.angle) end
Hello. I have this code. If I use image, i can rotate it. But is there a way to do it by drawing rectangle?