Search found 82 matches

by unixfreak
Sat Oct 15, 2016 5:00 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

Hi! I'm trying to loop over a bunch of files in a directory to load as textures. However, some of the files are not images, and should be ignored Hence i get this: Could not decode file 'textures/LICENSE.txt' to ImageData: unsupported file format How can i test if a file is an image before loading i...
by unixfreak
Tue Oct 04, 2016 7:02 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

Check out Mesh:setTexture Oh, many thanks. I overlooked that one. I have another question related to meshes, the texture is set, but is stretched/blurred to one colour only? How can i set the texture so it is tiled similar to how a quad works? Eg: This is what i get with a mesh texture: https://lov...
by unixfreak
Sun Oct 02, 2016 8:54 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

Trying to texture a polygon shape, previously in 0.9.x you could create a mesh with some vertices and provide a texture to fill the mesh. https://love2d.org/wiki/love.graphics.newMesh 0.9.x mesh = love.graphics.newMesh( vertices, texture, mode ) 0.10.x mesh = love.graphics.newMesh( vertexformat, ver...
by unixfreak
Thu Sep 29, 2016 8:19 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

EDIT: Nevermind, answered my own question This is what i was looking for https://love2d.org/wiki/love.system.openURL ------- Hi, is this possible, i've tried searching the web and looking through the wiki but to no avail; I have files created by my game which are saved in the local save folder: love...
by unixfreak
Wed Jul 13, 2016 3:00 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

undef wrote:Use [wiki]Font:getHeight[/wiki]*#wrappedText.
wrappedText ist the second return value of Font:getWrap.
Thanks for the fast reply, that works perfectly, surprised i overlooked that one. Cheers :cool:
by unixfreak
Wed Jul 13, 2016 2:40 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

Hi, i have been trying to find a way to calculate the minimum height of a rectangle depending on the height of a wrapped text string. Basically, i am trying to make a dynamically sized message box which holds varying text. How can i get a pixel count for the height of the wrapped text? Here is a scr...
by unixfreak
Mon Apr 18, 2016 11:15 pm
Forum: Support and Development
Topic: [SOLVED]Platformer help using multiple platforms
Replies: 2
Views: 1544

Re: Platformer help using multiple platforms

The first thing i would do is put all platforms into a single table, and loop over them For example in your love.load() do something like this: ground = { } table.insert(ground, { x = 0, y = 500, width = love.window.getWidth(), height = 32 } ) table.insert(ground, { x = 0, y = 400, width = 128, heig...
by unixfreak
Mon Apr 18, 2016 10:46 pm
Forum: Support and Development
Topic: [SOLVED] How can i stop updating whilst the window is being moved?
Replies: 5
Views: 5064

Re: How can i stop updating whilst the window is being moved?

Usually this happens because the window is not being updated while you drag it, and as a result the dt is very high after it is dropped. Try putting dt = math.min(dt, 1/30) at the top of love.update and see if that fixes it / whether thats whats going on. Thanks for the suggestions all, i've gone w...
by unixfreak
Fri Apr 15, 2016 6:45 pm
Forum: Support and Development
Topic: [SOLVED] How can i stop updating whilst the window is being moved?
Replies: 5
Views: 5064

[SOLVED] How can i stop updating whilst the window is being moved?

I have a problem with some basic collisions, that when the window is dragged across the desktop, collisions are failing either causing the player to die as the window is dragged or many objects falling through platforms. How can i combat this? pseudo code example of what i want to achieve: if not lo...
by unixfreak
Sun Mar 20, 2016 6:54 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411221

Re: "Questions that don't deserve their own thread" thread

I'll put this here as i'm pretty sure the solution is quite simple, however i am having sever issues of brain fog right now and can't seem to figure this out. Basically, how can i find the mouse position relative to a canvas internal coordinates? This should show the issue: package.love The most rel...