Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: TBitmap vs. CreateDIBsection

  1. #21

    Re: TBitmap vs. CreateDIBsection

    Quote Originally Posted by FusionWolf
    Quote Originally Posted by paul_nicholls

    The 54-55 FPS was with this file you gave us:

    http://www.saunalahti.fi/hag/share/MyGame.zip

    I have two graphics cards (as I have 3 monitors at work):
    NVidia GeForce 8400 GS
    NVidia GeForce FX 5200

    The rendering time seems to be between 0.0184 - 0.0186
    I hope this helps?

    cheers,
    Paul
    Yes, that's the lates file I shared.

    Maybe there's something to do with those multiple screens, I don't know... Perhaps. I have to do some test with multiple monitors on my working place.

    Can you give me your averge rendering time which you see at the top of the game window?

    Thank's for your very valuable reply.
    The rendering time seems to be between 0.0184 - 0.0186

    so I suppose the average rendering time would be 0.0185

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  2. #22

    Re: TBitmap vs. CreateDIBsection

    Paul, is the game play smooth (fluid motion) or is there somesort it twitching?

    edit: Hmmm... maybe the TimeGetDevCaps() returns so 'big' time resolution for some reason that no faster timing isn't possible.

    My second doubt is that compatible bitmap is not so comptible because of those two display adapters. So, GDI converts it's format on every blit and that's why the framerate drops.... perhaps.

    Very strange indeed...
    - In a world without the wall and fences, who will need the Gates and Windows.

  3. #23

    Re: TBitmap vs. CreateDIBsection

    Quote Originally Posted by FusionWolf
    Paul, is the game play smooth (fluid motion) or is there somesort it twitching?

    edit: Hmmm... maybe the TimeGetDevCaps() returns so 'big' time resolution for some reason that no faster timing isn't possible.

    My second doubt is that compatible bitmap is not so comptible because of those two display adapters. So, GDI converts it's format on every blit and that's why the framerate drops.... perhaps.

    Very strange indeed...
    The ship moves nice and smoothly so there is no problem with that part...

    Don't know why I'm getting only 54-55 FPS on my work machine.

    I just tried it on my home machine (single monitor setup):

    WinXP SP2
    AMD Athlon(tm) 64 Processor 3000+
    1.81 GHz
    1.00 GB RAM

    NVidia GeForce 6600 (256MB RAM)

    It runs around 1000FPS!
    it was a bit jerky though with regards to the updating of the ship...but I suspect that is because other programs have been running slower/jerkily on my home machine lately.

    I think I need to reboot, or even clean up windows with a re-install

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  4. #24

    Re: TBitmap vs. CreateDIBsection

    To add; the game was very smooth to play but it use 50% cpu power that is like full capacity of other core... well it divided like 15% and 85%, don't know why.

    Edit: Also Delphi 7 compiled and run the game from source without any issues

  5. #25

    Re: TBitmap vs. CreateDIBsection

    Quote Originally Posted by User137
    To add; the game was very smooth to play but it use 50% cpu power that is like full capacity of other core... well it divided like 15% and 85%, don't know why.

    Edit: Also Delphi 7 compiled and run the game from source without any issues
    Correct. The game uses all cpu time what it gets because there's is no anykind of idling at the game loop. If you look the sources there's a Sleep(1) routine defined at the very begining of the timer update method, but it's commented out. It can be uncommented and re-compiled when game will use much less cpu cycles.

    Also there's a SetThreadAffinityMask() routine at the begining of the application (in MyGame.dpr) which is commented out. It sets thread to use one cpu-core only. I used it earlier when game used QueryPerformanceCounter() for timing. But now, when only multimediatimer is used there's no worry about that timer will get incorrect values from cpu (if cores are not in sync). The system handles that how processor load is shared between the cores.

    Nice to hear that it compiled fine.

    Paul, I find out also a one computer where was a 1000fps, but the movement of the shuttle was littlebit jerky. It stopped animation for a blink of an eye and then catched up the time by speeding up the animation to way too fast and stopped again and speeded up again and so on and so on....

    I have no idea what causes that kind of behavior because most of the computers which I have been tested 'game' works all right.

    I still keep studying about the timers if I could make it even better. For the game loop itself I have couple ideas. It could be optimized by measuring the speed of the computer, core count and etc. and setting some variables based on that so, they can be used for setting the idling times and etc. Make some estimations if I would say.
    - In a world without the wall and fences, who will need the Gates and Windows.

  6. #26

    Re: TBitmap vs. CreateDIBsection

    I have been noticed lately while testing my timer object with lates 'test game application' that, if Windows performance monitor is open it may put the 'test application' to twitch and makes movement of objects look jerky.

    Especially on computers with a single cpu core. So, I recommend not to view Windows Performance monitor while playing.

    Here's the latest executable of "My Game". Sources are not available at the moment, but will be when it's done (soon I hope ).

    I would still appreciate any feedback how "game" works on which kind of computer - thanks!

    Here you Go -> http://www.saunalahti.fi/~hag/share/MyGame2.exe

    edit: Arrows moves and CTRL shoots.
    - In a world without the wall and fences, who will need the Gates and Windows.

  7. #27

    Re: TBitmap vs. CreateDIBsection

    Quote Originally Posted by FusionWolf
    I have been noticed lately while testing my timer object with lates 'test game application' that, if Windows performance monitor is open it may put the 'test application' to twitch and makes movement of objects look jerky.

    Especially on computers with a single cpu core. So, I recommend not to view Windows Performance monitor while playing.

    Here's the latest executable of "My Game". Sources are not available at the moment, but will be when it's done (soon I hope ).

    I would still appreciate any weedback how "game" work on which kind of computer - thanks!

    Here you Go -> http://www.saunalahti.fi/~hag/share/MyGame2.exe
    Same stats as before on my work machine - 54-55 FPS, and rock solid

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  8. #28

    Re: TBitmap vs. CreateDIBsection

    Quote Originally Posted by FusionWolf
    I would still appreciate any feedback how "game" works on which kind of computer - thanks!

    Here you Go -> http://www.saunalahti.fi/~hag/share/MyGame2.exe
    This is now little different... for starters, cpu stays in good 0% and gameplay is smooth. FPS is however behaving odd but not bad at all; it stays at either exactly 500 or 527 (nothing between, under or above) and when it stays there it does that for 15 sec or something random, i think when it stops to 527 it tends to stay there longer or persistently.

    ... and like this matters, it run not perfectly but a good 200+ fps while running world of warcraft in crowded city

  9. #29

    Re: TBitmap vs. CreateDIBsection

    Yes, that's how it is designed to work currently.

    I uncommented that Sleep(1) routine at the timer update method so it drops the maximum framerates around to 500 or so.

    Also I changed the way how frames per second is calculated and that's the reason for it's behavior. Calculation is done only once in a second so, in theory it could be change *dadaa* once in a second , but as you noticed it should not, and doesn't do that. That's why it keeps it in one reading and then may change it to another after a while.

    I'm still wondering those Pauls 55 or so frame rate, because I get near 400 even with old 1,6GHz Duron and 9600 Radeon, but if it runs smoothly that doesn't really matter.

    But I will explore more about timing and I will develop more sophisticated version after the 'game' is up and running. Until then let's keep this one.

    edit: Ouh, forgot to mention... thank's guys (I assume you are guys ) for your very valuable feedback.
    - In a world without the wall and fences, who will need the Gates and Windows.

  10. #30

    Re: TBitmap vs. CreateDIBsection

    - In a world without the wall and fences, who will need the Gates and Windows.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •