Search found 81 matches

by 4vZEROv
Thu May 28, 2020 7:59 pm
Forum: General
Topic: Optikon: A WYSIWYG Level Designer for LÖVE
Replies: 21
Views: 2813

Re: Optikon: A WYSIWYG Level Designer for LÖVE

steVeRoll wrote:
Wed May 27, 2020 7:30 pm
Don't be so aggressive.

One valid criticism is that it force to input a certain format of code.
As a user I would like to be able to modify how the code is generated to fit my needs, because everybody has it's own custom code habits.
by 4vZEROv
Wed May 27, 2020 8:11 pm
Forum: Support and Development
Topic: For loop problem
Replies: 6
Views: 342

Re: problem with multiple object access with mouse in ipairs

CanYouReply wrote:
Wed May 27, 2020 6:06 am
I don't understand what you are trying to do, do you want to check if you click inside the big rectangle and not the small ones ?
by 4vZEROv
Wed May 27, 2020 5:52 am
Forum: Support and Development
Topic: How to use "self" properly?
Replies: 6
Views: 233

Re: How to use "self" properly?

Also in your code you tried to do some calculation on a field inside the same table declaration : -- error local myTable = { a = 5, b = a * 2 } You can't do that because a is not yet declared, if you want to do that: local myTable = { a = 5 } myTable.b = myTable.a * 2 -- or local myTable = {} myTabl...
by 4vZEROv
Wed May 27, 2020 12:18 am
Forum: Support and Development
Topic: How to use "self" properly?
Replies: 6
Views: 233

Re: How to use "self" properly?

function h01:Create() local tbl = {} tbl.body = love.physics.newBody(runWorld, 350, 100, "dynamic"), tbl.shape = love.physics.newRectangleShape(66, 92), tbl.fixture = love.physics.newFixture(tbl.body, tbl.shape, density) return setmetatable(tbl , h01) end "self" is just a hidden parameter passed to...
by 4vZEROv
Sat May 23, 2020 3:17 pm
Forum: Support and Development
Topic: Can't get out of a loop in a function?
Replies: 4
Views: 216

Re: Can't get out of a loop in a function?

Yes, you can see the mainloop/gameloop here :
https://love2d.org/wiki/love.run
by 4vZEROv
Sat May 23, 2020 2:29 am
Forum: Support and Development
Topic: Drawing text filled with a texture instead of a solid color
Replies: 3
Views: 243

Re: Drawing text filled with a texture instead of a solid color

Thanks! That's much neater. And it looks a lot like how I'd hoped the stencil I was trying at first would work. I'm going to have to throw that shader language on the pile of things I want to learn more about. Is there any introductory material for GLSL (with or without LÖVE) which you consider esp...
by 4vZEROv
Sat May 23, 2020 2:27 am
Forum: Support and Development
Topic: [ANSWERED] Question about My Method of Animation and Quads
Replies: 2
Views: 177

Re: Question about My Method of Animation and Quads

First way, I don't like to call functions more than I need.
by 4vZEROv
Sat May 23, 2020 2:13 am
Forum: Support and Development
Topic: Can't get out of a loop in a function?
Replies: 4
Views: 216

Re: Can't get out of a loop in a function?

You should try to use a library like: https://github.com/vrld/hump/blob/master/timer.lua It is made specialy to make it easy to do stuff like "after x time do that", "during x time do that" . if rollingTimer >= 1.5 then skillOut = math.random(0, player.skill01) if skillOut > t.difficulty then player...
by 4vZEROv
Fri May 22, 2020 1:29 pm
Forum: Support and Development
Topic: Trying to create a camera like this game (Nuclear Throne).
Replies: 1
Views: 177

Re: Trying to create a camera like this game (Nuclear Throne).

You can apply some lerp

Code: Select all

    function lerp(a, b, x) return a + (b - a) * x end
    local current_position = camera.getPos()
    local target_position = (player.pos * 5 + cursor.pos) / 6
    camera.setPos(current_position, target_position, 0.1)
by 4vZEROv
Thu May 21, 2020 10:43 pm
Forum: Support and Development
Topic: [SOLVED] Using a video crashes Love
Replies: 5
Views: 291

Re: Using a video crashes Love

You are calling loading:play() every time love.update is called, it's called a lot of time. Do something like that function love.load() loading = love.graphics.newVideo('Loading.mp4') loading:play() end function love.update(dt) timer = timer + dt if timer > 10 and loading:isPlaying() then loaing:sto...