While working on a DOOM style 3D game, I came across what I'm fairly confident now is a bug in how tline3d uses the w0 and w1 parameters. To illustrate the issue (and because explaining what's happening is fairly difficult, I'm not certain myself exactly what's happening) I've created a reproduction cart which also contains an implementation of what I would have expected tline3d to do.
Press Enter or Start to toggle between the builtin implementation and my own.

Constellations
(293 chars)
d={}c={11,2,3,4,5}r=rnd
p=pal
p(2,-5,1)p(4,-13,1)p(5,-15,1)for i=1,20do
d[i]={x=r(127),y=r(127),a=r(2)-1,b=r(2)-1}end::_::cls()for i in all(d) do
for j in all(d) do
l=sqrt((i.x-j.x)^2+(i.y-j.y)^2)if(l<35)line(i.x,i.y,j.x,j.y,c[flr(l/7+1)])end
i.x=(i.x+i.a)%128i.y=(i.y+i.b)%128end
flip()goto _
|

: add multi boxes and multi target and few more levels
im creating a simple box pushing game to practice lua scripting and basic pico8 programming by using simple, readable code
please comment if you have better practice on the implementation!!
i'm still learning and this little game sure will be further developed

Rail Grind
This one looks better in 60fps, load the code in the PICO-8 editor if you want to see that. I probably could've made it 30fps to save space, but I'm happy with this result, and I likely wouldn't have had room for anything else anyway.
(299 chars)
p=pal
p(1,-9,1)p(3,-8,1)p(4,-14,1)c={7,1,10,9,8,3,2,4}s={}function _update60()cls()w=sin(t()/4)*16+96z=48+w/2add(s,{x=w,y=z,a=rnd()-2,b=rnd(2)-3,l=1})line(0,48,127,112,6)?"웃",w,z-3
for i in all(s)do
i.b+=.05i.x+=i.a
i.y+=i.b
i.l+=.2if(i.l>#c)del(s,i)
line(i.x,i.y,i.x-i.a,i.y-i.b,c[flr(i.l)])end
end
|

You've been invited to Pico City's highly exclusive, sickeningly violent fight club, where you can unleash your pent-up rage on strangers-- as long as it's your turn! Weave through attacks while collecting Debloons that can charge special abilities. Features five encounters, 30 unique bullet patterns, and Local hot commodity Tangerine.
.
.
.
,

A simple clock postcart. The cartridge is at https://www.lexaloffle.com/bbs/?tid=149684 so you can see your current time instead of just the one in the gif.
(290 chars)
s=sin c=cos t=stat v=ovalfill o=64.5function l(a,b)line(o,o,o-s(a)*b,o-c(a)*b)end::_::srand()cls(4)rectfill(8,8,119,119,2)v(0,0,127,127,4)v(8,8,119,119,7)for i=1,12do?i,-s(i/12)*48+62,-c(i/12)*48+61,0 end?"●",61,62 e=t(95)/60%1m=(e+t(94))/60%1h=(m+t(93))/12l(e,52)l(m,44)l(h,32)flip()goto _ |
A simple clock made in 290 characters. I decided to upload the cartridge and not just the gif of this postcart, because it would be pointless if you couldn't see the current time with it.
Source code:
s=sin c=cos t=stat v=ovalfill o=64.5function l(a,b)line(o,o,o-s(a)*b,o-c(a)*b)end::_::srand()cls(4)rectfill(8,8,119,119,2)v(0,0,127,127,4)v(8,8,119,119,7)for i=1,12do?i,-s(i/12)*48+62,-c(i/12)*48+61,0 end?"●",61,62 e=t(95)/60%1m=(e+t(94))/60%1h=(m+t(93))/12l(e,52)l(m,44)l(h,32)flip()goto _ |

DOOM clone (WIP)
Early WIP of a DOOM-like 3D game, which I've simply named "DOOM clone" for now.
Controls
Primary stick: Move
Secondary stick: Look (also mouse)
Left/Right Bumper: Cycle through video modes
P: Toggle CPU usage
Changelog
Revision 2 (July 9th 2025)
Added ability to draw models made of textured triangles.
Revision 1 (June 27th 2025)
Added floors and ceilings and a performance counter.
Initial release
Walls & basic movement are in, no collision yet.
Plans
I'm not sure what I want to do with this tech yet, but I knew the first step was to actually make a few functions that can draw the required 3D primitives. The engine can so far draw dots, bars, and walls in 3D space. The walls are perspective correct and get clipped by the near plane so there's no glitching when looking at walls from close up or at acute angles or anything. Primitives that are completely behind the camera even get culled.







3 comments





