Recent posts

#91
The Sentinel / time to move to fixed point
Last post by Andrew Davie - 30 Jul 2024, 03:07 AM
Now that the 3D engine is approaching "maturity" and I have a pretty good idea where the bottleneck is, it's time to bite the bullet. I've used floating point calculations so far and it's now time to move to fixed-point instead. This will take me some time, but I expect the results to be dramatic. The stm32g070 uses software libraries for floating point operations (!!) and does not have a floating point unit (FPU). Imagine how much processing power is sunk into the 3D calculations - no wonder it's slow.  Clearly the bottleneck, and I predict a... let's say 10x speedup in the pipeline when I'm done. That would mean I could, say, run 100 space ships at 60Hz. Well, that's the dream. Watch this space, I guess.

#92
Cubix / Re: Cubix
Last post by Andrew Davie - 29 Jul 2024, 11:13 PM
In the end, it wasn't the dot-product that was backwards; it was the orientation of the faces of the cube data. Instead of defining in counter-clockwise order, I had defined the cube faces in clockwise order. I blame chatGPT for that.
#93
Cubix / Re: Cubix
Last post by Andrew Davie - 29 Jul 2024, 10:38 PM
Here's an updated video. It's still slow, but looking nice.
The face colours change when I press the button. Only the visible faces are coloured - and this helps the black borders between be a bit more defined. The real big task coming up is how to rotate the various groupings/faces together. It shoud be simple-ish, but I'm finding combined rotations and offsets hard to get my head around.

#94
Cubix / Screenshots of significance (C...
Last post by Andrew Davie - 29 Jul 2024, 02:28 AM
Cubix

iCC3


iCC1
#95
Elite / Re: Screenshots of significanc...
Last post by Bomberman94 - 29 Jul 2024, 02:18 AM
I like the van Gogh theme ☺️
#96
Elite / Screenshots of significance
Last post by Andrew Davie - 28 Jul 2024, 10:07 PM
Spaceships on a Starry Night
with apologies to Van Gogh

crt_composite_sentinel.elf_20240728_220530.jpg
#97
Elite / Re: 3D sorting + bugfix
Last post by Andrew Davie - 28 Jul 2024, 03:36 AM
There is a bug in quicksort - so I'm actualy using *gasp* bubble sort *gasp* in this version. Here I'm running 12 ships. A few issues still with the screen/polys, but getting there.

#98
Cubix / Re: Cubix
Last post by Andrew Davie - 27 Jul 2024, 11:57 PM
Well, proof of concept.  It shows how the cube would look at various sizes - near has too many issues with the lores/hires areas, but mid-distance it all looks rather good. I think a workable 3D Rubik's cube would be perfectly functional/possible. The frame rate is a bit slow, though - 27 cubes being rendered ehre and all those 3D calculations are a killer.

#99
Elite / 3D sorting + bugfix
Last post by Andrew Davie - 27 Jul 2024, 04:13 AM


In this rather long video I'm demonstrating the much improved stability of the 3D engine. Here it's running 10 spaceships. Previously I had been displaying only the back-faces (!!!) of the objects, so things were kind of warped and weird. Now that's fixed -- I kind of stumbled on this issue and am glad to have it working.  I have also found/fixed an issue with crashes which was caused by trying to render pollys that had been classified as "off screen". This lead to infinitely long lines being drawn and consequent overtimes.  There really isn't a lot of time available to do all this stuff - it all happens in the overblank (overscan+vertical blank) of a TV frame.

#100
Cubix / Re: Cubix
Last post by Andrew Davie - 27 Jul 2024, 03:40 AM
The backface dotproduct was arse-backwards and up to now I've been displaying backfaces of objects -- that is, faces pointing away from the camera. Go figure!  So if you think of the reverse faces of a cube, that's what we're seeing in the previous post.  I'm not quite fixed yet, but flipping that backface makes things look a whole lot better.