Shadowblitz16 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=27670 some functions I would like to see in pico8 <p>I came up with several functions that I think would go good in pico8 and would reduce file size for larger games</p> <div> <div style="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> --math function ldirx(l,d) --stands for lengthdirx accepts degrees and saves 2 chars per call function ldiry(l,d) --stands for lengthdiry accepts degrees and saves 2 chars per call function plen(x0,y0,x1,y1) --stands for pointlen and saves 16 chars per call function pdir(x0,y0,x1,y1) --stands for pointdir and saves 2 char per call function wrap(x, y, z) --stands for wrap and saves 66 chars per call function range(v,a1,a2,b1,b2)--stands for rerange and saves 31 chars --vectors function vec(x,y) --stands for vector and saves 16 chars per call function vgetl(v) --stands for vector get length and saves 26 chars per call if using plen function vsetl(v,x,y)--stands for vector set length and accepts a vector or a len and deg and saves 134 chars function vaddl(v,x,y)--stands for vector += length and accepts a vector or a len and deg and saves 134 chars function vsubl(v,x,y)--stands for vector -= length and accepts a vector or a len and deg and saves 134 chars function vmull(v,x,y)--stands for vector *= length and accepts a vector or a len and deg and saves 134 chars function vdivl(v,x,y)--stands for vector /= length and accepts a vector or a len and deg and saves 134 chars function vgetd(v) --stands for vector get dir and accepts a deg and saves 24 chars function vsetr(v,r) --stands for vector set dir and accepts a deg and saves 43 chars function vaddr(v,r) --stands for vector += dir and accepts a deg and saves 43 chars function vsubr(v,r) --stands for vector -= dir and accepts a deg and saves 43 chars function vmulr(v,r) --stands for vector *= dir and accepts a deg and saves 43 chars function vdivr(v,r) --stands for vector /= dir and accepts a deg and saves 43 chars --tables function copy(v) --stands for copy and saves 152 chars </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>while ldirx, ldiry, plen and pdir wouldn't save alot of space they would be easier to understand and would definitly be used by newer programmers</li> <li> <p>the wrap function would wrap numbers around a min and max value and would be useful besides just saving space</p> </li> <li> <p>range is another useful function that would take 2 ranges of numbers and return a converted value between those ranges</p> </li> <li> <p>vectors while I only posted 2d versions could actually be made to work with 3d as well by supplying a additional z, vector, length and direction.</p> </li> <li>copy 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 style="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 style="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