Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Getting the PCs performance and set game graphics accordingly  (Read 2454 times)
0 Members and 1 Guest are viewing this topic.
Offline Cero
« Posted 2012-08-06 17:57:02 »

So, in our big game we do a lot of optional graphics stuff and we would obviously like to set appropriate default settings when the game is started for the first time.

You can get the amount of cores with java and gpu-wise you can get a whole lot of infos with opengl, like opengl version and vendor and stuff.
We just would like to do a good job, otherwise a game may not be as pretty as could be or be < 60 fps.
Especially with lighting and its resolution and stuff...

If you guys have done that before, I would appreciate advice :)

Offline theagentd

« JGO Bitwise Duke »


Medals: 365
Projects: 2
Exp: 8 years



« Reply #1 - Posted 2012-08-06 18:44:35 »

In my opinion auto configuration never works as people want. Some people don't mind the game dipping to 40 FPS, some people (me) can't stand it. The preferences are so different that there is no "best" setting for everyone. Still, you want to have a good default configuration for the game, or it might lag a lot or look like crap for people who have good hardware and don't bother with the graphics. I think Dawn of War 2 got it right. They had a benchmark which was pretty much an ingame demo scene of a huge battle, and at the end it reported the average, min and max FPS of the 30 second run plus a recommendation if you should increase or decrease the quality. You could have an automatic benchmark that runs at the first run and picks the default options, but I would just throw everyone to the settings menu.

Also it's possible to query how much graphics memory the GPU has. You could approximate the performance of it from that.

Myomyomyo.
Offline Cero
« Reply #2 - Posted 2012-08-06 19:31:17 »

Also it's possible to query how much graphics memory the GPU has.
I thought it was really unreliable, sometimes not returning anything.

You could approximate the performance of it from that.
Well most cards are available with at least 2 different amounts of gpu RAM.
I think getting the CPU cores and the opengl version would be better to approximate...

Can you guys list opengl commands that would help ?
I know of these
1  
2  
3  
System.out.println("OPENGL Vendor: "+GL11.glGetString(GL11.GL_VENDOR));
System.out.println("OPENGL Version: "+GL11.glGetString(GL11.GL_VERSION));
System.out.println("OPENGL Max Texture Size: "+GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE));

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ags1

JGO Wizard


Medals: 75
Projects: 3
Exp: 5 years


Make code not war!


« Reply #3 - Posted 2012-08-06 20:26:13 »

I've been playing with OpenGL benchmarks. Just a couple of things... Firstly you cannot extrapolate performance from graphics memory - even poor cards come with 1 or 2 gigs these days. You have the same problem with OpenGL version - I think the GeForce 610 supports OpenGL 4.2, but its performance is pathetic. The only thing you can do is make an intro video and derive a graphics recommendation from that.

Offline Cero
« Reply #4 - Posted 2012-08-06 22:01:34 »

coincidentally I just reinstalled Fallout 3 and saw this:



Just takes 1 second without benchmark and stuff

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2012-08-06 22:09:45 »

I suspect most games just grab the GL_VENDOR / GL_RENDERER strings and have a small db of graphics card names which map onto default settings. Anything more complicated strikes me as a long winded way of getting something not as good.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline philfrei
« Reply #6 - Posted 2012-08-06 22:30:11 »

I am curious. I haven't done the following, but it seems plausible. Perhaps someone else knows if it is or isn't done.

On the first run, the game loop can be given a timing test, by taking a nanoSecond reading before and after the update() and before and after the render(). This can even be done on the sly perhaps by obscuring everything with a splash screen as the top graphical layer. From the tests, determine a good default settings mix.

Huh


[EDIT:] Thanks Cero. I haven't really gotten so far where a 'benchmark' mattered, so this was my first time thinking about the issue. It just seemed to me whether this or that is installed is less important than just finding out if the game loop runs fast enough.

"It's after the end of the world! Don't you know that yet?"
Offline Cero
« Reply #7 - Posted 2012-08-06 23:13:52 »

well thats a benchmark

Offline princec

« JGO Spiffy Duke »


Medals: 433
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2012-08-07 09:25:23 »

