PDA

View Full Version : System Info


deekpyro
2002.05.11, 12:44 PM
I need to figure out how to get the system info of a persons computer (Processor speed + type, and system Bus). Is their a good place I can learn how to do this in Cocoa?

OneSadCookie
2002.05.11, 05:27 PM
Some of this information may be available from the Mach kernel. Number of processors certainly is... Look at the documentation either on Apple's site or for the HURD operating system. Don't try and read the headers, it's hopeless ;)

Some of it may be available from Gestalt. It's a Carbon function (but that's no problem). I'm pretty sure you can at least get the CPU type this way.

But now you've made me curious... why would a game need to know all this?

deekpyro
2002.05.11, 08:29 PM
To check and make sure their system meets the system requirements. (and display them on a page comparing what they need and what they have)

OneSadCookie
2002.05.11, 11:43 PM
Just make sure that you let people play the game regardless of whether they meet your "minimum requirements" or not -- often people are more than happy to play a game that way!

Personally, I wouldn't bother -- I'd just list them on the box or in the readme, and let people discover for themselves whether their configuration is good enough.

It strikes me that once you're getting down to the level of bus speed and CPU model you're probably getting to the point where you can't sensibly correlate the variables -- for example, the 800MHz iMac with GeForce2 may actually be worse for 2D performance than a single 500MHz tower with Rage128, simply because the tower has a 133MHz bus... can you really be sure to test on sufficient configurations to make sure you're giving the right answers?

ibullard
2002.05.15, 02:09 AM
It's common on Windoze systems to get all this info and give a list of what the game expects and what you have to give the user an idea of possible problems. It's necessary because of the seemingly infinite combinations of hardware. You need to be able to scale to hardware and tell the user if their machine is too old.

I've noticed on the Mac that it's much more laid back. "G3 with Rage 128 or better" (or something similar) is all I'll see listed for most games and they don't seem to check at all. I think this is because, correct me if I'm wrong, there are so few different types of machines that you can say something like "Firewire G3 or better" and most people know right off the bat if their machine can handle it.

Just a thought.

OneSadCookie
2002.05.15, 06:59 AM
Well, I don't know about Windows users, but most Mac users don't even know they have a bus, and would probably start looking for public transport if you told them to upgrade.

I think most hardcore gamers could manage their processor speed, graphics card model and amount of physical memory, but even that might be pushing it for some.

And who are you to say your game can't run? If it's a technical limitation (such as an OpenGL extension not available on a Rage128), fair enough -- but just because their CPU / physical RAM / whatever doesn't match your expectations doesn't mean that your game won't perform acceptably in the user's opinion.

I've been playing Return to Castle Wolfenstein very happily on my iMac 600 / Rage 128, which is well below the minimum specs for the game. Sure, I get 2FPS from time to time, but it hasn't stopped me yet. I'd have been seriously annoyed if it had told me to sod off until I bought a new Mac just for the GeForce2MX!

If they have your game, the user will very quickly discover whether their hardware is sufficient for their needs. They don't need some bossy program telling them. As for the box, that's the appropriate place for that information. People can read it and make their own decision as to whether they're willing to risk poor performance.

Why deliberately exclude (potential) customers?

CMagicPoker
2002.05.15, 03:40 PM
What would be cool is a program that configure the game based on the system to make the game run fast as expected by the developer (60fps, etc).
Like UT does.

ibullard
2002.05.15, 07:54 PM
It isn't excluding customers, it's warning them that their HW isn't at the minimum spec for the game. "Player Beware" sort of thing so when the game does run at 2fps it isn't the developer's fault.

CYA.

Josh
2002.05.15, 09:57 PM
Originally posted by ibullard
It isn't excluding customers, it's warning them that their HW isn't at the minimum spec for the game. "Player Beware" sort of thing so when the game does run at 2fps it isn't the developer's fault.Personally, I still don't see the point. Besides, in games that tell me that, I usually just blow them off. After all, what do programmers know? :p

OneSadCookie
2002.05.15, 10:14 PM
If the game does run at 2FPS the user is soon going to figure out that they need a newer computer.

I'm not advocating the lack of "minimum system specs", just saying that the place for those minimum specs is the readme, the manual or the box, not an intrusive dialog thrown up by an over-bossy game.

henryj
2002.05.16, 06:18 PM
<rant>
Don't listen to OneSadCookie

Any app should advise the user in plain english if there is a reason that the app can't run as expected. The user SHOULD NOT be expected to go hunting for a Readme or worse, the box to find this information. Note I said plain english. An example of this is OpenGL on OS9. If the user doesn't have openGL the finder will bring up a cryptic message about the dynamic linker not being able to find a symbol. This is BAD programming especially as it is so easy for the app to find this information and advise the user that "You need Open GL to use this application. Visit www.apple.com to download Open GL"

This is one problem with OSX. We are going to get Next and Unix developers who have no idea about the Human Interface or what makes the MAC user experience what it is. These guys think silently exiting is a good way of telling the user that the app can't run!

This extends beyond configuration information. There used to be a mythical document called the Human Interface Guidelines. It spelled out how your application should behave for it to provide the best experience for the user. Apparently Steve doesn't think we need it anymore. Take Project Builder. It has the worse interface since Microsoft Visual Studio. And just because your writing a game doesn't mean you can ignore this stuff.

</rant>

OneSadCookie
2002.05.16, 07:37 PM
If the program actually isn't going to work, sure, you should produce an informative error message. That's not what this discussion was about, though.

