"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
Piggles
Prole
Posts: 10
Joined: Wed Dec 22, 2010 6:08 pm

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

Post by Piggles »

pajh wrote:I'm having problems seeing console output using Love & and the latest version Zerobrane.

I have a print statement in love.conf which I can see in ZB's output window, however no print statement from main.lua (for example in love.load) show up at all. This isn't a matter of delayed output, they don't show up when the program stops either. Running from ZB either using a plain run or a debug seems to make no difference.

any ideas?
I ran into the same problem; try putting this statement in love.load():

Code: Select all

io.stdout:setvbuf("no")
Source: http://lua-users.org/lists/lua-l/2008-10/msg00369.html
pajh
Prole
Posts: 8
Joined: Fri Jan 30, 2015 4:52 pm

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

Post by pajh »

How do I stop calls to love.graphic.draw() being affected by the current setColor()?

It looks like love.graphics.setColorMode( mode ) used to do this, but I can't find a link as to how you do it after 0.9

thanks
User avatar
undef
Party member
Posts: 438
Joined: Mon Jun 10, 2013 3:09 pm
Location: Berlin
Contact:

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

Post by undef »

pajh wrote:How do I stop calls to love.graphic.draw() being affected by the current setColor()?
Before drawing what you want call love.graphics.setColor( 255, 255, 255, 255 ).
Draw calls will always use the currently set color, white is the default.
twitter | steam | indieDB

Check out quadrant on Steam!
User avatar
zorg
Party member
Posts: 3441
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 »

pajh wrote:How do I stop calls to love.graphic.draw() being affected by the current setColor()?
It looks like love.graphics.setColorMode( mode ) used to do this, but I can't find a link as to how you do it after 0.9
thanks
Nope, just do love.graphics.setColor(255,255,255) to reset it somewhere.
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.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

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

Post by rmcode »

I tried building LÖVE on OSX for the first time today.

I dropped the framework files into /Library/Frameworks and openend repos/love/platform/xcode/love.xcodeproj.

When I try to build the project it fails with this error:
<snip>

</solved>

I actually had dropped the frameworks files in the wrong library/frameworks folder ... :ultrashocked:
Toki
Prole
Posts: 3
Joined: Thu Feb 26, 2015 5:19 pm

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

Post by Toki »

I was following this tutorial regarding animations: https://love2d.org/wiki/AnAL
What I wanted to know is whether it's possible to specify which frame I want to be animated? The context being having all walk animations on one sprite sheet, the first row of animations are walking left, second row is walking right and so on.

Also while I'm asking, can I use AnAL with SpriteBatch? Suppose I put all animated sprite in a single sprite sheet, how would I specify which frames are one animation?
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 was to use Luastar for pathfinding, say I have a table of:

Code: Select all

map = 
{[1] = {x=0,y=0, w=10,h=10, mode = "floor"},
[2] = {x=11,y=0, w=10,h=10, mode = "floor"},
[3] = {x=22,y=0, w=10,h=10, mode = "floor"},
[4] = {x=0,y=11, w=10,h=10, mode = "wall"},
[5] = {x=11,y=11, w=10,h=10, mode = "door"},
[6] = {x=22,y=11, w=10,h=10, mode = "wall"},
[7] = {x=0,y=22, w=10,h=10, mode = "floor"},
[8] = {x=11,y=22, w=10,h=10, mode = "floor"}
[9] = {x=22,y=22, w=10,h=10, mode = "floor"}}
Looking like:

... <-- Floor, floor, floor
XDX <-- Wall, Door, Wall
... <-- Floor, floor, floor

How would I use my table within LuAstar?

viewtopic.php?f=5&t=3459&hilit=luastar

Do I need to reconsider how I make maps?
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

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

Post by qubodup »

Code: Select all

{[1] = {x=0,y=0, w=10,h=10, mode = "floor"},
[...]
Hi, just remove all instances of "[n] = " where n is a number.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
naseem142
Prole
Posts: 1
Joined: Wed Apr 01, 2015 7:09 pm

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

Post by naseem142 »

Okay, i am very new to this and this is my first post so i hope you guys go easy on me.

I have a drawn button already, and i am checking in this function whether it is pressed.

function love.mousepressed(x , y , ...)
if x > 480 and x < 544 and y > 206 and y < 238 then
Current_View = 2
end
end

When the mouse is pressed inside the button's diameters as i declared above it changes the Current_View value to 2, But there is a problem because it is hard for me to constantly try to find the exact location needed to be clicked for a "button". Is there anything i can do to check if the button is pressed easily?

Thank you!
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 »

I searched around for pathifinding on the forum, I found LuAstar.lua, LoveStar.lua. Is there any lib which is recommended for pathfinding?
Locked

Who is online

Users browsing this forum: No registered users and 80 guests