My advice is don't bother. Get it to run at the speed you want with the driver features you want to use on some fairly crappy system that's about 3 years old. Any system which does not have your required driver features, put up an error message and say you need new drivers and quit. Any system that doesn't reach the target frame rate... ignore.

With that out of the way you can sleep soundly at night and spend your days productively writing game code*

Cas Smiley

* Or wasting time on forums

Offline Roquen
« Reply #9 - Posted 2012-08-07 11:18:00 »

I'm about 100% positive that I've never not gone and modified the settings after one of these auto-magic detection things have run.  Having options is great...let the player choose what's important to them and move on to more important stuff.

(EDIT: I missed the 'not' in my first sentence and reversed meaning..opps)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline theagentd

« JGO Bitwise Duke »


Medals: 365
Projects: 2
Exp: 8 years



« Reply #10 - Posted 2012-08-07 11:50:38 »

I suspect most games just grab the GL_VENDOR / GL_RENDERER strings and have a small db of graphics card names which map onto default settings. Anything more complicated strikes me as a long winded way of getting something not as good.
Yes, but I didn't mention it because it's so stupid. At least *I* don't have access to all released graphics cards to test my games on, and that database will be severely outdated after a year or two. Warhammer 40K Dawn of War (the first one) even refuses to run if it detects that your GPU or driver is "incompatible" (= unknown). They fixed that in a patch. Autopatching is done from the menu, which requires you to be able to start the game.

Myomyomyo.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #11 - Posted 2012-08-07 12:29:45 »

I suspect most games just grab the GL_VENDOR / GL_RENDERER strings and have a small db of graphics card names which map onto default settings. Anything more complicated strikes me as a long winded way of getting something not as good.
Yes, but I didn't mention it because it's so stupid. At least *I* don't have access to all released graphics cards to test my games on, and that database will be severely outdated after a year or two. Warhammer 40K Dawn of War (the first one) even refuses to run if it detects that your GPU or driver is "incompatible" (= unknown). They fixed that in a patch. Autopatching is done from the menu, which requires you to be able to start the game.

I don't think it's unreasonable to guess/fudge the detection into a few broad categories (ie. low end intel, recent intel, GF6xxx, etc.) and pick some sane defaults for resolution and graphics detail.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Cero
« Reply #12 - Posted 2012-08-07 14:17:07 »

I suspect most games just grab the GL_VENDOR / GL_RENDERER strings and have a small db of graphics card names which map onto default settings. Anything more complicated strikes me as a long winded way of getting something not as good.
Yes, but I didn't mention it because it's so stupid. At least *I* don't have access to all released graphics cards to test my games on, and that database will be severely outdated after a year or two. Warhammer 40K Dawn of War (the first one) even refuses to run if it detects that your GPU or driver is "incompatible" (= unknown). They fixed that in a patch. Autopatching is done from the menu, which requires you to be able to start the game.

I don't think it's unreasonable to guess/fudge the detection into a few broad categories (ie. low end intel, recent intel, GF6xxx, etc.) and pick some sane defaults for resolution and graphics detail.

Yeah Fallout 3 has like low, medium, high and very high
So I could do 2 or 3 presets...

Offline Roquen
« Reply #13 - Posted 2012-08-07 14:26:58 »

That sounds reasonable.  My suggestion is to stick it on your "feature wish list" and attack that at the end...or not as the case may be.
Offline princec

« JGO Spiffy Duke »


Medals: 433
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #14 - Posted 2012-08-07 14:50:30 »

C'mon let's be realistic here... it takes a 50-strong team of AAA developers to push a modern graphics card without taking the piss on pointless bloom effects, etc. etc. Any of us in here using Java to make games are mere hobbyists compared to the AAA studios. I hope I'm not being a bit too presumptuous here but this whole question smacks of, "I have this amazing vision of what my game could look like! Yes, in my head! But I fear that it is so amazing that some old bullshit computer from 4 years ago might not run it at 60fps! So I'm going to worry about making the game that I haven't even started, because it's in my head, work on every computer I've ever used, just in case someone with loads of money wants to buy it because they've somehow got a shit computer from 4 years ago! Then and only then will I begin chipping away at the 250 man-years of work ahead of me to make the rest of the game!"