This discussion was about the program saying "I need at least 256MB of physical RAM, at least a 600MHz G3 or 500MHz G4 processor, at least a 133MHz system bus, at least an ATI Rage128 graphics card, and at least a 7200RPM hard disk to run so I'm going to quit now".

That's not plain English, nor is it user-friendly.

The reality is, with those requirements, there's no reason why it shouldn't attempt to run anyway, and the chances are that even on some "unsupported" configurations, the performance would be acceptable.

I have no problem with an application bringing up a dialog the first time it's run saying something like "I have noticed that your system does not meet the suggested minimum requirements for this game, you might like to consider upgrading to a machine with at least the following specs: (insert text from readme/box). I will attempt to run anyway, but performance may not be good enough".

If it refuses to run, though, or brings up the dialog every time it's run, that's not good HI.

Josh
2002.05.16, 10:42 PM
Originally posted by OneSadCookie
If it refuses to run, though, or brings up the dialog every time it's run, that's not good HI. I agree. Don't rub the fact that I have an old and slow computer in my face. DO tell me if it won't run at all, but if it will crawl, at least let me see for myself.

CMagicPoker
2002.05.17, 01:58 AM
I suppose the expectations of the system should be created upon the technical expectations of the game, not the artificial paradygm the programmer temp to establish.

If the game needs opengl, if it's "weak linked" it has to check if opengl is present. btw, or to 'weak link' a library?

The game should ask for a reasonably minimal amount of ram in which it can run without crashing, on classic mode. Or inform the user of the average ram it consume in OSX when running with low textures.

If the game uses Altivec and crashes on the G3 because of that, that shoulb be investigated too. IMHO, one's should make some efforts to make a game running on the computers of its audience, if he/she really want to see his/her game being played broadly, IMO.


If you feel that your game sucks below 60fps, fine. But some people would probably be delighted to play it, even at 20fps on mach64. Give a thought to that, please.
Im a Startrek fan, but can't play well the Elite force demo because my iMac, with a RagePro, doesn't like mipmapping, and Im too lazy to check the gl.h header, and to change the tag in the file :-(

Jeff Binder
2002.05.17, 10:06 AM
If you need a certain GL feature, or a certain amount of VRAM, it's OK to check. But for plain minimum specs, just let the user decide. Chances are there's someone who won't mind the performance on a system 50MHz below your minimum.

Originally posted by CMagicPoker
Im a Startrek fan, but can't play well the Elite force demo because my iMac, with a RagePro, doesn't like mipmapping, and Im too lazy to check the gl.h header, and to change the tag in the file :-(

Well, you'd need to recompile Elite Force for any changes in header files to take effect. Anyway, the flag for mipmapping in your gl.h should be set already, because it indicates what the implementation of GL supports, not what your hardware supports. Everyone with the same version of GL gets the same gl.h (if any, I don't think OS 9 includes the header files by default). Elite Force probably checks for mipmapping support with glGet(), and even if you could convince EF that you have mipmapping, it wouldn't work without it.

Yet another time when cracking isn't the solution to lack of funds ;) .

ibullard
2002.05.17, 12:00 PM
On most Windoze games, the check for hardware is part of the install or a one-time thing when you run the game. It isn't saying "Hey, look, you have a crappy computer," it's saying "We found this information about your computer and wanted to let you know that the game may not run as expected." If you tell it to go away, it does, never to bug you again.

I don't think this is a bad thing, especially if you want to attract Windoze gamers.

Ian

Deland
2002.05.17, 11:13 PM
I don't think this is a bad thing, especially if you want to attract Windoze gamers.
Seriously, do Windoze gamers really care? Most are my friends are PC gamers and they seriously don't care about what the installer tells them.

It's far form being their main interest when buying a game.
"Hey Marc! Look this new game warns you when you don't have the minimum specs! Let's buy it!" Duh.

Just a tought...

ibullard
2002.05.23, 06:12 PM
You're missing the point. The game can tell what hardware you have and check it against what is required to run the game so when something go horribly wrong (or it's just plain slow) the player knows what's wrong.

No one buys a game because it tells them they can't run it. Most able-bodied gamers know to check the box for minimum requirements (or they have such a powerful machine that they don't need to check). However, it's also a well-known fact that the average consumer reads absolutely 0% of the manual or any other text given to them.

So instead of just la-de-da'ing on and allowing the game to install and run without so much as a peep all the while saying to itself "yeah, I can tell your Rage Pro ain't going to cut it but I'm not going to tell you" and letting the user find out the hard way instead most commercial games say "we thought you'd like to know your Rage Pro may have issues but you can tell us to scram if you'd like."

In the case of do-or-die it's imperative that you tell the user what's wrong, there is no argument for that. In the case of do-or-suck, it's also imperative to tell the user what may be wrong. Otherwise the game sucks because it's too slow, not because they have 7 year old hardware.

Ian
(sorry if I seem abrasive, I've been trying read Apple's "documentation")

Chris Burkhardt
2002.05.25, 05:50 PM
I have to agree with Ian on this. It is kind of the game to let the user know that their system is not quite what the game expects, but that they can continue playing if they are having fun. There is nothing wrong with that. OneSadCookie is right that the game should not refuse to run just because the minimum requirements aren't met.... the game could still be fun to some people.

Deekpyro, are you writing your game in Carbon or Cocoa? In Carbon I think you can find out about much of the system through the Gestalt() call. In Cocoa you probably have to do some sort of kernal level checking... I'm not sure.