The 2006 2D Sprite Render Test

Discussion in 'Game Development (Technical)' started by dxgame, Jun 23, 2006.

  1. dxgame

    Original Member

    Joined:
    Mar 11, 2005
    Messages:
    267
    Likes Received:
    1
    "I think step 2 now is...."

    We STILL need TGB, PTK, demos here first before moving on. :)

    Cas - your web app fails on my machine. :( But your games run fine on this box.

    "I thought the point was comparing higher-level engines? I really don't want to be forced to worrying about things like this... that's why I'm using PTK (or BlitzMax, PopCap) to begin with!"

    Agreed, any TGB, PopCap, PTK coders here??????
     
  2. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    PTK coders are busy finishing their 10th released game... :D
     
  3. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Any stacktraces to hand? (Java Preferences, Advanced, Show Console etc.) Works fine on 2 different Macs and a PC here... assuming the PC has OpenGL drivers, right?

    Cas :)
     
  4. Indiepath

    Indiepath New Member

    Joined:
    Aug 22, 2004
    Messages:
    999
    Likes Received:
    0
  5. Mike Wiering

    Original Member

    Joined:
    Jul 28, 2004
    Messages:
    246
    Likes Received:
    0
    Unfortunately, I can't read the frame rate in windowed mode...
     

    Attached Files:

  6. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    Broken driver. Recreating the context and reloading the textures would workaround it tho.
     
  7. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    I'm far too lazy to workaround driver bugs :D Besides, my sprite engine's being blown into the weeds by BlitzMax. Not that BlitzMax does half the nifty things mine does ;)

    Cas :)
     
  8. Emmanuel

    Moderator Original Member

    Joined:
    Nov 23, 2004
    Messages:
    859
    Likes Received:
    0
    Okay, it's sunday morning, I'm in a hotel and I wasn't awake enough to work on our new title before I go out for lunch, so, here's a ptk version:

    SpriteTestPTK

    Open up options.ini to switch from D3D (default) to OpenGL and from windowed (default) to fullscreen.

    I'll let you measure and update the charts, as measurements on my own machine are meaningless to you. The app starts at 2000 sprites but you can go up to 50,000.

    It'd be nice to add some useful metrics to the chart:

    Development time -- 35 minutes.
    Portable to mac -- yes.
    Field tested -- yes.
    Total cost of tools -- $215.

    OpenGL is nice but D3D is a lot more compatible if you're serious about releasing actual games on Windows.

    Best regards,
    Emmanuel
     
  9. Mike Wiering

    Original Member

    Joined:
    Jul 28, 2004
    Messages:
    246
    Likes Received:
    0
    Here are my updated test results. I've also made a version for DelphiX (new version with hardware accelleration by Jaro Benes), which you can find here: DelphiXTest.exe.

    Computer: P4, 2.0 GHz
    Video card: NVIDIA GeForce4 MX 460
    OS: WinXP

    Code:
                              100     500    1000    2000    4000
    -------------------------------------------------------------
    VB          DX  window    460     226     140      80     n/a
    (dxgame)         full     428     216     138      80     n/a
    -------------------------------------------------------------
    C++/DirectX     window    512     250     155      86      46
    (undersan)       full     808     312     173      94      50
    -------------------------------------------------------------
    BlitzMax    DX  window    636     342     216     126      68
                     full    1150     462     266     144      76
                GL  window    596     292     180     102      54
    (indiepath)      full     676     380     214     116      60
    -------------------------------------------------------------
    OpenGL      GL  window    912     408     240     133      70
    (wiering)        full     950     425     252     139      73
    -------------------------------------------------------------
    Java (princec)   full     760     280     158      85      45
    -------------------------------------------------------------
    PTK         DX  window    256     252     202     115      61
                     full      85      85      85      85      63
                GL  window     85      85      85      83      42
    (Emmanuel)       full      75      75      75      75      74
    -------------------------------------------------------------
    DelphiX     DX  window    544     235     137      75      39
    (wiering)        full     578     248     145      79      40
    -------------------------------------------------------------
    NC (Phil    -   window     63      32      20      11       6
    Steinmeyer)      full      63      33      20      11       5
    -------------------------------------------------------------
    Blitz3D         window    253     210     160      95     n/a
    (electronicStar)
    -------------------------------------------------------------
    Asphyre         window    650     366     237     139      76
    (DraculaLin)     full    1712     684     395     214     111
    -------------------------------------------------------------
    
    * 128/512/1024/4096 instead of 100/500/1000/4000
    
     
    #49 Mike Wiering, Jun 25, 2006
    Last edited: Jun 27, 2006
  10. aaron

    Original Member

    Joined:
    Aug 19, 2004
    Messages:
    21
    Likes Received:
    0
    I had the same issue with it on my machine. I've got a geforce4 mx440 running the latest nvidia drivers (fresh XP install yesterday).

    Worked ok full screen but wouldn't work in windowed mode.
     
  11. Chozabu

    Original Member

    Joined:
    Nov 30, 2005
    Messages:
    30
    Likes Received:
    0
    Ok, D3D is nice(well, not imo tbh...), but OpenGL is alot more compatable if i want to try and run the games im developing!
    i guess if youre developing an app for linux, its not such a prob to use DirectX
    cross compile only, and run with wine (or link with winelib...)
    the installer/package can easily do a startup script that runs it through wine

    though, to be sure it makes sense to have dual rendering backends
     
  12. Phil Steinmeyer

    Original Member

    Joined:
    Mar 1, 2005
    Messages:
    757
    Likes Received:
    0
    OK, here's mine:

    http://www.newcrayon.com/files/NCSpriteTest.zip

    Mine's a custom (proprietary) engine, that's entirely SOFTWARE based (no use of HW Accel).

    On my machine (AMD 4600+, Radeon X300 SE vid card), with 2000 32 x 32 sprites, with alpha (on the sprite as a whole), I get 32 fps, in both full screen and windowed. For reference, the BlitzBasic example gets 58, though I think it's using HW accel

    (Oh - I used my own texture, but it's the same size as the others - feel free to save the other texture on top of mine, in \graphics\texture.jpg)

    Anybody else got a SOFTWARE engine to test?
     
    #52 Phil Steinmeyer, Jun 26, 2006
    Last edited: Jun 26, 2006
  13. Slayerizer

    Original Member

    Joined:
    Dec 13, 2004
    Messages:
    103
    Likes Received:
    0
    Intel 3.2ghz HT
    Nvidia 7800GS (agp)

    I did the test with 2000 sprites for each demo

    Code:
    -------------------------------------------------------------
    VB          DX  window    145
    (dxgame)         full     145
    -------------------------------------------------------------
    C++/DirectX     window   473
    (undersan)       full     480
    -------------------------------------------------------------
    BlitzMax    DX  window    520
                DX  full    530
                GL  window    892
                GL  full    1020
    -------------------------------------------------------------
    OpenGL      GL  window    894+
    (wiering)        full     950+     
    -------------------------------------------------------------
    PTK         DX  window    253
                     full      253     
                GL  window     256
                     full      256
    -------------------------------------------------------------
    DelphiX     DX  window    820
    (wiering)        full     871
    -------------------------------------------------------------
    NC     soft  window    30
             soft  full    31
    
     
    #53 Slayerizer, Jun 26, 2006
    Last edited: Jun 26, 2006
  14. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,315
    Likes Received:
    0
    Code:
    PTK         DX  window    256     252     202     115      61
                             full      85      85      85      85      63
    
    
    Hmmmm... sure looks like you're vsync limited on the full screen runs.

    And is this app using your batching update, Emmanuel?
     
  15. Indiepath

    Indiepath New Member

    Joined:
    Aug 22, 2004
    Messages:
    999
    Likes Received:
    0
    Runs at 5FPS here where as the BMAX version was almost 200FPS. However there is one thing I forgot to mention, the BMAX (DirectX) version will fallback to software if it can't detect a 3DCard - it also sounds like the BMAX version maybe syncing to refresh on your machine for some odd reason.
     
  16. dxgame

    Original Member

    Joined:
    Mar 11, 2005
    Messages:
    267
    Likes Received:
    1
    Hi Phil,

    Very cool demo but I wonder if it's relevant to consider a software based render....in 2006/2007? On my main dev box which is a 2006 HP Pavillion, 2.93ghz Celeron with onboard Intel Extreme Graphics, your app runs at 13fps. What's the advantage of using a software based engine is it takes an AMD 4600+ to get a decent frame rate? I apologize if I'm a little thick here, but wouldn't targeting a 400mhz CPU, Geforce 1/2/3 give you better performance at nearly the same overall compatbility level?
     
  17. dxgame

    Original Member

    Joined:
    Mar 11, 2005
    Messages:
    267
    Likes Received:
    1
    I brought out one of my older test machines:

    Emachines ETower 400ix
    Windows XP
    400mhz celeron
    Geforce 2 MX/MX 4400

    2000 Sprites 32bit color Windowed Mode

    BlitzMax - 40 fps
    SpriteTest PTK - 30fps
    VB6 DXGame - 30fps
    SpriteMark - 26fps
    NC Sprite Test (software) 2fps
     
  18. Phil Steinmeyer

    Original Member

    Joined:
    Mar 1, 2005
    Messages:
    757
    Likes Received:
    0
    Well, I don't push 2000 alpha-blended sprites for my main game.

    Most casual games (including mine) use a number of sprites in the low 100s. IIRC, my previous game (Bonnie's Bookstore), ran at 30 fps on pretty much anything that was ~800 Mhz CPU or better, and I think my current game will be about the same (though I really haven't done much low end testing yet). For that matter, running at 15 fps on really low end stuff (i.e. your 400 Mhz Celeron) is acceptable with non-action titles such as my own.

    So it's fast enough, and by using software:

    1) Compatibility is essentially 100% - show me a hardware accel game without SOME compatibility issues (especially given that many of our users have old systems, with old drivers, etc.)
    2) Lower test times (see #1)
    3) Fast to develop for
    4) Easy to develop unusual pixel FX for. If I can think it up, I can implement it, and it works on all machines. So I can easily get some interesting looks that will hopefully be novel for the user.

    Will it ever hit 400 fps? No, but nobody really cares about that except fellow programmers. 100% compatibility, ease of dev. and testing, and flexibility are the key issues.
     
  19. Slayerizer

    Original Member

    Joined:
    Dec 13, 2004
    Messages:
    103
    Likes Received:
    0
    On a DELL laptop with a crappy intel adapter I got 30fps with Phil's software engine. I certainly dont think that someone need to draw 2000 alpha blitted sprites each frame. Without a doubt, a good software engine is a plus for me.

    I got really good scores when doing the hardware accelerated tests but doing games that rely on 3d accelerated engines do have additional problems.

    - you need to re-arrange your tiles to match specific texture size
    - watch out for old low memory video adapter
     
  20. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    If you wanted to write one of my sorts of game though you'd be a bit buggered by the abysmal fill rate though... and we still maintain 60fps is the minimum acceptable ;)

    Also quite probable a software renderer would be even slower on OSX due to the fact that the surfaces are effectively then fed back through OpenGL when you could be going direct.

    Cas :)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer