avatar
L Break Into Program @breakintoprogram.co.uk

Got sick of seeing the cube. Figured it was time for an upgrade. The glitch is a maths error in the rotation, an overflow. That'll be fixed when I convert it to the optimised assembler lookup table version. Also need to do hidden face culling. The Elite data is stored differently. Easily done still.

Video thumbnail
aug 29, 2025, 10:02 pm • 52 3

Replies

avatar
L Break Into Program @breakintoprogram.co.uk

I can switch the offending code to use floats, but as you can see, the rotation slows down somewhat. Regardless, the z88dk maths libraries are doing a sterling job there. That's done partly using floats, and sin and cos from maths.h. It'll be much faster once I've given it the asm treatment.

Video thumbnail
aug 29, 2025, 10:13 pm • 15 0 • view
avatar
L Break Into Program @breakintoprogram.co.uk

Okay folks, there was a quick fix - use a long in the perspective calculation and leave the rotation as int.

aug 29, 2025, 10:47 pm • 6 0 • view
avatar
bugbear6502.bsky.social @bugbear6502.bsky.social

Working on high resolution typesetter code (up to 3600 pixels per inch, up to 36"), coding on a 68020, we used 24.8 fixed point as our main representation. It's really hard to keep integer maths pixel accurate, but when you've got 8 spare bits, life get easier. (this was 1986/87)

aug 30, 2025, 7:43 am • 3 0 • view
avatar
L Break Into Program @breakintoprogram.co.uk

Now its time to supercharge the 3D maths.

aug 29, 2025, 10:06 pm • 2 0 • view
avatar
nivrig.bsky.social @nivrig.bsky.social

I knew you'd pick that model :D

aug 29, 2025, 10:06 pm • 2 0 • view
avatar
L Break Into Program @breakintoprogram.co.uk

Hehehe!

aug 29, 2025, 10:10 pm • 0 0 • view
avatar
ᗪ卂尺Ҝ 乃ㄥㄩ乇 爪ㄖ几Ҝ乇ㄚ @darkbluemonkey.bsky.social

Perfection! o7

aug 30, 2025, 8:49 am • 1 0 • view
avatar
Steve @protovision.co.uk

Love it, Right on Commander!

aug 29, 2025, 11:22 pm • 1 0 • view
avatar
L Break Into Program @breakintoprogram.co.uk

Thank you!

aug 30, 2025, 8:22 am • 0 0 • view