Graphics & game speed testing
- Posted by Talvitie <smtoa at SAUNALAHTI.FI> Apr 21, 1999
- 393 views
Tdmd on moniosainen MIME-muotoinen viesti. ------=_NextPart_000_005E_01BE8C4A.96386760 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What would you say, if I tell you, that I've developed a 3d engine = (still lot of testing&coding) which uses maybe (and just maybe) a ten = times faster 3D mathematics than others :O =20 I don't think I'm going to release the source(not cause the code itself = but the special mathematics that I have been developing many years(with = QB ;) and I'd like to earn a few bucks too(maybe I'll release the source = after a while :)), but anyway I'm going to release an exe file demo = 'bout what I've done with Eu(it will take still somewhat a week or two). =20 I tested my pre-alpha-demo-introduction-version 3D-engine's speed.=20 Here's the results: Mode A B C D=20 ------- ---------- ----------- ---------- ----------=20 19 .0761 .0756 .0708 .0648=20 257 2.406 2.333 N/A .2284 259 3.900 3.824 N/A .3563 261 6.390 6.270 N/A .5657 A=3DSome info text, clearscreen and all 3D graphics diasplayed B=3DSome info text, and all 3D graphics diasplayed C=3Donly 3D graphics displayed D=3Dnothing displayed N/A=3DNot tested -3D graphics are displayed using only pixel() routine -text is displayed with printf() routine -I haven't done any optimization to code yet (mode 320x200 won't get = much faster, but the other's will speed up a lot) -I have Pentium CelA 300MHz and 64MB RAM (for your information) What you can say on the basis of results is, that -mode 19 is really fast (well, it's mentioned in refman, they've really = optimized it :) -clearscreen doesn't take much time in any mode. (well, .1 seconds may = already be too slow) -modes 257, 259 and 261 are too slow for any *killer* game I suggess that you take a good look to results if you're planning to do = the next megalomanic game. The screen's refresh rate should be something = like .04 seconds (25 times/s) to produce smooth moving and it's not very = easy to reach in 3D games. Pete's note 'bout using DirectX or OpenGL is a pretty good note indeed, = but I must agree with LEVIATHAN (why all the uppercase? ) .... games = that port directly to card are faster(maybe not much, but still). = Anyway, Pete's right. We should leave the work to hardware. But does = anybody of you know how to code it? IOW... is there anyone who's able to = do that kind of graphics engine that I asked before? BTW, I use Mike's Editor (Thanks, it's really great :) under Win98 = (Microsoft, it really sucks :( Here's my way to test time in main loop. It's not hard to figure out, but maybe someone finds it helpful ;) --Main sequence AllResults atom Timer integer AbortPrgm, Key tick_rate(200) AllResults=3D{} Timer=3D-1 AbortPrgm=3D1=09 while AbortPrgm do --Here comes program happenings/jumps to procedures Timer=3Dtime()-Timer if Timer>-1 then WhatTook=3DWhatTook & Timer end if Key=3Dwait_key() Timer=3Dtime() --Here comes responding to keystrokes --Make f.ex. <Esc> to set AbortPrgm to 0 end while --let's display everything we have learned: --Timer is working as a 'helper' var if graphics_mode(-1) then end if Timer=3D0 for a=3D1 to length(WhatTook) do Timer+=3DWhatTook[a] end for Timer=3DTimer/length(WhatTook) printf(1, "Avarage time:%2.4f\n", Timer) Timer=3D0 for a=3D1 to length(WhatTook) do if WhatTook[a]>Timer then Timer=3DWhatTook[a] end if end for printf(1, "Largest time:%2.4f\n", Timer) Timer=3D100 for a=3D1 to length(WhatTook) do if WhatTook[a]<Timer then Timer=3DWhatTook[a] end if end for printf(1, "Smallest time:%2.4f\n", Timer) Timer=3Dlength(WhatTook)=20 printf(1, "Sampless token:%1f\n", Timer) puts(1,"Method to test speed: first press once <down-arrow>, then = <enter> several times, then <Esc>\n\n") ------=_NextPart_000_005E_01BE8C4A.96386760 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>What would you say, if I tell you, = that I've=20 developed a 3d engine (still lot of testing&coding) which uses maybe = (and=20 just maybe) a ten times faster 3D mathematics than others :O = <BR>I=20 don't think I'm going to release the source(not cause the code itself = but the=20 special mathematics that I have been developing many years(with QB ;) = and I'd=20 like to earn a few bucks too(maybe I'll release the source after a while = :)),=20 but anyway I'm going to release an exe file demo 'bout what I've done = with Eu(it=20 will take still somewhat a week or two).<BR> <BR>I tested my=20 pre-alpha-demo-introduction-version 3D-engine's speed. </FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Here's the results:</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Mode =20 C D=20 <BR>------- ---------- ----------- =20 ---------- ---------- <BR>19 =20 .0761 .0756 = .0708 =20 .0648 <BR>257 2.406 =20 2.333 N/A =20 .2284<BR>259 3.900 =20 3.824 N/A =20 .3563<BR>261 6.390 =20 6.270 N/A =20 .5657</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>A=3DSome info text, clearscreen and = all 3D=20 graphics diasplayed<BR>B=3DSome info text, and all 3D graphics=20 diasplayed<BR>C=3Donly 3D graphics displayed<BR>D=3Dnothing = displayed<BR>N/A=3DNot=20 tested</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2><BR>-3D graphics are displayed using = only=20 pixel() routine<BR>-text is displayed with printf() routine<BR>-I = haven't done=20 any optimization to code yet (mode 320x200 won't get much faster, but = the=20 other's will speed up a lot)<BR>-I have Pentium CelA 300MHz and 64MB RAM = (for=20 your information)</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>What you can say on the basis of = results is,=20 that<BR>-mode 19 is really fast (well, it's mentioned in refman, they've = really=20 optimized it :)<BR>-clearscreen doesn't take much time in any mode. = (well, .1=20 seconds may already be too slow)<BR>-modes 257, 259 and 261 are too slow = for any=20 *killer* game</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>I suggess that you take a good look = to results=20 if you're planning to do the next megalomanic game. The screen's refresh = rate=20 should be something like .04 seconds (25 times/s) to produce smooth = moving and=20 it's not very easy to reach in 3D games.<BR>Pete's note 'bout using = DirectX or=20 OpenGL is a pretty good note indeed, but I must agree with LEVIATHAN = (why all=20 the uppercase? ) .... games that port directly to card are faster(maybe = not=20 much, but still). Anyway, </FONT><FONT color=3D#000000 size=3D2>Pete's = right. We=20 should leave the work to hardware. But does anybody of you know how to = code it?=20 </FONT><FONT color=3D#000000 size=3D2>IOW... is there anyone who's able = to do that=20 kind of graphics engine that I asked before?</FONT></DIV> <DIV> </DIV> <DIV><FONT color=3D#000000 size=3D2>BTW, I use Mike's Editor (Thanks, = it's really=20 great :) under Win98 (Microsoft, it really sucks :(</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Here's my way to test time in main = loop.<BR>It's=20 not hard to figure out, but maybe someone finds it helpful = ;)</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV> </DIV> <DIV><FONT color=3D#000000 size=3D2>--Main<BR>sequence = AllResults<BR>atom=20 Timer<BR>integer AbortPrgm, Key</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000=20 </FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>while AbortPrgm do<BR> --Here = comes program=20 happenings/jumps to procedures</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 = size=3D2> Timer=3Dtime()-Timer<BR> if Timer>-1=20 then WhatTook=3DWhatTook & Timer end=20 if<BR> Key=3Dwait_key()<BR> = Timer=3Dtime()</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2> --Here comes responding to=20 keystrokes<BR> --Make f.ex. <Esc> to set AbortPrgm to = 0<BR>end=20 while</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>--let's display everything we have=20 learned:<BR>--Timer is working as a 'helper' var</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>if graphics_mode(-1) then end=20 if<BR>Timer=3D0<BR>for a=3D1 to length(WhatTook)=20 do<BR> Timer+=3DWhatTook[a]<BR>end=20 for<BR>Timer=3DTimer/length(WhatTook)<BR>printf(1, "Avarage=20 time:%2.4f\n", Timer)<BR>Timer=3D0<BR>for a=3D1 to length(WhatTook) = do<BR> if WhatTook[a]>Timer then Timer=3DWhatTook[a] end = if<BR>end=20 for<BR>printf(1, "Largest time:%2.4f\n", = Timer)<BR>Timer=3D100<BR>for=20 a=3D1 to length(WhatTook) do<BR> if WhatTook[a]<Timer then=20 Timer=3DWhatTook[a] end if<BR>end for<BR>printf(1, "Smallest=20 time:%2.4f\n", Timer)<BR>Timer=3Dlength(WhatTook) <BR>printf(1,=20 "Sampless token:%1f\n", Timer)<BR>puts(1,"Method to test = speed:=20 first press once <down-arrow>, then <enter> several times, = then=20 ------=_NextPart_000_005E_01BE8C4A.96386760--