Dear Francois,
thank you for your answer - and no, it's not too long but to short :-)
It's very interesting what you are going thru and I think it is of interest of 
many other QL users too. Your 3D engine and game development could be a series 
of articles in the Quanta and QL Today magazines and is worth a blog with 
screenshots and code samples and of course a donate button.
If you want I can help with creating a manual ... not the writing but the 
Layout :-)
Keep on the good work! And you may can publish also sth on the QL Forum ...

Best,
Thorsten




>Hi Thorsten,
>
>I had the idea for this project after designing a gimbal for an antenna on a 
>satellite at work. I had to work with 3D transformation matrices for the >beam 
>pointing, especially rotation matrices. Having this renewed knowledge of all 
>the mathematics involved in 3D transformation I felt ready for a 3D >program, 
>something I always wanted to do since I first put my hands on a zx81 a long 
>time ago.
>
>I started with implementing a few basic 3D routines in Superbasic. When 
>everything was working, I switch to "C" programming for more speed. I wrote 
>>the complete 3D engine without even compiling my code once. Then I wrote the 
>point and line algorithm also in C. After correcting all the bugs that >pop 
>out during compiling, I tried the speed of my new line drawing capabilities by 
>drawing a few hundred lines on screen. I told myself "Basic is >slow, my C 
>version will be much faster!" To my surprise, my version was 2X slower than 
>basic. This was a bad news. Line drawing must be much faster >than basic for 
>this to work. My next version was in assembler. I was hopping to get a 10X 
>speedup compare to the C version, I got 12X. Good. I also >wrote the line 
>removal routines in assembler.
>
>This was last Friday. I was ready to test the engine. Took me half a day to 
>remove the bugs. It worked but the speed was terrible, but I was >expecting 
>this. The reason this time was the speed of the double precision floating 
>point calculations in C. Again, Superbasic is faster than C (But >C has more 
>precision). In a 3D engine, there is a lot of trigonometric functions involved 
>and these are quite slow. So again, I recoded everything >using integer 
>arithmetics with new machine code trigonometric function. That is when I got 
>30 frame per second...
>
>BTW when I am done with this, I will put the 3D engine in the public domaine, 
>if anyone wants to play with it.
>
>Sorry for the long mail.
>
>François

                                          
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to