PDA

View Full Version : Finally!



blueonblack
02-22-2008, 12:16 AM
Ok, it looks like I have finally found a place that I can ask this question and expect an educated and informed response. What is up with PC games and hardware? It can't be just me.

Everyone here is likely more familiar with a much broader array of games than I am, not being constrained within the chains of dialup access and country isolation (mention broadband around here and the locals start fingering their pitchforks and muttering about witchcraft), so forgive my narrow niche of examples.

Let's look at Half-Life. I think we would all agree this game looked and played beautifully. And still does. And it's ten years old (in a few months). Now look at some other more recent FPS games. No, I can't cite any examples off hand and don't have time to research specifics as I HAVE to get this off my chest, but I shouldn't have to. You guys that play them no doubt can name a few that don't look or play that much better (or ANY better) than Half-Life, but I'll bet they take TEN TIMES the machine to make them work. Why?? Granted, I know less about programming than I do about the soil acidity of outer Mongolia, but the logic seems constant. If game X can perform THIS well using THIS much hardware, why does game Y take so much more hardware to do the same thing? Call me paranoid, but it sounds like a conspiracy (that DOES sound paranoid, doesn't it?) between the hardware and software manufacturers.

Any programmers on here? Does the amount of hardware a program needs to work have any impact on the difficulty of programming it? Is it easier to write a program that will take 512M of RAM than one that can work with 256? Someone PLEASE shed some light on this, because frankly it pisses me off. Thanks! :D
________
VAPOR GENIE REVIEW (http://vaporizer.org/)

xRyokenx
02-22-2008, 12:25 AM
Newer games are made for newer hardware. Newer hardware runs much faster... it can process more data, access and store more data, etc. It is somewhat easier to write smaller programs and less demanding games, but people like making their games as pretty and all as they can. I'm sure someone else will expand on this more but I hope this is a good start of an answer for your question.

blueonblack
02-22-2008, 12:59 AM
Punctuation and sentence structure, man!

What?? My punctuation and sentence structure are perfect. I pride myself on those things, actually (come on, everyone, throw the barbs my way). It sounds like you want more paragraph breaks. I'll see what I can do...
________
Scripps-booth (http://www.chevy-wiki.com/wiki/Scripps-Booth)

blueonblack
02-22-2008, 01:17 AM
Thank you, Phantom Moderator, for moving this post to the proper location. My mistake. :redface:
________
Vaporizor (http://vaporizer.org/)

.Maleficus.
02-22-2008, 07:41 AM
I don't know of any (current) games that look like Half Life 1, but if you compare HL to a game maybe 4 years older than it that still looks like crap and needs a powerful computer, it's probably because of bad programming practice. In programming, there are tons of ways to do the same thing; for example, if I want to make a program that adds two numbers, it'd probably be like this.

short a = 1;
short b = 5;
System.out.println(a + b);
Pretty simple, right? All that it outputs is 6. It's got 2 variables, and because I'm working with small numbers, they are shorts. I could have used int (integers) but that would make the program larger. Is that really a problem at this scope? No. That would only be in the kilobyte range. But when you get to larger programs (like games) you're going to have big problems if you aren't careful how you do things. Programs use variables by storing set amounts of RAM for that variable. When you have a program using a floating point decimal number, you'd have to use a double or decimal, and those use more RAM to store, and more RAM for each variable means more memory overall. So, now that we know about variables, let's look at a normal game. Say you've got a game that uses 100MB of RAM. Chances are you won't be playing that on a system with 128MB of RAM. 256MB or more would suffice. You might ask, why can't I play it on the system with 128MB of RAM? The answer is probably obvious, but if not, take a look at the remaining amount of memory. 28MB for all background tasks. DEFINITELY not enough. Looking at my mom's computer right now shows Explorer alone using 18MB. Now, I know this is a pretty bad example, but you get the idea. Games have to share RAM with every other task the computer is doing, so a 256MB minimum is what you would want. That's with a production level game. Now, take a low-level, unoptimized game. You could be using 150MB of RAM. Again, sharing that with background tasks? Takes a lot more RAM to do the same thing. Also, there's the importing of unnecessary packages. Engines are "packaged" into easy-to-use containers with all of the stuff that the game needs to operate. There is one engine I've used called jMonkeyEngine. It's a Java game engine. It has features like bloom-lighting, cartoony rendering, and a few other neat effects. Now, say I wanted to use the bloom lighting, but decided against it at the last minute. I take out all the bloom-rendering methods, but forget to take out the line:

import jme.effects.render.glsl or whatever it is in the beginning. That will still import the package for bloom lighting, and waste space in the game and in your RAM. Another no-no.

Then you get to Threads. Threads are like little streams of execution. See, programs aren't very smart to start out. They can only do 1 thing at a time. Like, I wouldn't be able to compute Pi to the 300th decimal and add 1 + 5 at the same time. That's because there's a thing called the stack, and that takes each method of execution, puts thing in a "stack", and does each one in order until that method is finished. Now, the time difference for computing Pi and adding two numbers would also be minimal, but when you get to game programming, there's a ton of crap going on behind the scenes. It's computing the location of objects. It's computing the camera placement. It's drawing everything on the screen. If you had that all in 1 thread, looping continuously, it wouldn't work. You'd just crash the computer with one mouse movement because it's trying to redraw every movement that you just made, and then catch up to the movement that it should be at. That's why you make multiple threads, one to draw, one to do data computation... Do more things at once with minimal slowdown.

Then there's the graphics hardware. Say I'm making a game using Microsoft's XNA Framework. I can program the game in C#, use the DirectX libraries for graphics (which all modern cards have), and make a 2D game that still won't run on older computers. Yes, a 2D game that might not run on old computers. That's likely due to the graphics library (DirectX). If I build the game using procedures and effects that only DirectX 9 and above cards have, a DirectX 7 card would crash trying to run it. The card physically can't handle the game, even if it is a 2D sidescroller. That's why, if you know you won't be using crazy DirectX 10 effects in a game, you don't use DirectX 10! In programming, always do the least you can to make the game run to it's highest quality. Then there's the way you USE the graphics hardware. There are so many different game engines, some being more optimized than others. Commercial game engines are usually pretty well optimized (like the Source engine) but there are others that aren't so good. I believe it was S.T.A.L.K.E.R. that had a mod come out that increased the graphics detail and actually made the game run smoother with less graphical slowdown. Call me crazy, but I thought it was the developer's job to do that.

To sum it up, it's bad programming that makes crappy games require nice computers. I've only touched on 3 major things, and trust me, there's a lot more (or my 1000 page copy of Killer Game Programming in Java wouldn't be that long..) to it. But, it's 5:40 here, and I have to drink my coffee or I might actually go into a seizure at school.

And yes, that was mostly geared towards Java programming. The same concepts and general ideas go to all languages though (C++, C#, Java, VB...)


Edit: Well, I arrived at school today, only to find that it was canceled due to a broken water main. Awesome. So, I've got some time to add to this. Blue = new info.

simon275
02-22-2008, 08:53 AM
Great explanation there mate. +rep

Gotta love Java. Compile time errors are my friends.

Ichbin
02-22-2008, 01:26 PM
Most of it involves rendering.

More polygons in a 3d model to render means better hardware to get the same experience as if playing HL:Original.

When playing a game, your controlling RENDERED screens of a character. It is rendering on the spot, so my above statement has more meaning. Better graphics mean harder rendering, which justifies the need for more power.

There are still amazing games out there that dont neccesarly need a godlike machine.

Think of it as progression in art.

Started of as cavemen (Subjective) with a colourfull rock and some blood, to the intricate ways of making art now with your thousands of brushes and techniques.

Games developers now have an expectation to deliver a certain level of graphical art to obtain the best realism that the player can enjoy.

it takes more then storyline to make the player dive into the game nowadays. It has to look semi-realistic.

blueonblack
02-22-2008, 01:42 PM
Wow, lots of info here, guys, thanks. While I will admit I'm not familiar with many of the terms used I get the idea. Thanks for taking the time to answer. (My conspiracy theory was a lot more fun.)
________
Amateur tube (http://www.****tube.com/)

noopypoop
02-22-2008, 03:39 PM
I think another thing is, wheter you know it or not that the graphincs isnt the only thing working. For example, the AI, scenery animations(such as birds) Are all running in the backround. Correct me if I'm wrong, but I think games are rendered throughout as opposed to just the area your in. So the AI, and scenery is all being proccesesed whether you can see it or not.



But dont ask me, i dont know anything when it comes to the real coding in programs.

Ichbin
02-22-2008, 04:19 PM
Most games have a Scenery turn off. Kind of a streaming thing, where if it knows its not in view, it makes it invisible.

However, your correct, the AI is always running.

NightrainSrt4
02-22-2008, 10:07 PM
One thing about programming I've noticed is that many programmers (at least that I know) aren't concerned with memory usage or things like that. They simply want the program to do what they need it to. I look at it as laziness to be honest.

One thing that I take pride in is my constant strive to make code cleaner, and smaller. To do more with less memory, cpu time, etc. Most people that I know just code it to get it done, whereas I take extra time to get it as small and speedy as possible.

With production programs and games, often you are on very strict time constraints, and with this comes the sacrifice of optimization for simply getting the job done.

Another thing to take note is that each different programming language acts differently with memory and cpu time. For a basic example, take java and c++ for example(generalities here). When something is imported in java it goes and grabs what it needs whereas c++ makes a copy of everything it needs right there when its compiled. This causes C++ programs to initially be much larger than an equivalent Java program, but C++ program used to run a bit faster. Recent changes to java have put both java and c++ relatively close in speeds, so this really isn't an issue anymore. Programmer efficiency will have a bigger effect on speed than the language at this point. Java also has an integrated garbage collector, whereas the last time I checked C++ does not. This is a generality and trying to break it down farther than I probably should but, ehh. Each language has its own trade-offs.

I haven't used C++ a whole lot, as I've mostly used Java. One thing I do like about Java is that it is platform independent. But java also has less features. Theres tradeoffs to everything.

.Maleficus.
02-22-2008, 10:55 PM
One thing about programming I've noticed is that many programmers (at least that I know) aren't concerned with memory usage or things like that. They simply want the program to do what they need it to. I look at it as laziness to be honest.
I try to do the same. Why make a computer work more than it needs to? Especially when you get to bigger programs, it really makes a difference. As far as languages go, I can't comment much there either. I've only really used Java and VB2005 with light C++ and C#. The only problem with Java is the need for a JVM (Java Virtual Machine if anyone didn't know what it meant). C++/# doesn't need a special "machine" to run, and also doesn't require the JDK (Java Developer's Kit). Anyone can download a C++ compiler and start coding.

What does that have to do with game programming? I'm not sure. I got off on a tangent :rolleyes:.

NightrainSrt4
02-22-2008, 11:09 PM
What does that have to do with game programming? I'm not sure. I got off on a tangent :rolleyes:.

Everything! 8)

The difference between a game easily being run on a Linux box or "strictly" windows. And on efficiency, that has everything to do with game programming. Some games have beautiful programming. Other's I would assume are complete nightmares. But not having seen these games source code I couldn't truly say one way or another. But some things are clearly poor coding.

.Maleficus.
02-22-2008, 11:20 PM
Linux-ability wouldn't be a problem if devs programmed the game with Linux in mind. C++ is great on Linux; it's the use of proprietary M$ stuff like DirectX that make it un-Linux-able (<- Nice word, huh). There have been a few commercial games written in Java (Law and Order I think) but the ability to use DirectX and not use a JVM will always make C a better choice.

NightrainSrt4
02-22-2008, 11:44 PM
True. It's always easiest to go aimed towards the larger user-base and commonly available tools and such.

I want to start game programming. It is much more interesting to me than the programs for college. I don't know a whole lot, but I catch on sooo quickly to material.

Like recently we had to write a class that could calculate any date and determine what day it occurred on, but without using any predefined classes like Date or Calendar. Most people in the class had such an issue with it, and I banged it out like it was nothing. On top of that my code was sooo much more efficient than any of the people's that I looked at(the ones who actually figured it out). Granted, it wasn't perfect but it was pretty well done as I put a little extra time cutting it down as far as I could.


Theres so much more that I have to learn, as I've only been learning a few months, but I am like craving it. My issue is finding a problem to tackle. I just can't come up with stuff on my own. Tell me to do something and I work my arse off until it is finished. At least with a game, I can come up with a clear concept and work to complete it.

Vertigo
02-23-2008, 05:57 PM
As stated earlier, there's a lot going on other than what you see in video games. For example: I remember the first Resident Evil game, and countless hours spent on Doom and Wolfenstein 3D. Graphics aside, there wasn't as much going on in the background as there is in modern games. Or even on my PC for that matter. For example: When I played Wolf 3D. I had just Wolf 3D running, fullscreen. I'd kill a pixelated german, then move on. Now, I'm playing say Dawn of War, and I'm telling multiple units to perform different tasks. I've got 4 guys building completely different structures, while a unit of scouts is ... well scouting. Meanwhile I'm beginning to stockpile troops, while adding more improvements to my base. Not simply, shooting a German and walking away. Meanwhile, I've got iTunes open, and whoops got an email, maybe it's important ... so on and so forth. The technology has gotten better, and I for one am greatful. I remember the days of making comics at home and pasting the words I'd written with a type writer onto the pages, rather than just adding them in photoshop and printing them with my wireless printer.[/technojoy]

That is not to say that all is right in the world of digital games, there are definitely instances of shoddy craftsmanship. I ranted a year or so ago about a particular game I'd bought that refused to play on my system, until I actually wrote a small applet to make the game work. The game was brand new, the system was a month old. THAT is a bad sign imo, and there are degrees of quality. So the old cliche of buyer beware still applies.

dexaroni
02-29-2008, 05:05 PM
This is actually a valid issue.

First off, PC game designers get sloppy with code becuase there is enough hardware to back them. The Xbox 360 has, in effect, a Radeon X1900XTX in it, and it can run Gears of War at a steady 40 FPS... my PC, which has an 8800GT and a quad core in it, constantly lags in game.

Second, some companies *coughnvidiacough* pay game developers to optimize their games for their hardware. This is why you see ATI cards often beat Nvidia cards pretty badly in 3dmark, but may perform terribly in actual real performance.

Bottom line, becuase hardware on the PC is so powerful, game designers don't bother to optimize their software for it.

.Maleficus.
02-29-2008, 06:22 PM
This is actually a valid issue.

First off, PC game designers get sloppy with code becuase there is enough hardware to back them. The Xbox 360 has, in effect, a Radeon X1900XTX in it, and it can run Gears of War at a steady 40 FPS... my PC, which has an 8800GT and a quad core in it, constantly lags in game.

Second, some companies *coughnvidiacough* pay game developers to optimize their games for their hardware. This is why you see ATI cards often beat Nvidia cards pretty badly in 3dmark, but may perform terribly in actual real performance.

Bottom line, becuase hardware on the PC is so powerful, game designers don't bother to optimize their software for it.
The Gears issue must be something with your PC, because I played it with an E6600 and X1600Pro no lag, and now with my 8800GT and everything is pretty much maxed (last time I checked).

dexaroni
02-29-2008, 10:54 PM
It had to do with my Chipset... Gears of war doesn't like P965 chipsets with big HD's.

Doesn't do it on my new system though.

Still, look at Halo 2 or something.

Developers consitently optimize games for consoles and not for PC's.

NightrainSrt4
03-01-2008, 09:36 PM
Developers consitently optimize games for consoles and not for PC's.

That is really a different issue in itself. Sloppy coding is different than pc optimization as you can't really Optimize a game for pc. There is way to much different hardware to have it be optimized for your exact pc. Yes, devs optimize games to different hardware, but that is not optimizing for the pc. Nvidia isn't the only one who has that advantage though. ATi cards have games "optimized" for them as well.

A game is only "optimized" for its particular console because there are simply no other hardware options. If every pc was the same you would see the same "optimization" happening. As it is, different cpus/gpus/etc act differently with different types of data and there really isn't any way to optimize for those changes.

For a game to be optimized for every mix of hardware, there would need to be a copy of the game with unique code catering to each unique hardware setup. This just isn't going to happen in the pc world, but it is quite easy to do for consoles as it is just one set of code.

.Maleficus.
03-01-2008, 10:07 PM
A game is only "optimized" for its particular console because there are simply no other hardware options. If every pc was the same you would see the same "optimization" happening. As it is, different cpus/gpus/etc act differently with different types of data and there really isn't any way to optimize for those changes.
Not only did you hit the nail on the head, you hit it so hard it went straight through the board.

As the case currently stands: there is no "real" answer to this question, as there are a number of factors that cause poor performance. Comparing a console to a PC is a completely different story and there are so many hardware configs that complete optimization is just a dream. Devs can only spend so much time on a game, and when it's out it's out. They can patch to help a little, but the sad truth is PC games just can't be optimized as well as console ports.