Search found 587 matches

by grump
Tue Aug 22, 2017 10:08 pm
Forum: Support and Development
Topic: Computing transformed coords
Replies: 6
Views: 1722

Re: Computing transformed coords

I'm not sure how Canvas would help with this problem. Care to elaborate? If there is no easy way of getting the current transform, is there at least a way to set the transformation matrix directly in one function call, so I can compute it myself and share the transform between the graphics stack and...
by grump
Mon Aug 14, 2017 8:53 pm
Forum: Support and Development
Topic: [solved] Making text based game. Problem with output.
Replies: 2
Views: 773

Re: Making text based game. Problem with output.

You can change the position of printed text by altering the x and y arguments to the love.graphics.print function. Increase the y coordinate to put text farther down the screen. For example: for index, line in ipairs(history) do love.graphics.print(line, 0, (index - 1) * love.graphics.getFont():getH...
by grump
Mon Aug 14, 2017 2:36 pm
Forum: Support and Development
Topic: Computing transformed coords
Replies: 6
Views: 1722

Computing transformed coords

Is there a way to have coords transformed by the currently active graphics transformation state and get the transformed result back? I need the axis aligned bounding boxes of a hierarchy of translated, scaled, rotated Drawables and I wonder if I have to implement the transformation stack myself. I a...
by grump
Sun Jul 23, 2017 2:27 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 1539

Re: Restore settings in conf.lua

For instance, love.filesystem.write always fails with a nil error for me. That's weird, do you mean love.filesystem.write is nil? success, msg = love.filesystem.write(...) success is false and msg is nil after calling this. (0.9 Linux) It's the same code, I'm not sure how it can act differently her...
by grump
Sun Jul 23, 2017 12:08 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 1539

Re: Restore settings in conf.lua

MrFariator's solution is probably the right one. I'd just like to point out love.filesystem is loaded by that point, since that's how conf.lua is loaded. (And you shouldn't need getSaveDirectory...) Oh, okay. I ran into some quirks while figuring out how to get file loading and saving to work consi...
by grump
Sat Jul 22, 2017 11:47 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 1539

Re: Restore settings in conf.lua

I must haved missed that bit of information. Thank you!
by grump
Sat Jul 22, 2017 7:56 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 1539

Restore settings in conf.lua

A function named love.config can be put into a file called conf.lua to make configuration changes before the main program starts. If I want to restore configuration settings (e. g., window size and position) that my game saved when it was played the last time, how can I load them? love.filesystem is...