Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Really low frame rates

Author
Message
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 03:20
Some opinions please. At home I have a 2.1 GHz processor and at work a dual core 3.2 GHz. Running the same game I get a max of 60 FPS on my work machine. At home it maxes out at 30 FPS.

Is it possible that my video card is constrained to this low rate? I've set dbSync (0) and both machines stick at these figures.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 03:25
That is a huge difference, depending on the type of dual-core. Video specs for each?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 03:45
home = RADEON 9200 SE AGP (0x5964), 128 Meg RAM

work = ???
The work PC says the name is Radeon X300 but the device type is not available. It does say the description is ATI. No memory size is available either. I do have dual monitors at the office but they're identical.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 04:02
Got it. The X300 supports DirectX 9.0 fully. The 9200SE supports up to DirectX 8.1. So, lack of full support for 9.0 features would make the difference. Also, what type of dual-core?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 04:19
x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3192 Mhz

According to System Information

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 04:24
Hmmm... Not honestly sure which that is. I can't find it on Wikipedia or Google either. Well, it should be the lack of 9.0 support on the 9200. But, there might be a sticker on the front of the computer at your work. The processor might have a major role. Most likely, it does.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 04:26
I should also mention that this is a pretty simple 2D game, images and sprites.

The question I have is, if I set the sync rate to 0, why does it settle around 30 and 60?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 04:29
Not sure. I would recommend dbSync ( 60 ) for 2D games, though. It helps with many different animation techniques. ( I think, at least. )

Since the GDK is built on 9.0, the lack of full support for it might mean no hardware acceleration whatsoever. If so, then the P4 2.1 Ghz might be the bottleneck. ( It is a P4, right? )
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 04:32
Found it. Your work processor is a Celeron D. Not a great processor, but might beat a P4 2.1 Ghz.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 24th Jun 2008 06:21
your frame rates should be much higher than that. even with GDK's rate capped at the v-sync. The dual core should be faster, hmm is your refresh at 60 on that machine.

Your pc machine at home should be much higher than 30 fps for sure. considering the load your describing.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 24th Jun 2008 07:04
Here is a very good test of your systems

http://forum.thegamecreators.com/?m=forum_view&t=101716&b=5

The good thing is you can see how you compare against other systems in a very real world trial

Hope you find it informative

Codger

p.s. It sunds like yur home system maybe using an on board graphics system with shared memory rather than a seperate graphics board with its own memory

System
MacBook Pro
Windows XP Home on Boot Camp
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 09:19
That program should be re-made in the GDK for performance.

I'm not the most knowledgeable person on the topic of DirectX, but I really think the lack of DX 9.0 support combined with an outdated P4 and possibly bad drivers could do it.

Also, benchmark score:

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 24th Jun 2008 11:19
It is known that frames stick (solid) to monitor refresh rate when windowed, try full screen exclusive mode to see numbers above that...
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 17:03
Quote: "It sounds like your home system maybe using an on board graphics system with shared memory rather than a separate graphics board with its own memory"


No, it's a separate card. The system was purchased with a separate case, motherboard and video. Ironically, it was purchased for me by my roommate for the primary purpose being able to play games that required more oomph than my previous system.

Mind you, my concern is more about being able to make assumptions about other machines that might end up playing my game. Sixty FPS is fine if I can assume that its the lowest frame rate that I'd find on other systems. But at the same time it distresses me that my machine isn't capable of even 60 FPS for simple 2D graphics. I'm not writing the next WoW. It's mostly fairly retro stuff but with some contemporary sensibilities added.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 17:20
Quote: "It is known that frames stick (solid) to monitor refresh rate when windowed, try full screen exclusive mode to see numbers above that..."


Tried full screen on my work PC with 0 sync rate and still got 60 FPS. Not sure if, by "exclusive", you mean there's a further setting beyond full screen.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 17:28
Quote: "Here is a very good test of your systems"


Okay, I tried the accurate test in mode 24 (1280 X 1024 X 16) on my work machine and got

100 objects @ 60fps
219 objects @ 30fps
554 objects @ 15fps

The test started out at 113fps, so I know it's capable of better than 60fps for simple 2D graphics. That's also a higher resolution than the one you tested yours at, albeit your processor was half the speed of mine.

It might be significant that my work PC has 2Gig of RAM while at home I only have 512 Meg.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 18:25
The RAM difference can matter.

Did you try the test on your home computer?
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 18:25
Also, I wouldn't try the test in 16-bit color.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 18:29
Quote: "Did you try the test on your home computer?"


Not yet. I didn't get caught up on the forum until I got into work this morning.

The work computer still raises the question as to why I can get 113fps on a 3D application but nothing more than 60 on the same machine for a 2D application with two moving objects.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 18:30
Wait, I thought the work computer got a minimum of 60 FPS always?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 18:42
Nope!! If I enter dbSync (0) for my game it still tops out at 60.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 18:43
Hm. Are you worried that it should be higher than 60? Anything higher than 60 isn't noticeable.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 18:51
I'm concerned that even a competent machine, such as the one at home, might not sync as high as 60 for purposes of distributing the game. IMO, my home machine should do well over 60 for a 2D application and thus setting the sync at 60 means I don't have to deal with extra mathematics to control movement speed. But is the slowness in the machine, the code or the API? Did I miss something somewhere?

