windigo [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=19972 Jawbreaker <p> <table><tr><td> <a href="/bbs/?pid=37938#p"> <img src="/bbs/thumbs/pico37984.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37938#p"> Jawbreaker</a><br><br> by <a href="/bbs/?uid=19972"> windigo</a> <br><br><br> <a href="/bbs/?pid=37938#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=28907 https://www.lexaloffle.com/bbs/?tid=28907 Tue, 28 Feb 2017 15:39:48 UTC Out of memory <p>Hi,</p> <p>I get an out of memory when calling this function (recursive)</p> <p>when i click a button, i will call select_ball(4,4,3) -&gt; now all objects with the same index (neighbours) wil get index 7<br /> This works perfectly fine, but no matter how many objects will be selected, in the end there is an out of memory exception</p> <p>balls is a 16x10 multidimensional array.</p> <p><strong>arrow keys to move the cursor and 'z' to click on a ball</strong></p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function select_ball(x,y,index) if balls[x][y].index==index then balls[x][y]={index=7} if x&gt;1 and balls[x-1][y].index==index then select_ball(x-1,y,index) end if x&lt;width and balls[x+1][y].index==index then select_ball(x+1,y,index) end if y&gt;1 and balls[x][y-1].index==index then select_ball(x,y-1,index) end if y&lt;height and balls[x][y+1].index==index then select_ball(x,y+1,index) end end end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p> <table><tr><td> <a href="/bbs/?pid=37901#p"> <img src="/bbs/thumbs/pico37921.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37901#p"> Untitled</a><br><br> by <a href="/bbs/?uid=19972"> windigo</a> <br><br><br> <a href="/bbs/?pid=37901#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=28902 https://www.lexaloffle.com/bbs/?tid=28902 Mon, 27 Feb 2017 18:20:03 UTC Snake <p> <table><tr><td> <a href="/bbs/?pid=37702#p"> <img src="/bbs/thumbs/pico37701.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37702#p"> Snake 0.1</a><br><br> by <a href="/bbs/?uid=19972"> windigo</a> <br><br><br> <a href="/bbs/?pid=37702#p"> [Click to Play]</a> </td></tr></table> </p> <p>Not very original to make a snake game, but it's my first attempt to finish something :-)</p> https://www.lexaloffle.com/bbs/?tid=28861 https://www.lexaloffle.com/bbs/?tid=28861 Wed, 22 Feb 2017 12:24:48 UTC