Search found 69 matches

by unixfreak
Wed Dec 07, 2016 1:44 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 126126

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

I'm trying to set a randomly rotated image But i only end up with integers, for example; -- returns 0,1,2,3 love.math.random(math.pi) -- same as above love.math.random(0.0, math.pi) The angle of a placed image isn't as random as i'd like it to be. How can i get math.random / love.math.random to choo...
by unixfreak
Sat Nov 12, 2016 3:13 am
Forum: Libraries and Tools
Topic: lovesplash (a simple module to aid with splash screens)
Replies: 3
Views: 927

Re: lovesplash (a simple module to aid with splash screens)

D0NM wrote:I like it. It is quite simple )

You might add some code quotations into your 1st message. It would be more informative.
People with old / newer LOVE will not be able to see your project on download. See?
Thanks, i just updated the post.
by unixfreak
Fri Nov 11, 2016 5:50 am
Forum: Libraries and Tools
Topic: lovesplash (a simple module to aid with splash screens)
Replies: 3
Views: 927

lovesplash (a simple module to aid with splash screens)

This is pretty basic, but i hope it can help someone out. :awesome: I've not written a proper module before, so this is my first attempt at one, hoping it's in a usable state. Actually if i'm doing anything wrong module wise, any feedback would be great, thanks. This module is probably best used for...
by unixfreak
Wed Nov 02, 2016 6:49 pm
Forum: Support and Development
Topic: [SOLVED] Problem with canvas + camera drawing
Replies: 6
Views: 1452

Re: Problem with canvas + camera drawing

Okay, i figured out a solution to the canvas drawing, i simply had to unset my camera before drawing to the canvas, then set the camera again just before drawing the actual canvas. Solved i guess.
by unixfreak
Wed Nov 02, 2016 6:33 pm
Forum: Support and Development
Topic: [SOLVED] Problem with canvas + camera drawing
Replies: 6
Views: 1452

Re: Problem with canvas + camera drawing

It seems to me that the problem is that the camera transform applies to drawing the stuff on the canvas and then again to the drawing of the canvas on the screen. Could you maybe use a scissor instead, to avoid drawing out of the border? It will probably be faster than a canvas. How can i do that? ...
by unixfreak
Wed Nov 02, 2016 1:20 am
Forum: Support and Development
Topic: [SOLVED] Problem with canvas + camera drawing
Replies: 6
Views: 1452

Re: Problem with canvas + camera drawing

Well i changed it to draw as a quad, in arena:draw() function arena:draw() local tile = arena.textures["floor"] tile:setWrap("repeat","repeat") love.graphics.setColor(255,255,255,255) local quad = love.graphics.newQuad( arena.x,arena.y,arena.width,arena.height, tile:getDimensions() ) love.graphics.d...
by unixfreak
Wed Nov 02, 2016 1:05 am
Forum: Support and Development
Topic: [SOLVED] Problem with canvas + camera drawing
Replies: 6
Views: 1452

[SOLVED] Problem with canvas + camera drawing

Hello... strange issue that's been baffling me and i have tried everything i can think of, but still not found why this is happening. Basically, i have an arena where the player can move around the screen. An image is tiled over the arena for the floor. My problem is, if i draw it directly to the sc...
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: 126126

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: 126126

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

Check out [wiki]Mesh:setTexture[/wiki] 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...
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: 126126

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...