Search found 726 matches

by grump
Thu Aug 31, 2017 2:29 pm
Forum: Libraries and Tools
Topic: I built this so for sublime text 3 in windows
Replies: 16
Views: 6148

Re: I built this so for sublime text 3 in windows

Oh, and add this to make it work in Linux:

Code: Select all

"linux": {
    "shell_cmd": "love ${project_path}",
},
by grump
Thu Aug 31, 2017 1:59 pm
Forum: Libraries and Tools
Topic: I built this so for sublime text 3 in windows
Replies: 16
Views: 6148

Re: I built this so for sublime text 3 in windows

put require = conf.lua at the top of your main.lua file as well That is not valid Lua syntax. You probably mean require("conf.lua"). I don't think it is helpful to do this though, since love already did it before main.lua is even loaded. Does not seem to run properly if the game directory...
by grump
Wed Aug 30, 2017 10:52 pm
Forum: Support and Development
Topic: Any reason why love.errhand wouldn't work?
Replies: 6
Views: 2508

Re: Any reason why love.errhand wouldn't work?

What are you doing in your errhand? Where do you provoke the error? Maybe there is no window yet, and you're trying do draw stuff? Move the error to love.draw or love.update.
by grump
Wed Aug 30, 2017 7:47 pm
Forum: Support and Development
Topic: Something is wrong with my canvas. Can't spot a bug. Help? ;-;
Replies: 9
Views: 3028

Re: Something is wrong with my canvas. Can't spot a bug. Help? ;-;

The problem is that you don't use classes as they meant to be used. I agree that the code is a bit misstructured and needs work, but the actual problem that prevents him from seeing anything is the errorneous call to printf in combination with whatever that cupid thing is doing that prevents error ...
by grump
Wed Aug 30, 2017 7:34 pm
Forum: Support and Development
Topic: Something is wrong with my canvas. Can't spot a bug. Help? ;-;
Replies: 9
Views: 3028

Re: Something is wrong with my canvas. Can't spot a bug. Help? ;-;

Btw, you shouldn't call math.randomseed() every frame. This has the opposite effect of what you want. Call it once at the start at the program. That CDraw() call in love.draw also seems suspicious. Doesn't that create a new CDraw instance in every frame? Better give CDraw a draw() function and call ...
by grump
Wed Aug 30, 2017 7:30 pm
Forum: Support and Development
Topic: Something is wrong with my canvas. Can't spot a bug. Help? ;-;
Replies: 9
Views: 3028

Re: Something is wrong with my canvas. Can't spot a bug. Help? ;-;

There is an errorneous call to love.graphics.printf in CDraw.lua, function playerH(). This cupid thing prevents you from seeing the error. Remove require("lib.cupid") from conf.lua to get your error messages back.
by grump
Tue Aug 29, 2017 9:27 pm
Forum: Support and Development
Topic: Custom rectangle class not rendering/moving correctly
Replies: 10
Views: 3763

Re: Custom rectangle class not rendering/moving correctly

Sure, dude. Have fun! Baby steps are always the hardest!
by grump
Tue Aug 29, 2017 2:36 pm
Forum: Support and Development
Topic: Something is wrong with my canvas. Can't spot a bug. Help? ;-;
Replies: 9
Views: 3028

Re: Something is wrong with my canvas. Can't spot a bug. Help? ;-;

Can you show the part where you draw the canvas objects on the screen? Or even better, attach a love file that shows the problem?
by grump
Tue Aug 29, 2017 1:37 pm
Forum: Support and Development
Topic: Custom rectangle class not rendering/moving correctly
Replies: 10
Views: 3763

Re: Custom rectangle class not rendering/moving correctly

Sure, here you go, untested code. local Rectangle = {} function Rectangle.create(x, y, w, h, color, thickness) local self = {} self.x, self.y, self.w, self.h, self.color, self.thickness = x, y, w, h, color or {255, 255, 255}, thickness or 1 setmetatable(self, { __index = Rectangle }) return self end...
by grump
Tue Aug 29, 2017 12:03 pm
Forum: Support and Development
Topic: Custom rectangle class not rendering/moving correctly
Replies: 10
Views: 3763

Re: Custom rectangle class not rendering/moving correctly

8 KB code to draw a rectangle is remarkable tho ;) There's a love.graphics.rectangle function that you could use instead. Yeah if you want a "take-your-single-use-rectangle-and-suffer" rectangle then love.graphics.rectangle is fine. From https://love2d.org/wiki/love.graphics.rectangle : R...