1. Graphics & game speed testing
- Posted by Talvitie <smtoa at SAUNALAHTI.FI> Apr 21, 1999
- 478 views
- Last edited Apr 22, 1999
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--
2. Re: Graphics & game speed testing
- Posted by Noah Smith <nhs6080 at UNIX.TAMU.EDU> Apr 21, 1999
- 455 views
------=_NextPart_000_00D3_01BE8C16.FDF343E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm not sure if you mean 3d graphics in general, or Eu in specific, but = i find it hard to beleive you have mathematics which provide a 10x = increase in performance based solely on mathematics, or even hardware = support. It would require some pretty gross logic errors on the part of = professionals in general, or the Eu community in specific to create a = deficit such as that...more than that, your benchmarks far from indicate = such a performance coup. snortboy ------=_NextPart_000_00D3_01BE8C16.FDF343E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>I'm not sure if you mean 3d graphics in general, or = Eu in=20 specific, but i find it hard to beleive you have mathematics which = provide a 10x=20 increase in performance based solely on mathematics, or even hardware=20 support.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>It would require some pretty gross logic errors on = the part of=20 professionals in general, or the Eu community in specific to create a = deficit=20 such as that...more than that, your benchmarks far from indicate such a=20 performance coup.</FONT></DIV> <DIV> </DIV> ------=_NextPart_000_00D3_01BE8C16.FDF343E0--
3. Re: Graphics & game speed testing
- Posted by Talvitie <smtoa at SAUNALAHTI.FI> Apr 22, 1999
- 466 views
Noah wrote: >I'm not sure if you mean 3d graphics in general, or Eu in specific, but = i find it hard to beleive you have >mathematics which provide a 10x = increase in performance based solely on mathematics, or even hardware = >support. I wrote: >... which uses maybe (and just maybe) a ten times faster 3D mathematics = than others=20 So, what I ment was that the mathematics that are used to "do the 3D" in = my engine are totally different than the ones usually used in games(this = is what I've heard, not necessary the truth in newest games). I didn't = mean that this engine o' mine would be faster than the ones done with = other languages... only the one part of my engine uses tecniques that = seems to be better than the tecniques used in most or every other = engines.=20 IOW: If some game 3D engine would be transferred to Euphoria and we = would test the "do the 3D" section of it and then do the same thing with = my engine, I propably would win. Noah said: >It would require some pretty gross logic errors on the part of = professionals in general, or the Eu community in >specific to create a = deficit such as that...more than that, your benchmarks far from indicate = such a >performance coup. Well, as I mentioned... >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) Now the time in mode 19 is without displaying .0648 seconds to = display one screen. With a very little work I believe I can optimize it, = let's say, to .030 seconds(if displaying is handled by hardware).=20 Now the .04 seconds is the critical one, if game tooks more than that = the screen gets "sticky" and that really isn't fun :( =20 If you go under .04s, the game gets smoother. .04 seconds provides = 25fps, but .0385s is fast enough for 26fps :) Does anybody have a clue where hardware I/O stuff could be found? Does = any manufacturer release information 'bout using their/general (f.ex. = graphics) cards?=20 Does binding/shrouding make program any faster?
4. Re: Graphics & game speed testing
- Posted by Molasses <molasses at ALPHALINK.COM.AU> Apr 23, 1999
- 455 views
>Does anybody have a clue where hardware I/O stuff could be found? Does any manufacturer release information 'bout using >their/general (f.ex. graphics) cards? Are you familiar with 3dfx's Glide API? Unlike Direct 3D and OpenGL, it is not a 3D engine, rather it is a small set of functions to directly access any 3dfx card. You still need to write your own 3d engine (as you've said, you've done that), and you use Glide for texture mapping, z buffering, alpha blending, fog, etc (the things that are slowest in software). As I mentioned not so long ago, I've been writing a wrapper for Glide 3x. Well, the wrapper part is complete, the documentation and demos are not. If you believe your 3d rendering method is as fast as you say it is please email it to me or i could send you my Glide wrapper if you want (it's very easy to use). Don't worry, I would not steal any of your code, take any credit for your work, etc. We have the mailing list as witness to your claims, so it would be obvious if I stole anything. Curious but sceptical, -molasses
5. Re: Graphics & game speed testing
- Posted by Talvitie <smtoa at SAUNALAHTI.FI> Apr 23, 1999
- 491 views
Molasses wrote: >>Does anybody have a clue where hardware I/O stuff could be found? Does = any >manufacturer release information 'bout using >their/general (f.ex. = graphics) >cards? > >Are you familiar with 3dfx's Glide API? >Unlike Direct 3D and OpenGL, it is not a 3D engine, rather it is a = small set >of functions to directly access any 3dfx card. >You still need to write your own 3d engine (as you've said, you've done >that), and you use Glide for texture mapping, z buffering, alpha = blending, >fog, etc (the things that are slowest in software). > >As I mentioned not so long ago, I've been writing a wrapper for Glide = 3x. >Well, the wrapper part is complete, the documentation and demos are = not. If >you believe your 3d rendering method is as fast as you say it is please >email it to me or i could send you my Glide wrapper if you want (it's = very >easy to use). Don't worry, I would not steal any of your code, take any >credit for your work, etc. We have the mailing list as witness to your >claims, so it would be obvious if I stole anything. > >Curious but sceptical, > >-molasses Well, I have made my own improved ZBuffer. ofcourse it would be great, = if this could be done by hardware. My question is what pharemetres does = it need? My Horizline takes these:=20 -- procedure HorizLine(atom x1, atom x2, atom y, atom z1, atom z2, = integer col) where x1, x2 and y are the visual place(!) on screen, z1 and z2 are = distance to camera(that's the data sended to ZBuf) and col is ofcourse = color. The procedure draws a horizontal line to screen. This may be the slowest = process in 3D engine, alltought I have and will optimize it a lot more.=20 I finished half a year ago my 3D engine project with QB. It had a lack = of speed, shading and texture mapping, and it had several bugs. The work = I've been doing with Euphoria is rewriting the previous source, fix the = bugs and then add the shading and texture mapping. I know how to do this = all, but it takes some time. I've created my own methods how to handle = things like objects, etc. alltought I quess other engines use pretty = much samekinds of. I haven't done any optimation yet. Why's that? I = don't want the source to be messy cause there just might be some bug(s) = in this point. Now I'm testing flat faces(face with one solid color), = and it's almost done. I'm really interested to use your wrapper. It could save enough time to = make games even for p133 with 3Dfx card(or duke nukem 3D type games for = slower ones). I might send the source to you, when my engine is = finished/ready for 1st demo release, but this time it's not much use. = Please, send the wrapper to me(hope it has some documentation :) , so = that I could modify my engine to work with it. If and when I deside to = use it, I'm still going to do my own Z/BSP-Buffering, etc., so that the = engine would work with machines without 3D card. BTW, all you 3D programmers. Wanna know where to get documentation 'bout = making 3D engines? Ica (from Finland also :) has made a pretty good = text. He's also included a lot of examples (VESA required) with it . The = only minus is that the documentation and the examples are for C, but so = what? I think it's better to think everything by yourself, rather than = copy it without even bothering to look the source, and the documentation = itself don't need almost any knowledge bout C. So go to the site and = download: http://www.hut.fi/~ipelkone I haven't read the english version, but the finnish ( version is a = pretty humoristic. I had made my own QB 3D engines rendering before I hadn't read any 3D = documentation, so I render different way than others (but with more = speed :) , but the Ica's text helped me a lot with Z, S and BSP-tree = buffering, Mip Mapping, texture mapping, shading, etc. etc. go to the = site! Highly recommented! And finally I'd like you all see what Hawke claims bout his TrueColor = library: >naturally, drawing to screen pixel by pixel is slow... >read the docs and discover how to improve speeds with >pixel plotting (ie:plot several pixels in each pixel() call >instead of one by one) >also, use virtual screens and page flip them... >it really is faster if you use appropriate techniques... >stay away from 'images' of sequences and use >full blown virtual screens... >its very easy to get 20-30 fps at 640x480x16.7M >on a p133 (i've done it many times) >and got 18-20 fps at 800x600x16.7M on the >same p133... >i can usually sustain 25fps or more on a p200mmx... > >technically, in some ways, Neil is faster, if your >card is fully vesa2.0 compliant (or UNIVBE can >make it 2.0 compliant) but, it is a lot harder to use... If this is true(haven't tested yet), as I quess it is (no doupts :), = he's TrueColor lib could be fast enoug for me(you have to remember that = the game itself tooks some time too). I'm still lack of those good 8- = and 16-bit colors... -- Tapani Molasses, mail me to smtoa at saunalahti.fi