"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
5 Inch House
Prole
Posts: 4
Joined: Thu Sep 24, 2015 10:33 pm

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

Post by 5 Inch House »

Robin wrote:If you had zipped the contents of the folder "basics", then you could rename that to .love, but anyway.

I can't reproduce your error, it all works fine.
But nothing happens when I press the B key or let go of it, and there's no message when I exit the game, even though I pasted the functions for them into the main.lua. Is it just that I have a retarded operating system?
Fang86
Prole
Posts: 15
Joined: Fri Sep 25, 2015 2:03 am

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

Post by Fang86 »

5 Inch House wrote:But nothing happens when I press the B key or let go of it, and there's no message when I exit the game, even though I pasted the functions for them into the main.lua. Is it just that I have a retarded operating system?

Code: Select all

function love.keypressed(key)
   if key == 'b' then
      text = "The B key was pressed."
Where's the value of text?
Also, you put love.draw as the second function. It should be the last.
Attachments
basics.love
(123.36 KiB) Downloaded 68 times
User avatar
5 Inch House
Prole
Posts: 4
Joined: Thu Sep 24, 2015 10:33 pm

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

Post by 5 Inch House »

Fang86 wrote:
5 Inch House wrote:But nothing happens when I press the B key or let go of it, and there's no message when I exit the game, even though I pasted the functions for them into the main.lua. Is it just that I have a retarded operating system?

Code: Select all

function love.keypressed(key)
   if key == 'b' then
      text = "The B key was pressed."
Where's the value of text?
Also, you put love.draw as the second function. It should be the last.
Well it didn't bring up values in the wiki's callback function tutorial. So sorry to be wasting people's time by the way, I just don't know where else to look for help.
Fang86
Prole
Posts: 15
Joined: Fri Sep 25, 2015 2:03 am

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

Post by Fang86 »

5 Inch House wrote:Well it didn't bring up values in the wiki's callback function tutorial. So sorry to be wasting people's time by the way, I just don't know where else to look for help.
Not wasting my time :P
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco »

Is it possible to get the width and height of a quad? quad:getWidth() and quad:getHeight() don't seem to exist.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

[wiki]Quad:getViewport[/wiki] gets the viewport's top-left position and width and height.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco »

Oh awesome! So obvious. Somehow it didn't click when I looked through the list of functions. I guess I didn't associate a viewport with dimensions. But it makes so much sense. Thanks!
User avatar
parallax7d
Citizen
Posts: 82
Joined: Wed Jul 02, 2014 11:44 pm

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

Post by parallax7d »

I've generated a canvas (canvas1) and need to duplicate it into a new canvas (canvas2) so I can manipulate canvas2 without changing canvas1. Would it be more efficient to simply draw 2 canvases from the start and draw to both at the same time, or is there an efficient way to copy a canvas into a new canvas?

If I have to just create 2 canvases from the start, is drawing to both using multicanvas significantly faster, or just syntactically nicer?
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 »

This is just guessing really, but I would suppose that drawing using multicanvas is the fastest as the whole pipeline only runs once (except for the fragment shader ?).

Instead of drawing the scene twice you can also just draw one Canvas onto the other to copy it.

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
DavidOliveiraSilva
Prole
Posts: 19
Joined: Fri May 29, 2015 10:19 pm
Location: Quixadá, Brazil
Contact:

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

Post by DavidOliveiraSilva »

I am trying to run ndk-build on the love-android-sdl2 repo.
I am using windows, and when run "ndk-build", it shows the message: "The system cannot find the path specified."
I am following the wiki: https://bitbucket.org/MartinFelis/love- ... _-_Windows

Thank you. and sorry for the silly question
Locked

Who is online

Users browsing this forum: Google [Bot] and 213 guests