<points willy away from fire at this point and stomps off muttering into the darkness>

Cas Smiley

Offline princec

« JGO Spiffy Duke »


Medals: 433
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2012-08-07 14:51:14 »

Roquen said it so much nicer than I did.

Cas Smiley

Offline Oskuro

JGO Knight


Medals: 40
Exp: 6 years


Coding in Style


« Reply #16 - Posted 2012-08-07 15:52:36 »

It's not unreasonable to have a framework in mind for graphics configuration, specially if you intend to reuse it for future projects.

As long as the configuration tools don't make the actual game development grind to a halt, knock yourself off.

I support the benchmark idea. An initial benchmarking after installation can help get optimal parameters, and then you just need to add an "Advanced" tab on the graphics setting so users can fine tune as they see fit.

Remember to give them the chance to fire the benchmark on their own to test their settings!


Oh, and I think a positive value of a proper configuration and benchmarking menu is to find bottlenecks in graphics rendering, but that's part of the "last 10%" part of development.

Offline Roquen
« Reply #17 - Posted 2012-08-07 16:07:58 »

Steps to follow:
1) Get it working
2) Make it fun
3) Everything else (like polish)

If 1 & 2 aren't done there's little point of 3.  Avoid distractions and get shit done.
Offline ags1

JGO Wizard


Medals: 75
Projects: 3
Exp: 5 years


Make code not war!


« Reply #18 - Posted 2012-08-07 16:13:47 »

Just to add to Roquen's point - this is not core functionality. The game will run fine without a mini-benchmark, and it will be trivial to add the benchmark to the complete game without changing any of the game code.

Offline Cero
« Reply #19 - Posted 2012-08-07 18:08:25 »

This is mainly for lighting and shaders and resolutions.
Evidentially as tested, a certain amount of effect we plan on using result in 30 FPS on my single core laptop and 60 fps on a "modern" machine.
However the minimum spec machine should still run 60 fps, but then discard some fancy effects.


If 1 & 2 aren't done there's little point of 3.  Avoid distractions and get shit done.

I'm always the first to remind my dev team of this, as they get over-enthusiastic about details.
However lighting is an integral part for atmosphere and feeling of story-based level design.

Offline Roquen
« Reply #20 - Posted 2012-08-07 18:11:41 »

That's fine.  But I'm simply suggesting not wasting time auto-magically choosing settings that most user will override anyway.  Features like this have approaching zero added value.  I'd only do something like this if I had some engineer sitting idle without something more profitable to work on.
Offline Cero
« Reply #21 - Posted 2012-08-07 19:01:39 »

most user will override anyway.

Oh I think you're wrong there, we try to find the best screen solution and obviously start fullscreen.
I'm pretty sure normal users dont ever touch graphic options - they dont even know what it all means - at best they know what a screen solution is.
obviously talking about quite the wii crowd of people, but better be on the safe side and have the game start up by default as best as possible

Offline Spasi
« Reply #22 - Posted 2012-08-07 19:43:05 »

This is indeed an issue for game developers and many games will run micro-benchmarks at start-up to determine feature support and auto-tune rendering parameters. Khronos has recognized this inconvenience and has just released ARB_internalformat_query2 (in GL4.3 core, the extension is implementable on GL2.0+ hardware). It's a first step that covers textures and FBO rendering and allows the developer to easily determine feature support and avoid sub-optimal paths (see the CAVEAT_SUPPORT response).

I personally use a few benchmarks to determine hardware details without resorting to vendor-specific libraries. It's a bit of a pain to tune them properly and sensitivity to unpredictable events from the environment is an issue, but some of them work great and complete in a few milliseconds. For example, CPU cache line size and GPU warp/wavefront size detection. The latter is not only important for performance reasons, but for algorithmic correctness as well.
Offline Roquen
« Reply #23 - Posted 2012-08-07 20:08:28 »

Personally I consider load balancing via variable rendering quality to be a different issue.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!