Search found 609 matches

by grump
Thu Jun 04, 2020 6:51 pm
Forum: Support and Development
Topic: Attempting to implement a wait function in love.update
Replies: 5
Views: 614

Re: Attempting to implement a wait function in love.update

"Pausing a function" is not a thing. You can either sleep, which will prevent execution of the rest of the game while sleeping.

Code: Select all

love.timer.sleep(1)
Or you can implement custom logic to make sure the parts you want to pause are not being updated while paused, as shown in the previous comments.
by grump
Tue Jun 02, 2020 4:29 pm
Forum: Support and Development
Topic: Overlay
Replies: 9
Views: 976

Re: Overlay

Another solution using a shader: local lg = love.graphics local red, blue, mask = lg.newCanvas(), lg.newCanvas(), lg.newCanvas() red:renderTo(function() lg.clear(1, .2, .2) end) blue:renderTo(function() lg.clear(.2, .2, 1) end) mask:renderTo(function() lg.circle('fill', 200, 200, 100) end) local mas...
by grump
Sun May 24, 2020 2:55 pm
Forum: Libraries and Tools
Topic: easier copy/paste between hex RGB(A) and LÖVE
Replies: 5
Views: 619

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

Useful, but that's a lot of code for a simple function. local function colorFromValue(val) local bit = require('bit') local r = bit.rshift(bit.band(val, 0xff0000), 16) / 255 local g = bit.rshift(bit.band(val, 0xff00), 8) / 255 local b = bit.band(val, 0xff) / 255 return r, g, b end love.graphics.setC...
by grump
Fri May 22, 2020 10:32 pm
Forum: Support and Development
Topic: Drawing text filled with a texture instead of a solid color
Replies: 3
Views: 341

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

Here's a simpler solution with a shader. The texturing depends on the screen position of the text with this code though, which can be easily fixed if required.
by grump
Wed May 20, 2020 9:27 pm
Forum: Libraries and Tools
Topic: a working setColor compatibilty multiplier
Replies: 17
Views: 6120

Re: a working setColor compatibilty multiplier

2grump: You r such a party safer! At least migrated our Zabuyaki beat 'em up to Love 11.3 the final thing was cindy. Thank you very much for the feedback! The change to the "new" color range makes a lot of sense for newer projects, but I'm happy that this little hack helped you port your game to LÖ...
by grump
Sun May 03, 2020 5:59 am
Forum: Support and Development
Topic: Unexpected behaviour in events and objects
Replies: 4
Views: 518

Re: Unexpected behaviour in events and objects

What you receive in the event handler is a copy of the table that has the original metatable stripped from it. function love.handlers.foo(t) print("received", t, getmetatable(t)) end local t = setmetatable({}, {}) print("sending", t, getmetatable(t)) love.event.push("foo", t) Output: sending table: ...
by grump
Wed Apr 01, 2020 7:40 pm
Forum: Support and Development
Topic: Cannot create Canvas: Texture format cannot be rendered to on this system.
Replies: 2
Views: 981

Re: Cannot create Canvas: Texture format cannot be rendered to on this system.

sherlockholmes221b wrote:
Wed Apr 01, 2020 6:41 pm
Every Canvas is 12800x12800 pixels. When I try to create the world, the game crashes on generating sixth canvas.
6 RGBA8 Canvases of 12800x12800 pixels require ~4 GB of VRAM. Not a surprising result.
by grump
Thu Jan 30, 2020 2:12 pm
Forum: Support and Development
Topic: [SOLVED][STI]crash when map:resize
Replies: 8
Views: 1442

Re: [STI]crash when map:resize

Calling :release() on the old canvas should help as well and is a more localized solution for the problem at hand.
by grump
Tue Jan 28, 2020 1:45 pm
Forum: Support and Development
Topic: How do I install on Linux system?
Replies: 5
Views: 1046

Re: How do I install on Linux system?

You did not install love yet, you just added the repository to apt. Try

Code: Select all

sudo apt install love
by grump
Sun Jan 26, 2020 4:35 pm
Forum: Support and Development
Topic: IntelliJ or Zerobrane?
Replies: 8
Views: 1358

Re: IntelliJ or Zerobrane?

Aside from console output, a typical text editor does not have Lua code debugging features.