<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://love2d.org/forums/feed.php?f=4" />

<title>LÖVE</title>
<link href="https://love2d.org/forums/index.php" />
<updated>2012-11-18T23:59:01+00:00</updated>

<author><name><![CDATA[LÖVE]]></name></author>
<id>https://love2d.org/forums/feed.php?f=4</id>
<entry>
<author><name><![CDATA[spir]]></name></author>
<updated>2012-11-18T23:58:19+00:00</updated>
<published>2012-11-18T23:58:19+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70653#p70653</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70653#p70653"/>
<title type="html"><![CDATA[Support and Development • Re: Error: attempt to yield across metamethod/C-call boundar]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70653#p70653"><![CDATA[
<blockquote><div><cite>bartbes wrote:</cite><br />Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).<br /></div></blockquote><br /><br />Found my error, was a wrong usage of the coroutine. Thank you for the help,<br />Denis<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=70027">spir</a> — Sun Nov 18, 2012 11:58 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[spir]]></name></author>
<updated>2012-11-18T23:54:59+00:00</updated>
<published>2012-11-18T23:54:59+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70652#p70652</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70652#p70652"/>
<title type="html"><![CDATA[Support and Development • Re: Error: attempt to yield across metamethod/C-call boundar]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70652#p70652"><![CDATA[
<blockquote><div><cite>bartbes wrote:</cite><br />Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).<br /></div></blockquote><br /><br />Right, but isn't everything called from C when I use Löve? The yielding func in question does about nothing (i reduced the error case) and is just called by love.update. But ultimately it is indeed called by the c/++ framework behind the scene, what do you think? That's why I asked whether it is at all possible to &quot;coroutine&quot; and use Löve.<br /><br />Denis<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=70027">spir</a> — Sun Nov 18, 2012 11:54 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Nixola]]></name></author>
<updated>2012-11-18T23:34:06+00:00</updated>
<published>2012-11-18T23:34:06+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70651#p70651</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70651#p70651"/>
<title type="html"><![CDATA[Support and Development • Re: Physics - getDistance doesn't work]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70651#p70651"><![CDATA[
Yup, it was player.mainFixture (a <span style="font-weight: bold">very</span> stupid error), and I've been quite lucky since today 'cause every time I tried to discover the problematic argument it was the first one, so I thought that metod worked... Thanks and sorry for troubling with such stupid mistakes ^^'<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=12793">Nixola</a> — Sun Nov 18, 2012 11:34 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Boolsheet]]></name></author>
<updated>2012-11-18T23:30:19+00:00</updated>
<published>2012-11-18T23:30:19+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70649#p70649</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70649#p70649"/>
<title type="html"><![CDATA[Support and Development • Re: Physics - getDistance doesn't work]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70649#p70649"><![CDATA[
Hm, then how about player.mainFixture? <img src="https://love2d.org/forums/images/smilies/ms-wink.png" alt=";)" title="Wink" /><br /><br />There is actually a bug in love.physics.getDistance that makes it unstable, however, this bug terminates LÖVE and doesn't throw a &quot;expected userdata&quot; error message. Something like this worked for me, after I fixed the bug.<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>function love.load()<br />   World = love.physics.newWorld()<br /><br />   MiddleThing = love.physics.newBody(World, 0, 0, &quot;kinematic&quot;)<br />   MiddleThingF = love.physics.newFixture(MiddleThing, love.physics.newCircleShape(2))<br /><br />   Rock1 = {}<br />   Rock1.body = love.physics.newBody(World, 200, 0, &quot;dynamic&quot;)<br />   Rock1.shape = love.physics.newPolygonShape(-41, -8, 25, -42, 53, 16, -1, 22, -27, 8)<br />   Rock1.fixture = love.physics.newFixture(Rock1.body, Rock1.shape)<br /><br />   Rock2 = {}<br />   Rock2.body = love.physics.newBody(World, -200, 0, &quot;dynamic&quot;)<br />   Rock2.shape = love.physics.newPolygonShape(-26, 9, -21, -45, 39, -45, 83, 1, 29, 37, -21, 31)<br />   Rock2.fixture = love.physics.newFixture(Rock2.body, Rock2.shape)<br /><br />   local ox, oy = Rock1.body:getMassData()<br />   Joint1 = love.physics.newRevoluteJoint(MiddleThing, Rock1.body, 200 + ox, oy)<br />   ox, oy = Rock2.body:getMassData()<br />   Joint2 = love.physics.newRevoluteJoint(MiddleThing, Rock2.body, -200 + ox, oy)<br /><br />   MiddleThing:setAngularVelocity(0.3)<br />   Rock1.body:setAngularVelocity(-0.19)<br />   Rock2.body:setAngularVelocity(-1.23)<br /><br />   timer = 0<br />   step = 1/60<br />end<br /><br />function love.update(dt)<br />   timer = timer + dt<br />   if timer &gt; 1 then timer = 0 end<br />   while timer &gt;= step do<br />      World:update(step)<br />      timer = timer - step<br />   end<br />end<br /><br />function love.draw()<br />   love.graphics.translate(400, 300)<br />   love.graphics.setColor(255, 255, 255, 255)<br />   love.graphics.polygon(&quot;line&quot;, Rock1.body:getWorldPoints(Rock1.shape:getPoints()))<br />   love.graphics.polygon(&quot;line&quot;, Rock2.body:getWorldPoints(Rock2.shape:getPoints()))<br /><br />   love.graphics.setColor(0, 255, 0, 255)<br />   local d, x1, y1, x2, y2 = love.physics.getDistance(Rock1.fixture, Rock2.fixture)<br />   love.graphics.line(x1, y1, x2, y2)<br />end</code></dd></dl><p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=1720">Boolsheet</a> — Sun Nov 18, 2012 11:30 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ref]]></name></author>
<updated>2012-11-18T21:31:36+00:00</updated>
<published>2012-11-18T21:31:36+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11768&amp;p=70638#p70638</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11768&amp;p=70638#p70638"/>
<title type="html"><![CDATA[Support and Development • loadstring]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11768&amp;p=70638#p70638"><![CDATA[
Anybody know what is going on behind the scene with loadstring?<br />Was working with threads and trying to get a faster way to convert a string to a table.<br />My first approcah was:<br /><dl class="codebox"><dt>Code: </dt><dd><code>function extractPoints( stringData )    -- string =&gt;  point table{x,y,z}<br />   local temp = stringData:split() -- p1x,p1y,p1z,... =&gt; temp{p1x,p1y,p1z, ... }<br />   local reconstructedTable = {}<br />   local field   = 1<br />   for i = 1, #temp, 3 do      -- temp{p1x,p1y,p1z, ... } =&gt; table{{p1x,p1y,p1z},{p2x,p2y,p2z}, ... }<br />      reconstructedTable&#91; field &#93; = { temp&#91;i&#93;, temp&#91;i+1&#93;, temp&#91;i+2&#93; }<br />      field = field + 1<br />      end<br />   return reconstructedTable<br />   end<br /><br />function string:split( sep ) -- parces string 'x,y,z' into x y z - default separator == comma<br />      local sep, fields   = sep or &quot;,&quot;, {}<br />      local pattern   = string.format( &quot;(&#91;^%s&#93;+)&quot;, sep )<br />      self:gsub(pattern, function(c) fields&#91;#fields+1&#93; = c end)<br />      return fields<br />      end<br /></code></dd></dl><br />That seemed just too complex to be efficient so I tried:<br /><dl class="codebox"><dt>Code: </dt><dd><code>function string2table( string )<br />   assert( loadstring( string ))()<br />   end<br /></code></dd></dl><br />Both worked (slightly different string formating) but the loadstring approach was ~20% slower than my first approach.<br />Any ideas why?<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=48377">Ref</a> — Sun Nov 18, 2012 9:31 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[bartbes]]></name></author>
<updated>2012-11-18T21:03:27+00:00</updated>
<published>2012-11-18T21:03:27+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70631#p70631</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70631#p70631"/>
<title type="html"><![CDATA[Support and Development • Re: Error: attempt to yield across metamethod/C-call boundar]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70631#p70631"><![CDATA[
Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=147">bartbes</a> — Sun Nov 18, 2012 9:03 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[spir]]></name></author>
<updated>2012-11-18T23:59:01+00:00</updated>
<published>2012-11-18T20:47:44+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70629#p70629</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70629#p70629"/>
<title type="html"><![CDATA[Support and Development • [solved] Error: attempt to yield across ...]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11767&amp;p=70629#p70629"><![CDATA[
Is it at all possible to use coroutines with Löve? (I was trying a coooool way to manage processes / sequences of actions that still need to be controlled by events, without loads of state everywhere). I cannot succeed in running (or rather come back from) even the simplest co. I need to know whether it is possible to unblock my debugging mind.<br /><br />Thank you,<br />denis<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=70027">spir</a> — Sun Nov 18, 2012 8:47 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Boolsheet]]></name></author>
<updated>2012-11-18T19:19:27+00:00</updated>
<published>2012-11-18T19:19:27+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70623#p70623</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70623#p70623"/>
<title type="html"><![CDATA[Support and Development • Re: Help on sound:setRolloff and sound:setDistance]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70623#p70623"><![CDATA[
Those functions are basically a wrapper around OpenAL. See <a href="http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm#_Toc199835864" class="postlink">Creative's documentation</a> on the distance attenuation.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=1720">Boolsheet</a> — Sun Nov 18, 2012 7:19 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Roland_Yonaba]]></name></author>
<updated>2012-11-18T19:09:40+00:00</updated>
<published>2012-11-18T19:09:40+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70622#p70622</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70622#p70622"/>
<title type="html"><![CDATA[Support and Development • Re: Image saving and creation help.]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70622#p70622"><![CDATA[
I don't really catch the exact problem, but it seems you need to create, edit an image (maybe pixel per pixel) and export it.<br />Then basically, you <a href="https://love2d.org/wiki/love.image.newImageData" class="postlink">create a new ImageData</a>. Then you use <a href="https://love2d.org/wiki/ImageData" class="postlink">imageData functions</a> to edit some pixel, to change their colors.<br />When done, you can export it with <a href="https://love2d.org/wiki/ImageData:encode" class="postlink">ImageData:encode</a>. Note that resulting file will be located out of the game folder, as <a href="https://love2d.org/wiki/love.filesystem" class="postlink">love.filesystem</a> only writes in the <span style="font-style: italic">AppData </span>folder. You'll need to <a href="https://love2d.org/wiki/love.filesystem.setIdentity" class="postlink">set the game identity</a> before all (to have a valid save folder) where you can grab the exported pic.<br />Hope this helps, anyway.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=3394">Roland_Yonaba</a> — Sun Nov 18, 2012 7:09 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Przemator]]></name></author>
<updated>2012-11-18T18:59:38+00:00</updated>
<published>2012-11-18T18:59:38+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70621#p70621</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70621#p70621"/>
<title type="html"><![CDATA[Support and Development • Help on sound:setRolloff and sound:setDistance]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11766&amp;p=70621#p70621"><![CDATA[
Hi,<br /><br />I've been looking, but nowhere did I find any info on what to put in the rolloff, ref and max values for the functions sound:setRolloff and sound:setDistance.<br /><br />I'm trying to attach a looping sound to a body in love.physics. Any help would be appreciated.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=68020">Przemator</a> — Sun Nov 18, 2012 6:59 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Nsmurf]]></name></author>
<updated>2012-11-18T18:13:13+00:00</updated>
<published>2012-11-18T18:13:13+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11711&amp;p=70620#p70620</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11711&amp;p=70620#p70620"/>
<title type="html"><![CDATA[Support and Development • Re: Share your favourite helper functions]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11711&amp;p=70620#p70620"><![CDATA[
I recently made a <a href="http://nsmurf.wordpress.com/2012/11/18/loading-levels-from-images/" class="postlink">blog post</a> about loading levels from images.  It takes a file path and a array as input, and returns a level that is compatible with <a href="https://love2d.org/forums/viewtopic.php?f=5&amp;t=8421" class="postlink">YellowAfterLife’s Platformer engine</a>, although you could export it into almost any format.  It's also a nice example of how to use love.image, for those of you who are as confused about it as I was  <img src="https://love2d.org/forums/images/smilies/ms-crazy.png" alt=":crazy:" title="Hurr Durr" />.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=57522">Nsmurf</a> — Sun Nov 18, 2012 6:13 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ubermann]]></name></author>
<updated>2012-11-18T15:41:33+00:00</updated>
<published>2012-11-18T15:41:33+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70615#p70615</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70615#p70615"/>
<title type="html"><![CDATA[Support and Development • Re: Löve + dofile() ??]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70615#p70615"><![CDATA[
<blockquote><div><cite>kikito wrote:</cite><br />Use <a href="/wiki/love.filesystem.load">love.filesystem.load</a> instead.<br /></div></blockquote><br /><br />Thanks it works perfect.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=72281">Ubermann</a> — Sun Nov 18, 2012 3:41 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kikito]]></name></author>
<updated>2012-11-18T15:07:23+00:00</updated>
<published>2012-11-18T15:07:23+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70614#p70614</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70614#p70614"/>
<title type="html"><![CDATA[Support and Development • Re: Löve + dofile() ??]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70614#p70614"><![CDATA[
Use <a href="/wiki/love.filesystem.load">love.filesystem.load</a> instead.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=710">kikito</a> — Sun Nov 18, 2012 3:07 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ubermann]]></name></author>
<updated>2012-11-18T15:03:40+00:00</updated>
<published>2012-11-18T15:03:40+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70613#p70613</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70613#p70613"/>
<title type="html"><![CDATA[Support and Development • Löve + dofile() ??]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11764&amp;p=70613#p70613"><![CDATA[
I have noticed that calling a dofile() from inside a Löve app don't want to open files that are inside the .love.<br /><br />Is that true or i am missing something?<br /><br />That's the reason why the space shooter demo I released is not working properly and the demo map is not working,<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=72281">Ubermann</a> — Sun Nov 18, 2012 3:03 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[WolfNinja2]]></name></author>
<updated>2012-11-18T13:57:53+00:00</updated>
<published>2012-11-18T13:57:53+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70612#p70612</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70612#p70612"/>
<title type="html"><![CDATA[Support and Development • Re: Enemy Isn't Being Drawn!]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70612#p70612"><![CDATA[
<blockquote><div><cite>T-Bone wrote:</cite><br />What is &quot;g&quot;? And where do you call love.draw?<br /></div></blockquote><br /><br /><br />Whoops, i set G as a variable to &quot;love.graphics&quot; because I type it so much it gets annoying. Sorry I never explained that. <br /><br /><blockquote><div><cite>Azhukar wrote:</cite><br />There are some possibilities that come to mind:<br /><br />1. The draw function may never be called, try adding a print before drawing each enemy to see where or if at all it is trying to draw it<br />2. You might be drawing something after the enemies through which you do not see the enemy<br />3. You're using love.graphics.translate and are actually drawing offscreen without realizing it<br />4. You never add any enemies to the table<br />5. You might be calling love.graphics.clear at a wrong time<br /><br /><br /><blockquote><div><cite>Robin wrote:</cite>You set the colour to white before drawing. Try what happens when you remove the line <span style="font-weight: bold">g.setColor(255,255,255,255)</span>.<br /></div></blockquote><br />Setting color to full white before drawing an image with default color mode means drawing the image using full colors of the image, i.e. drawing as is.</div></blockquote><br /><br />1. I did this thinking debugging-ly and it was never called. So obviously this is the problem...Even though it's in main.lua.......<br />2. Never did that.<br />3. Maybe, but it was never called :p<br />4. Used that spawn function twice in love.load. MAYBE my issue is here???<br /><br />It's pretty much....<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>if gamestate == &quot;lvl 3&quot;  then -- If my game is in the 3rd level.<br />        enemycreate(128,32,&quot;right&quot;)<br />   enemycreate(256,32,&quot;left&quot;)<br />   end</code></dd></dl><br /><br />I'll try doing a print in enemycreate...<br /><br />OK SO I PLAYED WITH IT AND NOW THEY ARE SPAWNED.....<br /><br />But there's a new issue with their collision... here is the file, the enemys spawn if you shoot a spike (space) and eventually they both get stuck in the left...<br /><br />HERE<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=70948">WolfNinja2</a> — Sun Nov 18, 2012 1:57 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Astormooke]]></name></author>
<updated>2012-11-18T13:37:17+00:00</updated>
<published>2012-11-18T13:37:17+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70611#p70611</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70611#p70611"/>
<title type="html"><![CDATA[Support and Development • Image saving and creation help.]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11763&amp;p=70611#p70611"><![CDATA[
I have a small game I have been working on this weekend, so far the game detects collisions to walls and I can fire a bullet. However I am in need of a way to create an image for the walls. I have a table that holds all of the coordinates of where the walls will be in collision with the player and drawing on those coordinates takes far to much time to do every time I draw to the screen. Now I dont have to save the image but is there anyway to compile all of those points into one image like a sprite and refresh it like that. If there are any Ideas or help it would be great to hear them. Thank you in advance<br /><br /><br />I got it to run a bit smoother using a sprite batch but I would still like it to run faster by saving that image and cant seem to get it to save with the image encoder in love2d is there any example code someone could offer on how to use the encodeImage and saving that to a png or bmp thanks again in advance.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=75138">Astormooke</a> — Sun Nov 18, 2012 1:37 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[bartbes]]></name></author>
<updated>2012-11-18T13:22:26+00:00</updated>
<published>2012-11-18T13:22:26+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70609#p70609</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70609#p70609"/>
<title type="html"><![CDATA[Support and Development • Re: Physics - getDistance doesn't work]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11750&amp;p=70609#p70609"><![CDATA[
<blockquote><div><cite>Nixola wrote:</cite><br />P.S: the two arguments are in two different lines, so I'm sure that it's the first fixture that causes problems<br /></div></blockquote><br />Actually, I'm not sure it works that way, it might very well be the line of the call, not the line of the argument.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=147">bartbes</a> — Sun Nov 18, 2012 1:22 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[substitute541]]></name></author>
<updated>2012-11-18T12:23:52+00:00</updated>
<published>2012-11-18T12:23:52+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11291&amp;p=70607#p70607</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11291&amp;p=70607#p70607"/>
<title type="html"><![CDATA[Support and Development • Re: ROBLOX]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11291&amp;p=70607#p70607"><![CDATA[
ROBLOX is for kids who have waaaaaay to much time in their hands (my RBX account is substitute541) . And, to answer your question, no.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=63719">substitute541</a> — Sun Nov 18, 2012 12:23 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[phantom]]></name></author>
<updated>2012-11-18T11:21:35+00:00</updated>
<published>2012-11-18T11:21:35+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70606#p70606</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70606#p70606"/>
<title type="html"><![CDATA[Support and Development • Re: Setting a boundry]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70606#p70606"><![CDATA[
I figured it out. Thanks anyways!<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=75085">phantom</a> — Sun Nov 18, 2012 11:21 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[T-Bone]]></name></author>
<updated>2012-11-18T10:28:04+00:00</updated>
<published>2012-11-18T10:28:04+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70605#p70605</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70605#p70605"/>
<title type="html"><![CDATA[Support and Development • Re: Setting a boundry]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70605#p70605"><![CDATA[
Yes, just don't let it walk outside. So whenever you want to move your character, first calculate the next x and y coordinates that the character would have after the movement, then check that those coordinates are within the window, and if so, do the movement.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=3355">T-Bone</a> — Sun Nov 18, 2012 10:28 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[T-Bone]]></name></author>
<updated>2012-11-18T10:24:55+00:00</updated>
<published>2012-11-18T10:24:55+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70604#p70604</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70604#p70604"/>
<title type="html"><![CDATA[Support and Development • Re: Enemy Isn't Being Drawn!]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70604#p70604"><![CDATA[
What is &quot;g&quot;? And where do you call love.draw?<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=3355">T-Bone</a> — Sun Nov 18, 2012 10:24 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[phantom]]></name></author>
<updated>2012-11-18T10:05:41+00:00</updated>
<published>2012-11-18T10:05:41+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70603#p70603</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70603#p70603"/>
<title type="html"><![CDATA[Support and Development • Setting a boundry]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11762&amp;p=70603#p70603"><![CDATA[
Hi, I am EXTREMELY new to love2D.<br /><br />I have been watching tutorials, I have a neat game in development. But one thing that is a MUST in this development process is the prevention of the game character from walking off screen.<br /><br />Is there any possible way to set a boundry on set sides of my game window?<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=75085">phantom</a> — Sun Nov 18, 2012 10:05 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Azhukar]]></name></author>
<updated>2012-11-18T10:04:39+00:00</updated>
<published>2012-11-18T10:04:39+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70602#p70602</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70602#p70602"/>
<title type="html"><![CDATA[Support and Development • Re: Enemy Isn't Being Drawn!]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11760&amp;p=70602#p70602"><![CDATA[
There are some possibilities that come to mind:<br /><br />1. The draw function may never be called, try adding a print before drawing each enemy to see where or if at all it is trying to draw it<br />2. You might be drawing something after the enemies through which you do not see the enemy<br />3. You're using love.graphics.translate and are actually drawing offscreen without realizing it<br />4. You never add any enemies to the table<br />5. You might be calling love.graphics.clear at a wrong time<br /><br /><br /><blockquote><div><cite>Robin wrote:</cite><br />You set the colour to white before drawing. Try what happens when you remove the line <span style="font-weight: bold">g.setColor(255,255,255,255)</span>.<br /></div></blockquote><br />Setting color to full white before drawing an image with default color mode means drawing the image using full colors of the image, i.e. drawing as is.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=71132">Azhukar</a> — Sun Nov 18, 2012 10:04 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Cowinatub]]></name></author>
<updated>2012-11-18T09:13:07+00:00</updated>
<published>2012-11-18T09:13:07+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70601#p70601</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70601#p70601"/>
<title type="html"><![CDATA[Support and Development • Re: LUBE issue]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70601#p70601"><![CDATA[
Thanks for the help! I can sleep easy now knowing that the library I chose is efficient enough for my purposes.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=72684">Cowinatub</a> — Sun Nov 18, 2012 9:13 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Robin]]></name></author>
<updated>2012-11-18T08:47:33+00:00</updated>
<published>2012-11-18T08:47:33+00:00</published>
<id>https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70600#p70600</id>
<link href="https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70600#p70600"/>
<title type="html"><![CDATA[Support and Development • Re: LUBE issue]]></title>

<category term="Support and Development" scheme="https://love2d.org/forums/viewforum.php?f=4" label="Support and Development"/>
<content type="html" xml:base="https://love2d.org/forums/viewtopic.php?t=11761&amp;p=70600#p70600"><![CDATA[
This looks suspect:<br /><dl class="codebox"><dt>Code: </dt><dd><code>function addline(text)<br />    LineNumber = LineNumber + 1<br />    Lines = Lines .. '\n' .. text<br />end</code></dd></dl><br />Try commenting out the last line in the function. You'll get no backlog, but hopefully it won't slow down any more either.<br /><br />What I would do:<br /><ul><li>Replace <span style="font-weight: bold">Lines = ''</span> by <span style="font-weight: bold">Lines = {}</span></li><li>Change addline to<br /><dl class="codebox"><dt>Code: </dt><dd><code>function addline(text)<br />    if #Lines &gt; 100 then -- something like that<br />        table.remove(Lines, 1)<br />    else<br />        LineNumber = LineNumber + 1<br />    end<br />    Lines&#91;#Lines+1&#93; = text<br />end</code></dd></dl></li><li>Change the drawing code to: (you might want to experiment with that)<br /><dl class="codebox"><dt>Code: </dt><dd><code>for i, line in ipairs(Lines) do<br />    love.graphics.print(line, 0, 780 + (i - LineNumber) * 14)<br />end</code></dd></dl></li></ul><br /><span style="font-weight: bold">EDIT</span>: to be clear, the first part was a test to see if the slowing down was really due to addline. The second part is a proposed solution. Also, here's why:<br />Your string variable Lines kept on growing, and when you do &quot;a = a .. b&quot;, Lua makes a new string object every time, and that gets more and more expensive when your string grows. My proposed solution uses a table, because it is easier to remove the lines you can no longer see and can thus be safely removed.<p>Statistics: Posted by <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&amp;u=436">Robin</a> — Sun Nov 18, 2012 8:47 am</p><hr />
]]></content>
</entry>
</feed>