I came up with several functions that I think would go good in pico8 and would reduce file size for larger games
--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
- 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
the wrap function would wrap numbers around a min and max value and would be useful besides just saving space
range is another useful function that would take 2 ranges of numbers and return a converted value between those ranges
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.
- 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
is there a plan to add built in pico8 multiplayer using synced inputs?
basically it would be handled in pico8 rather than the cart.
it would allow players to connect to each other via ip or game uid and official lexaloffle connecting servers through the pause menu.
this might be the easiest way to build a multiplayer game since there would be no packets being sent besides the hard coded inputs.
networked inputs would be accessible the same way normal inputs are with btn(btn, player).
this would also make multiplayer games have not just networked players but local ones as well.
players count would be limited to the number of inputs pico8 has.
ok so I think I get how people like pico 8 for its limitations. but will pico 8 ever support 4 players simultaneously?
this would be good for things like raspberry pi where 4 players can sit on a couch and play small 4 player games together.
what do you guys think?
I know older hardware only supported up to 2 players but I think this would be a good idea for the compactness of pico8.
I was just wondering everybody's opinion on the limitations of pico8?
right now there isn't really much we can do with it besides make very simple 1 level games.
pico8 could do much better if code limitations weren't so harsh.
also it seems people smash all there code together to preserve tokens which is not good
this takes up more space
local var = 0 var = var + 1
local var=0 var=var+1
which makes no sense
if code limitations were removed and cart loading time was reduced significantly
then pico8 could make much larger games while still saving to a small cart size.
what would even be better if pico 8 carts were separated into 2 parts
- the compiled game
- and the dev files
so what do you guys think?
keeping the games small maybe be fun but you can only do so much with it especially with the severe limitations of pico8.