Page 31 of 91

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

Posted: Fri Jan 30, 2015 7:32 pm
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

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

Posted: Wed Feb 25, 2015 3:45 pm
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

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

Posted: Wed Feb 25, 2015 4:06 pm
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.

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

Posted: Wed Feb 25, 2015 4:07 pm
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.

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

Posted: Mon Mar 30, 2015 12:39 pm
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:

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

Posted: Mon Mar 30, 2015 9:51 pm
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?

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

Posted: Wed Apr 01, 2015 12:18 pm
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?

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

Posted: Wed Apr 01, 2015 5:35 pm
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.

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

Posted: Wed Apr 01, 2015 7:12 pm
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!

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

Posted: Wed Apr 01, 2015 7:23 pm
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?