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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Locked
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

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

Post by s-ol »

parallax7d wrote:What types can quad be used on?

SpriteBatch and Image I know for sure, how about these types;

Canvas, Framebuffer, Mesh, ParticleSystem, Quad, Texture?
see the wiki for love.graphics.draw:
love.graphics.draw( image, quad, x, y, r, sx, sy, ox, oy, kx, ky )
Arguments

Image or Canvas - image
An Image or Canvas to texture the Quad with.
So Image and Canvas.

Mesh doesn't make sense because a Quad basically is a rectangular Mesh, a ParticleSystem draws a bunch of small images uses it's own Quads and there are no "Texture"s in löve.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post by zorg »

To expand and modify on Sollos' answer a bit:

Quads Can be used on Textures (Which mean Images and Canvases)
Quads can be used with simply love.draw, spritebatches, but with meshes, you could only do quad:getViewport to set the vertices like that.

Framebuffers no longer exist, they are Canvases.
Dunno what ParticleSystems allow to be used, never used them myself.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Bindie
Party member
Posts: 151
Joined: Fri Jan 23, 2015 1:29 pm

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

Post by Bindie »

Hey, if I have bump.lua in a sub-folder "libs" and want to require it to a local variable, how do I do this?

I tried:

Code: Select all

local bump = require 'libs\bump'
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin »

Code: Select all

local bump = require 'libs.bump'
Backslashes are tricky: \b means the backspace character, 0x08.
Help us help you: attach a .love.
Bindie
Party member
Posts: 151
Joined: Fri Jan 23, 2015 1:29 pm

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

Post by Bindie »

Awesome. Code looks pretty.
User avatar
redsled
Prole
Posts: 38
Joined: Wed Jun 04, 2014 6:33 am

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

Post by redsled »

Here's a question, but I haven't bothered to put out a thread. I'm pretty new here and I see a lot of "OBEY" on peoples avatars. Why?
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

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

Post by davisdude »

GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
redsled
Prole
Posts: 38
Joined: Wed Jun 04, 2014 6:33 am

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

Post by redsled »

Ahh that makes more sense, because all the avatars said Obey and I felt like I was missing out.
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

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

Post by I~=Spam »

Robin wrote:

Code: Select all

local bump = require 'libs.bump'
Backslashes are tricky: \b means the backspace character, 0x08.
You could use a forward slash instead. If I remember correctly windows internally converts forward slashes if needed if lua doesn't already do this.
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
Bindie
Party member
Posts: 151
Joined: Fri Jan 23, 2015 1:29 pm

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

Post by Bindie »

That's true, I tried and it worked:

Code: Select all

"assets/bump.lua"
Locked

Who is online

Users browsing this forum: Bing [Bot] and 2 guests