Hello! I've made a cart on my console and it runs there. But when I upload it onto BBS, it gives a syntax error.
Error:
syntax error line 5 (tab 1)
-return fget(mget(x/8,y/8),f)
<eof> expected near 'end'
Function:
function gfap(x,y,f)
-return fget(mget(x/8,y/8),f)
end
i've marked indent spaces as '-'
Pico-8 version i made the game at: 0.2.5c

This tool allows you to map lines on a plane and export them into any of your carts.
Each line is represented as a table with values x1,y1,x2,y2.
This is useful for raycast projects or whatever you need to map lines for.
Buttons (left-up corner of the screen, top to bottom):
Temp save: temporarily saves all line data to adresses 0x4300-0x5dff in console memory.
Load: loads data at adresses 0x4300-0x5dff. Can be used as reserve copy.
Toggle ruler: Each line displays it's length to the right of it's 2nd point.
Export: allows you to type in your desired cart's name and export line data to it's addresses 0x4300-0x5dff. This overwrites your cartridge file so make sure you don't have anything valuable in there (sprites, map, sounds and, obviously, code are safe).

How do you deal with range overflow? The numbers beyond 32767 warp to -32766 in pico8's 16 bit signed system when calculating. This is sometimes enough, but not always. For example,
function distance(x1,y1,x2,y2) return sqrt((x2-x1)^2+(y2-y1)^2) end |
will sometimes (very often actually) return 0 as a result of taking sqrt of the negative wrapped number. This is occasionally crutial. Is there a workaround to compute this as if this was an unsigned system?

So i watched lazy devs' youtube shorts about how he makes his shmup levels. In there he mentioned that he has different pico8 cartridges that work as tools for editing stuff like sprites, bullet patterns and level scenery. I coded a 2d space line editor that can be used for raycasting. How can i transfer all lines data to an another cartridge for use? There is a big "lines" table that containes tables with individual line data. I know that you can't transfer actual code or tables between carts so lazy devs should have used something different.

Hello everyone. Is there a way to write and read values to specific bits in a byte?
For example:
I have a variable 0x0000 .
I want to write a 1 to the 3rd bit so it'll be
0x0100 . How can i do that?
I want to later read that variable. How do I
check the value of the 3st bit? I haven't operated
with bits & bytes before.






2 comments