If it weren't for the time involved I'd try to implement in SDL and see if it made a difference.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 18:52
I don't know. How much code is it? Meaning, could you post it for us to look over and see if there might be something?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 19:03
It's really kind of massive and depends on a set of class wrappers I've designed. I might be able to post the relevant loop but it wouldn't give much of an inkling of how the update process for each object works.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 19:03
Let me ask this: is it definitely processor intensive?
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 19:03
Or, how about this: send me a copy.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 20:24
Okay, let's try these parts.

Initializing the screen



And the loop I'm running



I'm sizing at 800 x 600. The left (Layout) 600 x 600 is a sprite place holding an image on which I've drawn a grid (for design purposes right now.) The right-most (sprPanel) 200 x 600 is another sprite/image to color the remaining background. However, at the moment it also has 78 sprites above it from which I'll click and drag to the layout in the design phase.

sprCapsule and sprCapsule2 are a couple of sprites I put in place to test the change phase of the capsules which I test with clicks on buttons 2 & 3. If they're in shrink mode, which they're generally not, they update each cycle. Otherwise they just return from the call to Update().

All that's left is the sprPaddle, which is based on a class derived from my Sprite class. Once set up it updates each cycle by tracking the X position of the mouse. sprBall is the ball, which also updates its position using floats.

And finally, though I don't know why I put this after the dbSync(), I check for collision. The actual workings take place in the CollideWith() function but the condition is left there for when I have to add sound to the process.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 20:32
Well, it does look like a lot. Try sending me a release build.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 20:36
Do you have an address I can send to? Bear in mind I'll need to send some media with this. I don't think it's too much though.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 20:36 Edited at: 24th Jun 2008 20:37
Can you not upload it zipped? If not, mmahoney62292@gmail.com
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 20:58
Sorry, but when someone says "send," as opposed to "upload" my mind goes into email mode. Mostly because I'm an email admin.

AAR, it's attached. The .exe is set to dbSync(0). Right now all you can do is chase the ball with the paddle, and even then it will still bounce off the bottom until I get some other development done. You can also press buttons 2 & 3 to get some results with the two sprites in the upper left. The one "capsule" with the see-thru background is my having copied an image with transparency over a section of the background image.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Attachments

Login to view attachments
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 21:02
Was the "60" in the grid the FPS? ( Nice sprites, by the way )
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 24th Jun 2008 21:18
Yes. I just stuck it randomly and it happened to appear in the middle of the one grid space.

As for the sprites, it's not due to my artistic talent as much as it is my mathematical talents, such as they are. I use a really nice ray tracing program called POV-Ray (Persistence of Vision) that can be found at

http://www.povray.org . It can produce some nice photo-realistic pictures if you know what you're doing. Since I don't know what I'm doing I get sprites instead. Quick example, the code for one of the sprites (the one with the red external piping) looks like this.




The color variations are usually a matter of some quick text changes and file name changing. I had lots of shapes and add-ons and wrote a C# program to provide me with all combinations of colors and shapes only to end up with over 2,000 images and no time to pick and choose.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 21:19
That's a lot to take in, but I think it's just a matter of the framerate being limited. Very nice code, though.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 25th Jun 2008 04:17
Quote: "Okay, I tried the accurate test in mode 24 (1280 X 1024 X 16) on my work machine and got

100 objects @ 60fps
219 objects @ 30fps
554 objects @ 15fps

The test started out at 113fps, so I know it's capable of better than 60fps for simple 2D graphics. That's also a higher resolution than the one you tested yours at, albeit your processor was half the speed of mine.

It might be significant that my work PC has 2Gig of RAM while at home I only have 512 Meg."


The reason the program was able to start out at a higher FPS was that it was written in DBPro. Althogh it sounds great to run at high frame rates they are false if you monitor can only refresh 60 times per second how does your game run at 115 FPS. It simply skips frames and couts how many times the program cycles.

The work machine is a nice mid range machine it should be fine for all but the latest CPU sucking games.

You really should consider increasing the memory on your machine to 2gig it is now one of the cheapest and most effective upgrades. You will gain a far more "bang for the buck" with memory. You could double the CPU speed and see very little improvement. And whatever you do do not downgrade to Vista it will eat your machine alive

All the best

Codger

p.s. resolution is irrelavent to a modern GPU I tried the test at the highest and lowest resolution no change in the size of my army ( over 1100 at 15 fps)

System
MacBook Pro
Windows XP Home on Boot Camp
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 25th Jun 2008 04:33
Vista is great, but only if you meet the specs. I have Home Premium with Aero enabled on 1 GB RAM, and its performance is superb.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 25th Jun 2008 07:55
Quote: "You really should consider increasing the memory on your machine to 2gig it is now one of the cheapest and most effective upgrades."


We actually boosted the memory several months only to have the PC go south in some fashion, the nature of which I've forgotten. It was necessary to pull it out. My roommate did some investigating and found that my motherboard seemed to have some incompatibility with this particular brand of memory. We're going to have to be careful what goes into it now.

