42bs Posted March 19 Share Posted March 19 (edited) 2nd one. This one is complete on a 512KB card including all original data (only rez reduced for the Lynx) It runs in nearly 20FPS despite the mass of polygons that are drawn and overdrawn. But optimizing the scene data is no option in the sense of a "contest" 🙂    Source as usual: https://github.com/42Bastian/lynx_hacking/tree/master/lniccc2000  lniccc2000.lnx Edited March 19 by 42bs 12 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 19 Author Share Posted March 19 Addendum: Captured from real machine via McWill's VGA out. Quote Link to comment Share on other sites More sharing options...
WesleyrpgAust Posted March 20 Share Posted March 20 Great looking demo! Â Shame it can't be used to fix the horrendous framerates of Hard Drivin' and Steel Talons. 1 Quote Link to comment Share on other sites More sharing options...
4ever2600 Posted March 20 Share Posted March 20 Is very impressive looking demo! Congrats! 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 20 Author Share Posted March 20 6 hours ago, WesleyrpgAust said: Great looking demo!  Shame it can't be used to fix the horrendous framerates of Hard Drivin' and Steel Talons. Never mix demo mode with game mode 🙂 1 Quote Link to comment Share on other sites More sharing options...
agradeneu Posted March 20 Share Posted March 20 6 hours ago, WesleyrpgAust said: Great looking demo!  Shame it can't be used to fix the horrendous framerates of Hard Drivin' and Steel Talons. HD and Steel Talons are not precalculated frames, as far as I understand it. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 20 Author Share Posted March 20 On the other hand, the demo needs average 52ms to draw a frame from which 28ms is loading from card.  But I think 30years ago, we were impressed by most if not all Lynx games (ok, maybe not chess 🙂 )   Quote Link to comment Share on other sites More sharing options...
sage Posted March 20 Share Posted March 20 reviving in this thread ;))) Â 1 Quote Link to comment Share on other sites More sharing options...
sage Posted March 20 Share Posted March 20 reading back a bit, issue was to squeeze into 512kb and the inexact right side of the triangles. Â how did you solve it? > "no option in the sense of a "contest" so you saved 2 bits? cannot imagine that this already did the job. Â Â Quote Link to comment Share on other sites More sharing options...
42bs Posted March 20 Author Share Posted March 20 (edited) 17 minutes ago, sage said: reading back a bit, issue was to squeeze into 512kb and the inexact right side of the triangles. Â how did you solve it? > "no option in the sense of a "contest" so you saved 2 bits? cannot imagine that this already did the job. Â Â I guess the reduction from 256x200 => 128x100 produced enough redundancy. The original data compresses with LZ4 down to 505KB. Leaving 7KB for the "player". Even TurboPacker would work, but unlz4 was quicker. Edited March 20 by 42bs Quote Link to comment Share on other sites More sharing options...
42bs Posted March 20 Author Share Posted March 20 Also, I rewrote the triangle drawing to use only 8 bits and use 1/y multiplication instead of division. Â And: Guess why there is a frame Quote Link to comment Share on other sites More sharing options...
WesleyrpgAust Posted March 21 Share Posted March 21 Any chance you could re-upload this to YouTube without the scan-lines? Â Also, what sort of framerate do you think the Lynx could achieve doing this 3D without it being pre-rendered? Quote Link to comment Share on other sites More sharing options...
42bs Posted March 21 Author Share Posted March 21 The scan lines are due to the VGA output. I captured it directly from Lynx. Â Bastion from Prior Art might give a hint what is possible. Though they seem to use direct memory writes instead of Suzy. Â I have never done a "open world" like or Duke Nukem like 3D engine yet. Quote Link to comment Share on other sites More sharing options...
sage Posted March 21 Share Posted March 21 20 hours ago, 42bs said: Also, I rewrote the triangle drawing to use only 8 bits and use 1/y multiplication instead of division. Â And: Guess why there is a frame I see Quote Link to comment Share on other sites More sharing options...
enthusi Posted March 21 Share Posted March 21 (edited) For the Bastion 3D part: Yes, Susy is merely used to clear the frame, effectively it is used to clear the buffer memory only. There is nothing precalculated so it is essentially a line drawing algo and a quick filler (along with quite some 3D math, of course). Edited March 21 by enthusi Quote Link to comment Share on other sites More sharing options...
WesleyrpgAust Posted March 22 Share Posted March 22 Would love to see what the Lynx can really do now that we've had 30 years to tinker with the hardware! Quote Link to comment Share on other sites More sharing options...
+karri Posted March 22 Share Posted March 22 Is the 3D stuff here following the DirectX or the OpenGL conventions when multiplying vectors with matrixes? Â Thomas Harte wrote a nice multiplicator that used Suzy's multiplication and accumulator in parallell with the CPU preparing for the next calculation. So it was kind of a pipeline. Unfortunately the stuff did not stay orthogonal for very long so I never released anything based on it. But I loved the idea to pipeline stuff and use both chips. Â It would be nice to have a fast 16 bit library for calculating views into a 3D world. 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 22 Author Share Posted March 22 9 minutes ago, karri said: Is the 3D stuff here following the DirectX or the OpenGL conventions when multiplying vectors with matrixes? Â It is pre-calculated. The scene1.dat file "just" contains a list of polygons. No 3D calculations. Â Interleaving math function with other stuff is difficult and I doubt you can make it "general". Quote Link to comment Share on other sites More sharing options...
+karri Posted March 22 Share Posted March 22 1 hour ago, 42bs said: Interleaving math function with other stuff is difficult and I doubt you can make it "general". Yep. Here is the hand interleaved matrix multiplication. But I don't know if there is a flaw somewhere. At least while using it in Stardreamer I did have problems with very strange results after a while.  matrix.s.txt zeropage.s.txt  int VertsPoint[] = { 1, 2, 3 }; int VertsTriangle[] = { 0, 0, 64, -128, 0, -64, 128, 0, -64 }; int VertsXwing[] = { 0, 0, 64, -128, 128, -64, 128, 128, -64, -128,-128, -64, 128,-128, -64 }; ... MLoad(&ownship.vbasis_right_x); MMultiply(&(object->vbasis_right_x)); VertexSource = VertsPoint; VertexCount = 1; VertexTarget = PointBuffer; MPerform();  3d.h.txt vbasis.s.txt Quote Link to comment Share on other sites More sharing options...
42bs Posted March 22 Author Share Posted March 22 17 minutes ago, karri said: did have problems with very strange results after a while. Could be a rounding error if you accumulate position over time. Quote Link to comment Share on other sites More sharing options...
+karri Posted March 22 Share Posted March 22 1 hour ago, 42bs said: Could be a rounding error if you accumulate position over time. Good point. I planned to do some test cases but unfortunately lost interest... Â It would be nice to have a 3d library that you could call from C. Â The value 1 in this system is $4000. So an identity matrix would have all entries as 0 except the diagonal that consists of $4000's. Â I would like to keep the math so that multiplying a vector with the matrix does not change the length of the vector. It would also be a big plus if the matrix would remain orthogonal concerning the 3 axis. Â The code is really very good for showing realistic space dust that reacts to climb, roll, speed. untitled.mp4 Â Â 1 Quote Link to comment Share on other sites More sharing options...
LordKraken Posted March 22 Share Posted March 22 I'm surprised nobody ever explored doing a "fake" 3d games using this technique. Sure the camera would be fixed, but the overall impression would still be great. Â There is a good example on gameboy color with a toy story racing game I believe. Â 2 Quote Link to comment Share on other sites More sharing options...
42bs Posted March 22 Author Share Posted March 22 Oh, no. Now you spoiled it  Quote Link to comment Share on other sites More sharing options...
42bs Posted March 22 Author Share Posted March 22 (edited) 1 hour ago, karri said: Good point. I planned to do some test cases but unfortunately lost interest...  It would be nice to have a 3d library that you could call from C.  The value 1 in this system is $4000. So an identity matrix would have all entries as 0 except the diagonal that consists of $4000's.  I would like to keep the math so that multiplying a vector with the matrix does not change the length of the vector. It would also be a big plus if the matrix would remain orthogonal concerning the 3 axis.  The code is really very good for showing realistic space dust that reacts to climb, roll, speed.  untitled.mp4 4.47 MB · 0 downloads  Looking at the code I did wonder, why you need 14 bits of FP. BTW: Doing RMW in Suzy registers feels no good. (asl MATHx). Edited March 22 by 42bs Quote Link to comment Share on other sites More sharing options...
+karri Posted March 22 Share Posted March 22 2 minutes ago, 42bs said: Looking at the code I did wonder, why you need 14 bits of FP. BTW: Doing RMW in Suzy registers feels no good. (asl MATHx). Yep. The correct way might have been to go with 8 bits after all. It was just that Suzy did have some 16/32 bit stuff in it and I used to be familiar with 3D using fracmul math (Transputers). Fracmul, where an integer was interpreted as a fraction between -1 to 1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.