Shadowblitz16 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=27670 Rounding errors when lerping towards point <p>can someone tell me why this always fails?<br /> it isn't garenteed to always reach 63,63 even through i floor it.</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 main() domain=true while domain do cls() spr(16,4,0,15,2) for i=0,8 do star() end yield() end end function star() dostar=true inst = { sx=rnd(127), sy=127, ex=63, ey=63, } while dostar do local dx=flr(inst.sx)==flr(inst.ex) local dy=flr(inst.sy)==flr(inst.ey) rectfill(0,0,127,24,0) print(tostr(dx)..&quot;,&quot;..tostr(dy),0,0,7) if dx and dy then dostar=false else pset (inst.sx,inst.sy,7) print(flr(inst.sx)..&quot;/&quot;..flr(inst.ex),0,8,7) print(flr(inst.sy)..&quot;/&quot;..flr(inst.ey),0,16,7) inst.sx+=(inst.ex-inst.sx)*mainstarspd inst.sy+=(inst.ey-inst.sy)*mainstarspd end yield() 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> https://www.lexaloffle.com/bbs/?tid=37016 https://www.lexaloffle.com/bbs/?tid=37016 Sat, 07 Mar 2020 22:26:57 UTC await function <p>is it possible to create a await function?</p> <p>for example..</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>if await(60,&quot;my identifer&quot;) then --done 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>here is my code</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 await(t,id) if not cofun[id] then --don't know how to return true here add(cofun,cocreate(function() while t&gt;0 do t-=1 yield() end end)) else return false end end function coupdate() for c in all(cofun) do if costatus(c) then coresume(c) else del(cofun,c) 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>EDIT: idk if this is possible but maybe something like this..</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>--id is determined by function execution index if await(60) then --done 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>for example..</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>await(60)--await id 0 await(60)--await id 1 await(60)--await id 2 --nextframe await(60)--await id 0 await(60)--await id 1 await(60)--await id 2</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=36906 https://www.lexaloffle.com/bbs/?tid=36906 Sun, 23 Feb 2020 01:32:06 UTC storing a range of number in a table causes rounding issues <p>can someone tell me how to fix this bug?</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 range(low,high,step) local t={} for i=low,high,step do add(t,flr(i/step)*step)-- end return t 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>for example I am doing this for my menus..</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 run_menu1() scene.upd = upd_menu1 scene.drw = drw_menu1 --options selectors optiony=1 --optiony options= { --optionx and options {1, {false , true }}, --powerups {1, {&quot;grow&quot;, &quot;infinite&quot; }}, --tail type {42,range(-4.0, 4.0, 0.1)}, --player speed {42,range(-4.0, 4.0, 0.1)}, --player accel on any deaths {1, range( 0.0,32.0, 1.0)}, --border size {42,range(-4.0, 4.0, 0.1)}, --border speed {42,range(-4.0, 4.0, 0.1)} -- border accel on any deaths } end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <img style="margin-bottom:16px" border=0 src="/media/27670/pcvids.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=36887 https://www.lexaloffle.com/bbs/?tid=36887 Fri, 21 Feb 2020 23:19:01 UTC implicit conversion between bools and numbers? <p>what do you guys think about a implicit conversion between bools a numbers being added?</p> <p>it shouldn't hurt existing cartridges but would allow for something like this..</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>local axisy = btn(3)-btn(2)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>normally you would need to write a num function that converts bools to numbers for something like this. </p> https://www.lexaloffle.com/bbs/?tid=36833 https://www.lexaloffle.com/bbs/?tid=36833 Sat, 15 Feb 2020 00:12:46 UTC bounding box of drawn sprite? <p>can someone explain to me how to get a sprites bounding box?</p> <p>I have this code which reads from the center of a sprite and keeps checking above it until the pixel is 0 or its at the top of the sprite.</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 boxt(s,x,y,w,h) local sx1=flr(s%16)*(w*8) local sy1=flr(s/16)*(h*8) local sx2=sx1+(w*8) local sy2=sy1+(h*8) local cx =4 local cy =4 //find 0 pixel or top while sget(sx1+cx,sy1+cy) != 0 or sy1+cy &gt; sy1 do cy-=1 end sspr(sx1,sy1,sx2-sx1,sy2-sy1,x+cx,y+cy) return cy+y 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>however it doesn't seem to work</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>local s,x,y=22,63,63 function _draw() cls(1) if(boxt(s,x,y,1,1) &gt; 0) then y-=1 end //spr(s,x-4,y-4) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=36831 https://www.lexaloffle.com/bbs/?tid=36831 Fri, 14 Feb 2020 23:05:10 UTC out of memory? <p>can someone tell me why I am running out of memory?<br /> <table><tr><td> <a href="/bbs/?pid=65895#p"> <img src="/bbs/thumbs/pico8_jajefutayu-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=65895#p"> jajefutayu</a><br><br> by <a href="/bbs/?uid=27670"> Shadowblitz16</a> <br><br><br> <a href="/bbs/?pid=65895#p"> [Click to Play]</a> </td></tr></table> </p> <p><a href="https://www.lexaloffle.com/bbs/?uid=8336"> @Catatafish</a> I completely changed the question I realized i do not have an infinite loop. I just assumed since I was running out of memory.</p> <p>this line seems to be doing it and idk why..</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> o:procx() </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=34754 https://www.lexaloffle.com/bbs/?tid=34754 Tue, 16 Jul 2019 23:07:47 UTC attempt to call global vec a table value? <p>can someone tell me why this throws the error &quot;attempt to call global vec a table value&quot;?<br /> vec clearly has its metatable set with a call metaevent</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> vec= { x=0, y=0, mag=function(o) return sqrt (o.x^2+o.y^2) end, ang=function(o) return atan2(o.x, o.y ) end, nrm=function(o) return vec(o:ang()/360) end, } vecmeta= { __call=function(o,x,y) o =o or {} o.x=y and x or cos((x+90)/360) o.y=y and y or-sin((x+90)/360) return setmetatable(o,vec) end, __eq=function(a,b) a=type(a) == &quot;number&quot; and vec(a,a) or a b=type(b) == &quot;number&quot; and vec(b,b) or b return (a.x==b.x and a.y==b.y) end, __add=function(a,b) a=type(a) == &quot;number&quot; and vec(a,a) or a b=type(b) == &quot;number&quot; and vec(b,b) or b return vec(a.x+b.x,a.y+b.y) end, __sub=function(a,b) a=type(a) == &quot;number&quot; and vec(a,a) or a b=type(b) == &quot;number&quot; and vec(b,b) or b return vec(a.x-b.x,a.y-b.y) end, __mul=function(a,b) a=type(a) == &quot;number&quot; and vec(a,a) or a b=type(b) == &quot;number&quot; and vec(b,b) or b return vec(a.x*b.x,a.y*b.y) end, __div=function(a,b) a=type(a) == &quot;number&quot; and vec(a,a) or a b=type(b) == &quot;number&quot; and vec(b,b) or b return vec(a.x/b.x,a.y/b.y) end, } setmetatable(vec, vecmeta) local test = { pos=vec(0,0), vel=vec(0,0), } </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=34747 https://www.lexaloffle.com/bbs/?tid=34747 Tue, 16 Jul 2019 05:14:10 UTC table values are are nil <p>can someone tell me why I am getting nil when printing out the stars px and py values?</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> local stars={} for i=0, 16 do add(stars,{x=rnd(128),y=rnd(128),px=x,py=y,c=7}) end --px and py are equal to x and y drwmenu=function() if btn(2) then menuind-=1 end if btn(3) then menuind+=1 end menuind=mid(0,4) for v in all(stars) do print(v.px) --prints nil print(v.py) --prints nil line(v.x,v.y,v.px,v.py,v.c) --line(v.x,v.y-128,v.px,v.py,v.c) --v.py=v.y --v.y+=8 if v.y &gt; 127 then v.y-=128 end end if (time()-last &gt; 1) then rectfill(0,112,127,120,1) print(&quot;press start!&quot;,0,114,7) if (time()-last &gt; 2) then last=time() 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> https://www.lexaloffle.com/bbs/?tid=34704 https://www.lexaloffle.com/bbs/?tid=34704 Sat, 13 Jul 2019 05:25:10 UTC yield() outside of coroutines and inside functions? <p>does yield() work outside of coroutines and inside functions?</p> <p>I feel coroutines are a pain to setup and update when it would just be easier to call yield inside a function<br /> not to mention the tokens required to setup coroutines and call/update them</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 wait(t) for x=1,t do yield() end end function test() wait(2) print(&quot;test&quot;) wait(2) end function _update() test() end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=34703 https://www.lexaloffle.com/bbs/?tid=34703 Sat, 13 Jul 2019 03:08:39 UTC 90 degree rotation? <p>is there a build in function that rotates a drawn tile by 90 degrees for the 4 possible values of 0,1,2 and 3?</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/27670/Untitled.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=34676 https://www.lexaloffle.com/bbs/?tid=34676 Wed, 10 Jul 2019 23:10:22 UTC some functions I would like to see in pico8 <h1>EDITED 2/14/2020</h1> <p>I came up with several functions that I think would go good in pico8 and would reduce file size for larger games</p> <p>--math</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 ldx(d,l) --stands for lengthdirx return cos(d)* l or 1 end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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 ldy(d,l) --stands for lengthdiry return sin(d)* l or 1 end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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 ptl(x1,y1,x2,y2) --stands for point length return sqrt(((y2-y1)^2)+((x2-x1)^2)) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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 ptd(x1,y1,x2,y2) --stands for point direction return atan2(y2-y1,x2-x1) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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 wrp(v,l,h) -- stands for wrap local o=v while(o &lt; l) o += (h-l) while(o &gt; h) o -= (h-l) return o end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <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 rng(v, l1, h1, l2, h2) -- stands for range return l2 + (v - l1) * (h2 - l2) / (h1 - l1) 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>--vectors </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 vec(vx,vy) --stands vector local m= { __eq =function(a,b) return (a.x==b.x and a.y==b.y) end, __add=function(a,b) return vec(a.x+b.x, a.y+b.y) end, __sub=function(a,b) return vec(a.x-b.x, a.y-b.y) end, __mul=function(a,b) return vec(a.x*b.x, a.y*b.y) end, __div=function(a,b) return vec(a.x/b.x, a.y/b.y) end } local v= { x=vx, y=vy, } return setmetatable(v,m) 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>--tables</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 new(orig) --stands for new table local orig_type = type(orig) local copy if orig_type == 'table' then copy = {} for orig_key, orig_value in next, orig, nil do copy[deepcopy(orig_key)] = deepcopy(orig_value) end setmetatable(copy, deepcopy(getmetatable(orig))) else -- number, string, boolean, etc copy = orig end return copy 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>some notes..</p> <ul> <li> <p>while ldx, ldy, ptl and ptd wouldn't save alot of space they would be easier to understand and would definitly be used by newer programmers</p> </li> <li> <p>the wrp function would wrap a number around a low and high value and would be useful besides just saving space.<br /> for example if you wanted to make a spaceship game with wrapping borders</p> </li> <li> <p>rng is another useful function that would take a value and 2 ranges of numbers and return a converted value between those ranges. </p> </li> <li> <p>vec returns a 2d vector that allows operating on other vectors</p> </li> <li>new would just return a deep copy of the table u give it and would make oop easier and take less space up in the cart</li> </ul> https://www.lexaloffle.com/bbs/?tid=31680 https://www.lexaloffle.com/bbs/?tid=31680 Wed, 15 Aug 2018 22:36:21 UTC online multiplayer based on synced inputs? <p>is there a plan to add built in pico8 multiplayer using synced inputs?</p> <p>basically it would be handled in pico8 rather than the cart.</p> <p>it would allow players to connect to each other via ip or game uid and official lexaloffle connecting servers through the pause menu.</p> <p>this might be the easiest way to build a multiplayer game since there would be no packets being sent besides the hard coded inputs.</p> <p>networked inputs would be accessible the same way normal inputs are with btn(btn, player).</p> <p>this would also make multiplayer games have not just networked players but local ones as well.<br /> players count would be limited to the number of inputs pico8 has.</p> https://www.lexaloffle.com/bbs/?tid=31647 https://www.lexaloffle.com/bbs/?tid=31647 Sat, 11 Aug 2018 23:21:38 UTC simple function to rotate sprites around a point? <p>does anybody have a good rspr(n, x, y, w, h, r, ox, oy, flipx, flipy) function to draw rotated sprites?<br /> I need this to make my 4 player spaceship battle game.</p> https://www.lexaloffle.com/bbs/?tid=31642 https://www.lexaloffle.com/bbs/?tid=31642 Fri, 10 Aug 2018 21:40:42 UTC (solved)4 players for raspberry pi? <p>ok so I think I get how people like pico 8 for its limitations. but will pico 8 ever support 4 players simultaneously?</p> <p>this would be good for things like raspberry pi where 4 players can sit on a couch and play small 4 player games together.<br /> what do you guys think?<br /> I know older hardware only supported up to 2 players but I think this would be a good idea for the compactness of pico8.</p> https://www.lexaloffle.com/bbs/?tid=30731 https://www.lexaloffle.com/bbs/?tid=30731 Sun, 04 Feb 2018 20:54:25 UTC are limitations too strict? <p>I was just wondering everybody's opinion on the limitations of pico8?</p> <p>right now there isn't really much we can do with it besides make very simple 1 level games.<br /> pico8 could do much better if code limitations weren't so harsh.</p> <p>also it seems people smash all there code together to preserve tokens which is not good<br /> for example..<br /> this takes up more space</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> local var = 0 var = var + 1 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>then this</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> local var=0 var=var+1 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>which makes no sense</p> <p>if code limitations were removed and cart loading time was reduced significantly<br /> then pico8 could make much larger games while still saving to a small cart size.</p> <p>what would even be better if pico 8 carts were separated into 2 parts</p> <ul> <li>the compiled game</li> <li>and the dev files</li> </ul> <p>so what do you guys think?</p> <p>keeping the games small maybe be fun but you can only do so much with it especially with the severe limitations of pico8.</p> https://www.lexaloffle.com/bbs/?tid=30717 https://www.lexaloffle.com/bbs/?tid=30717 Fri, 02 Feb 2018 20:59:37 UTC