And not only isn't Vista on my radar, it isn't even on my sonar.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 25th Jun 2008 08:00 Edited at: 25th Jun 2008 08:01
I know it isn't. I just hate that everyone thinks that Vista kills every system's performance. v.v
waka324
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 25th Jun 2008 11:36
I read that the refresh rate in GDK is limited to the monitor's refresh rate. Is the monitor a CRT by chance? That would explain a 60hz cap.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 25th Jun 2008 12:24
My thoughts...

1. GDK is limited to using VSYNC, and I agree with Codger. In fact, VSYNC has no noticeable jitter at all, since it works within the constraints of the monitor, and during the vertical retrace when the guns are off. 1000fps is an illusion. What you want is a loop that can execute in excess of the final sync, which is limited by the monitor in the first place. You can set the refresh rate using the standard methods. I right click on the desktop, select Properties/settings/Advanced/Monitor. Alot of people don't install their monitor, and fewer make the effort to set the refresh rate properly. A quick investigation of this is likely to reveal that your monitor refresh rate is indeed 60Hz. And there are very few monitors (CRTs) still working that cannot do at least 75Hz. Even my ancient one does 85Hz with a rock-solid display.

You can ensure that your program is on the correct page by using dbSetDisplayMode with the optional VSYNC flag set to 1. Then...never mention dbSync, or dbSyncRate again. (Since they don't really do anything when VSYNC is active anyway.)

2. The memory upgrade probably involved using RAM that was too big. Many non-Intel CPUs (My Athlon included) are on MBs that can't handle RAM over 256MB. In my case, that limits my system to 768MB, which should be more than enough. You are referring to 2D anyway, so the point about memory (system and GPU) is moot. Text is far more problematic to 2D, and mixing 2D and 3D (Even in seemingly benign or unobtrusive ways) causes a large drop in fps immediately. The 3D is handled entirely by the Render function internally in GDK/DX. The 2D is an afterthought, more or less.

3. Very impressive that you knew that the (passive) SONAR picks up threats from over the horizon, and through the Earth, too. I went to some schools in Dallas when I worked in passive sonar. You have Whitehall and also Electrospace nearby. I've been to both. (I also went to the Million Dollar Saloon and watched Dennis Miller almost get lynched....good times.)

btw, capsules runs at ~18fps on my system:
WinXP Pro SP 2
798Mhz Athlon 384MB SDRAM
NVidia GEForce 6200 A-LE 256MB RAMDAC
1024x768 @ 85Hz
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 25th Jun 2008 15:13
Flat screen LED>

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 25th Jun 2008 16:36
Then, what is the refresh rate set at now? (Get it from the OS, like I mentioned above.) GDK is said to be "limited to the monitor's refresh rate", but it sure sounds like either most people leave that at 60Hz, or GDK is limited to 60fps, not by the refresh rate of the monitor. Mine is at 85 because that is my CRT's max...LEDs are usually far faster than that.

If its 60Hz, it is really doing your display a disservice. I'd bump it to the limit for the monitor...it looks much more steady to my aging eyes that way.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 25th Jun 2008 17:13
Hi Lilith,

In your video card control panel there will be a setting that will turn on/off a setting called "Wait for vertical sync" or some similar name.

This setting is normally set to on and as such the video card can only be updated in the screen retrace time.
As your sync rate is set to 60Hz for your display, that is the fastest that the game can feed information to the card.

If you turn that setting off then it is open slather and the game will refresh the video information as fast as it can.
It will cause some tearing of the image where the image gets refreshed part way through a screen display, but it will show you how much leaway your program has.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 25th Jun 2008 18:15
Actually, LCD's are 60Hz. CRT should be 75Hz. It is much better for your eyes and less annoying. Try it out.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 25th Jun 2008 19:02
Thank you.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 25th Jun 2008 19:03
Anyone using a CRT should make their refresh rate 75Hz.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 26th Jun 2008 08:12
Lilith
Nice graphics capsules run at a full 60 fps on my system, very smooth. Do you intend to take the game further?

My laptop has sync max of 60hz but it is rock solid at 60hz no flicker at all so no need for additional fps

System
MacBook Pro
Windows XP Home on Boot Camp
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 26th Jun 2008 19:36
Quote: "Nice graphics capsules run at a full 60 fps on my system, very smooth. Do you intend to take the game further? "


I hope to go further with it. Mostly what you see is my level development section. The ball and paddle were things I wanted to test while thinking how I'm going to work out the rest of the level creation. I've removed a few of the capsule colors on the right and have a click and drag worked out but now need to figure how I'm going to work placing the capsule in a cell on the left. I also put the paddle and ball in cruise mode so there's some movement going on while I'm configuring. During game play the grid will be replaced by varying backgrounds and the panel on the right will be the score and status area. Then I'll add some power-ups and such. There are some other ideas I have that will probably go into it but... first things first.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 26th Jun 2008 19:39
I guess I'm not sure what you're asking at this point.

Login to post a reply

Server time is: 2024-11-20 15:14:13
Your offset time is: 2024-11-20 15:14:13