Search found 378 matches

by grump
Wed Sep 12, 2018 4:11 pm
Forum: Support and Development
Topic: [SOLVED] BadWindow error on Linux Mint 19 XFCE
Replies: 9
Views: 259

Re: BadWindow error on Linux Mint 19 XFCE

milon wrote:
Wed Sep 12, 2018 3:50 pm
Driver "vmwgfx" is not installed or does not support configuration.
Are you trying this in a VMWare VM? Try installing open-vm-tools or VMWare tools.
by grump
Wed Sep 12, 2018 4:10 pm
Forum: Support and Development
Topic: how to stretch image out from center like w/ skins / theming?
Replies: 6
Views: 200

Re: how to stretch image out from center like w/ skins / theming?

You can do it in one draw call with a Mesh or a SpriteBatch.
by grump
Sun Sep 09, 2018 11:41 am
Forum: Support and Development
Topic: How to call a function from one script to main.lua
Replies: 3
Views: 125

Re: How to call a function from one script to main.lua

Ugh, yeah I did not realize that item1 is not a member of the items table. :oops: You can absolutely have love.graphics.draw and other stuff in functions other than love.draw Sure can, but if you draw something to the screen from love.load you're not going to see it because the screen will be cleare...
by grump
Sun Sep 09, 2018 9:41 am
Forum: Support and Development
Topic: How to call a function from one script to main.lua
Replies: 3
Views: 125

Re: How to call a function from one script to main.lua

Remove the draw call from function item1. You need to call that from love.draw, not from love.load.

Also, you should put 'local' in front of all variable definitions, otherwise they're all global and you don't want that.
by grump
Fri Sep 07, 2018 3:46 pm
Forum: Support and Development
Topic: High cpu usage [solved]
Replies: 7
Views: 229

Re: High cpu usage [updated, problems with the Audio]

I spawn many objects while I play, but it's just simple sprites. How many is 'many'? Are you creating lots of (temporary) tables? Garbage collection is known to be a common bottleneck if the code makes poor use of tables. I'm definitely doing something wrong, but the project is big already and I ha...
by grump
Thu Sep 06, 2018 3:21 pm
Forum: Support and Development
Topic: Need help creating equality metamethod
Replies: 2
Views: 137

Re: Need help creating equality metamethod

Code: Select all

function Vec2:__eq(rhs)
	return self.x == rhs.x and self.y == rhs.y
end
Beware of floating point precision issues.
by grump
Thu Aug 30, 2018 11:42 am
Forum: Support and Development
Topic: Love2D 11.1 Multiple Canvases void effects
Replies: 3
Views: 207

Re: Love2D 11.1 Multiple Canvases void effects

Documentation is lacking in this regard. It has not been updated for 11 yet. You can use love_PixelCoord: local gfx = love.graphics local tex = gfx.newImage('texture.png') local cvs1, cvs2 = gfx.newCanvas(256, 256), gfx.newCanvas(256, 256) local shader = gfx.newShader([[ uniform Image MainTex; void ...
by grump
Thu Aug 30, 2018 6:05 am
Forum: Support and Development
Topic: Love2D 11.1 Multiple Canvases void effects
Replies: 3
Views: 207

Re: Love2D 11.1 Multiple Canvases void effects

The signature of the effects function has changed with LÖVE 11.
Removed the 'void effects(...)' pixel shader entry point. Use the new 'void effect()' instead.

Code: Select all

void effect() {
...
}
by grump
Sat Aug 25, 2018 9:26 pm
Forum: Support and Development
Topic: Text not displayed for one particular user
Replies: 11
Views: 393

Re: Text not displayed for one particular user

Yeah, right. You still need to post a love file or at least a code snippet that demonstrates the bug though, because the code you posted does absolutely nothing.