What is C ++ ( video game language ? )

This topic is locked from further discussion.

Avatar image for ct1257860
ct1257860

4441

Forum Posts

0

Wiki Points

0

Followers

Reviews: 89

User Lists: 0

#1 ct1257860
Member since 2006 • 4441 Posts
I need to know it for this online book i am doing to make a video game -- what is it and where can i learn about it . OR tell me..enless it is to much to tell and hard to explain a link coujld help..
Avatar image for HiResDes
HiResDes

5919

Forum Posts

0

Wiki Points

0

Followers

Reviews: 1

User Lists: 0

#2 HiResDes
Member since 2004 • 5919 Posts

I need to know it for this online book i am doing to make a video game -- what is it and where can i learn about it . OR tell me..enless it is to much to tell and hard to explain a link coujld help..ct1257860

C++ takes years or for some people even life times to master, and it is the basic starting program used by most gaming programmers. If you learn C++ basically you can make games for any system especially those on the PC.  

Avatar image for LaP
LaP

17786

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3 LaP
Member since 2002 • 17786 Posts

[QUOTE="ct1257860"]I need to know it for this online book i am doing to make a video game -- what is it and where can i learn about it . OR tell me..enless it is to much to tell and hard to explain a link coujld help..HiResDes

C++ takes years or for some people even life times to master, and it is the basic starting program used by most gaming programmers. If you learn C++ basically you can make games for any system especially those on the PC.  

Making 3D games is a lot more complicated than just learning C++.

C++ is an easy language to learn. Can be done in a couple of weeks and even days. To make games you need to learn DirectX or OpenGL too. You need to have very good mathematical basis specially 3d calculus. I would not say University mathematical level is required but it's better. You need to be good at making clean code and algorithm too.

For a kid i would honestly recommend starting with small Flash based games. ActionScript is a very easy language to master and making Flash games is a good start with algorithmic like handling simple detection collisions and movement in a 2d environment.

Avatar image for JesterSage
JesterSage

597

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#4 JesterSage
Member since 2005 • 597 Posts

Furthermore, many code concepts from Flash (actionScript) can be used on C++, and vice versa.  However, making games on Flash is much easier.

If you really want to get into the industry, though, you need to know either Java or C++; VBasic, from what I gather, is not really acceptible. However, you may want to learn C#, since MS's XNA is C# based, and XNA is what MS used to program the 360 games. If you want to, look for Visual Studio Express, and then download the XNA package.

 

Avatar image for m0zart
m0zart

11580

Forum Posts

0

Wiki Points

0

Followers

Reviews: 54

User Lists: 0

#5 m0zart
Member since 2003 • 11580 Posts

I need to know it for this online book i am doing to make a video game -- what is it and where can i learn about it . OR tell me..enless it is to much to tell and hard to explain a link coujld help..ct1257860

C++ is an object-oriented programming language, which except for a few language inconsistencies, is a superset of a procedural programming language called "C".  C is a powerful language in that it allows developers to deal with more abstract concepts as a third-gen language while being able to deal with bitness, memory addresses, and other second- and first-gen machine level programming concepts.  What C++ adds to C is an object-oriented framework on top of the procedural framework of C.

C++, like C, isn't a difficult language to learn to use in general applications, but to use it at the level that many developers do requires not only knowledge of C++ as a language but a knowledge of the use of data structures and libraries for the procedural components, and a thorough knowledge of object-oriented concepts especially common design patterns.  It does take several years to become familiar with these to the level that many experienced developers are, as they are used heavily in large applications made up of multiple components.

Neither C nor C++ are gaming languages per se, they are rather general application languages used for developing almost any kind of process.  Libraries are developed for additional functionality which can be used in these languages, and those would include those that support functionality necessary to video games.  However, these are not part of the ANSI standard, and therefore are usually platform specific.

Avatar image for morph_basic
morph_basic

1672

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#6 morph_basic
Member since 2002 • 1672 Posts

From what I know, most developers use C++ (and the appropriate libraries) to program games, though I've heard Bungie used C when developing Halo: CE (who knows..). Java is way too slow for game development, so I doubt many devs use that at all, but I could be wrong.  Some might take advantage of assembly to optimize code if it's needed.  And as someone else stated, Microsoft's XNA is based on C# (which is sort of like a Java meets C++, I believe).

Anyway, if you want to learn about C++, just Google it.  There are tons of tutorials and things like that.

Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7 Teuf_
Member since 2004 • 30805 Posts
C++ will take you a few weeks to learn the very basics, and years to master.  It is the most commonly used progamming language for games (at least if you're talking about consoles or PC, cell phones is a whole different story) so if you really want to be a game programmer then its the language to learn.

However don't expect any kind of results game-wise for a long time.  It will take you months or years to gain the knowledge, skill, and experience necessary to handle the many facets of developing a real game.  Just take things one step at at time, and start small.  Do simple programs first, then expand slowly.  When you do get to games, start with simple 2D games and work your way up from there.
Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#8 Teuf_
Member since 2004 • 30805 Posts
Oh and if you really want to talk game programming, you should go to a site/forum that actually deals with that topic.  I recommend gamedev.net
Avatar image for linkthewindow
linkthewindow

5654

Forum Posts

0

Wiki Points

0

Followers

Reviews: 9

User Lists: 0

#9 linkthewindow
Member since 2005 • 5654 Posts

From what I know, most developers use C++ (and the appropriate libraries) to program games, though I've heard Bungie used C when developing Halo: CE (who knows..). Java is way too slow for game development, so I doubt many devs use that at all, but I could be wrong. Some might take advantage of assembly to optimize code if it's needed. And as someone else stated, Microsoft's XNA is based on C# (which is sort of like a Java meets C++, I believe).

Anyway, if you want to learn about C++, just Google it. There are tons of tutorials and things like that.

morph_basic
The only Java game that I know of that is mainstream\makes money is Runescape, and we all know about that :|. Still, it goes to show that Java can be made for complex games.
Avatar image for m0zart
m0zart

11580

Forum Posts

0

Wiki Points

0

Followers

Reviews: 54

User Lists: 0

#10 m0zart
Member since 2003 • 11580 Posts
[QUOTE="morph_basic"]

From what I know, most developers use C++ (and the appropriate libraries) to program games, though I've heard Bungie used C when developing Halo: CE (who knows..). Java is way too slow for game development, so I doubt many devs use that at all, but I could be wrong. Some might take advantage of assembly to optimize code if it's needed. And as someone else stated, Microsoft's XNA is based on C# (which is sort of like a Java meets C++, I believe).

Anyway, if you want to learn about C++, just Google it. There are tons of tutorials and things like that.

linkthewindow

The only Java game that I know of that is mainstream\makes money is Runescape, and we all know about that :|. Still, it goes to show that Java can be made for complex games.

Yeah Java is not that slow these days.  In some tests with native types, it is right up there with programs compiled in C.  Most Java VMs actually surpass C programs compiled into native exes in benchmark tests such as the prime number generator test.  This is because Java VMs for the Java2 platform use a very effective just-in-time compilation system.  When they encounter a section of bytecode that has to be interpreted into machine language for a given platform, instead of directly translating each instruction byte-per-byte like the older Java VMs do, they compile that code as a whole subroutine and store it into a memory location.  Anytime that section of code is reached, that stored code is run directly from that already-compiled native executable code.  The VMs can also detect when the code is being iterated through a loop or repeated many times, allowing it to even skip the subsequent logical steps that have to be taken to keep going back to the same piece of executable code, which can be significant.

Avatar image for ct1257860
ct1257860

4441

Forum Posts

0

Wiki Points

0

Followers

Reviews: 89

User Lists: 0

#11 ct1257860
Member since 2006 • 4441 Posts
[QUOTE="HiResDes"]

[QUOTE="ct1257860"]I need to know it for this online book i am doing to make a video game -- what is it and where can i learn about it . OR tell me..enless it is to much to tell and hard to explain a link coujld help..LaP

C++ takes years or for some people even life times to master, and it is the basic starting program used by most gaming programmers. If you learn C++ basically you can make games for any system especially those on the PC.  

Making 3D games is a lot more complicated than just learning C++.

C++ is an easy language to learn. Can be done in a couple of weeks and even days. To make games you need to learn DirectX or OpenGL too. You need to have very good mathematical basis specially 3d calculus. I would not say University mathematical level is required but it's better. You need to be good at making clean code and algorithm too.

For a kid i would honestly recommend starting with small Flash based games. ActionScript is a very easy language to master and making Flash games is a good start with algorithmic like handling simple detection collisions and movement in a 2d environment.

I just downloaded direct x there is a bunch of things like audio and all that what do i do ?
Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#12 Teuf_
Member since 2004 • 30805 Posts

Yeah Java is not that slow these days. In some tests with native types, it is right up there with programs compiled in C. Most Java VMs actually surpass C programs compiled into native exes in benchmark tests such as the prime number generator test. This is because Java VMs for the Java2 platform use a very effective just-in-time compilation system. When they encounter a section of bytecode that has to be interpreted into machine language for a given platform, instead of directly translating each instruction byte-per-byte like the older Java VMs do, they compile that code as a whole subroutine and store it into a memory location. Anytime that section of code is reached, that stored code is run directly from that already-compiled native executable code. The VMs can also detect when the code is being iterated through a loop or repeated many times, allowing it to even skip the subsequent logical steps that have to be taken to keep going back to the same piece of executable code, which can be significant.

m0zart

Regardless of how slow or quick Java is with native types, it's still never going to be useful for most games since by definition you're completely removed and abstracted from the hardware. Granted on the PC these days you're still going through API's for sound and video hardware, but its still a much better position than having no knowledge of the hardware at all. And even though the OS is still managing memory, you still have explicit control over when costly memory allocations and thats important for most games. But of course Java wasn't made for games, so it's probably irrelevent.

I actually just whipped up a neural-network-based handwriting recognizer for my AI course, and for some terrible reason our professor insisted that we code it in Java (probably since all the CS majors at my school aren't trained to use anything else :P ). After growing tired of waiting 30 minutes for the training session, I decided to code it in Win32 C++. Even with just copying and pasting most of the code, I was easily getting 10-20x the performance without compiler optimizations. Probably because of the large memory and fp usage, I'd bet. Or of course it could be that I just don't know how to make Java apps "sing" :P.

Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#13 Teuf_
Member since 2004 • 30805 Posts

I just downloaded direct x there is a bunch of things like audio and all that what do i do ?ct1257860

Whoa there...are you already very familiar with C++ or C#?  Because if you aren't you shouldn't just jump right into the DX SDK.  There's a whole lot of concepts you need to be familiar with before diving right in.

If you do think you're ready for it, then start with Direct3D, the graphics API.  It's all you need to start, and the overwhelming majority of the documentation and samples are focused on this portion of DirectX.

Avatar image for kemar7856
kemar7856

11789

Forum Posts

0

Wiki Points

0

Followers

Reviews: 20

User Lists: 0

#14 kemar7856
Member since 2004 • 11789 Posts
C++ is programming language
Avatar image for ct1257860
ct1257860

4441

Forum Posts

0

Wiki Points

0

Followers

Reviews: 89

User Lists: 0

#15 ct1257860
Member since 2006 • 4441 Posts

[QUOTE="ct1257860"] I just downloaded direct x there is a bunch of things like audio and all that what do i do ?Teufelhuhn

Whoa there...are you already very familiar with C++ or C#? Because if you aren't you shouldn't just jump right into the DX SDK. There's a whole lot of concepts you need to be familiar with before diving right in.

If you do think you're ready for it, then start with Direct3D, the graphics API. It's all you need to start, and the overwhelming majority of the documentation and samples are focused on this portion of DirectX.

O no i am not where can i learn this - is this the first thing to learn in video games
Avatar image for Oilers99
Oilers99

28844

Forum Posts

0

Wiki Points

0

Followers

Reviews: 10

User Lists: 0

#16 Oilers99
Member since 2002 • 28844 Posts

Since we've got so many actual program-like, I mean, programmer-type people here, mind if I float a question?

If I'm looking to gain the necessary programming skills to put together, say, a graphic adventure game, and I'm already learning the basics of C++, what should I be looking at to learn next?

Avatar image for VMan
VMan

4940

Forum Posts

0

Wiki Points

0

Followers

Reviews: 15

User Lists: 0

#17 VMan
Member since 2003 • 4940 Posts

Since we've got so many actual program-like, I mean, programmer-type people here, mind if I float a question?

If I'm looking to gain the necessary programming skills to put together, say, a graphic adventure game, and I'm already learning the basics of C++, what should I be looking at to learn next?

Oilers99

Nothing until you have a nothing grasp of C++.

...

 

THEN i'd say look into a MUCH MUCH more beginner friendly API than DirectX and OpenGL such as SDL or Allegro.

Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#18 Teuf_
Member since 2004 • 30805 Posts
[QUOTE="Teufelhuhn"]

[QUOTE="ct1257860"] I just downloaded direct x there is a bunch of things like audio and all that what do i do ?ct1257860

Whoa there...are you already very familiar with C++ or C#? Because if you aren't you shouldn't just jump right into the DX SDK. There's a whole lot of concepts you need to be familiar with before diving right in.

If you do think you're ready for it, then start with Direct3D, the graphics API. It's all you need to start, and the overwhelming majority of the documentation and samples are focused on this portion of DirectX.

O no i am not where can i learn this - is this the first thing to learn in video games

Most of the tools in DirectX are quite advanced, they're what the professionals use when making large-scale PC games like Half-Life 2.  So while you'll want to learn it eventually, as a beginner I would focus on just learning the basics of C++.  You'll need to get the hang of using variables, creating functions, using if statements, and using loops.  I'm sure there's plenty of free tutorials on the net, and a C++ book for beginners is definitely a good investment. 

Avatar image for teuf_
Teuf_

30805

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#19 Teuf_
Member since 2004 • 30805 Posts

Since we've got so many actual program-like, I mean, programmer-type people here, mind if I float a question?

If I'm looking to gain the necessary programming skills to put together, say, a graphic adventure game, and I'm already learning the basics of C++, what should I be looking at to learn next?

Oilers99

It really depends on how far along you are with your learning.  IMO, you'll want to be proficent in the use of classes and common data structures (arrays, queues, stacks, lists).  It also wouldn't hurt to know some more advanced object-oriented techniques, specifically inheritance and polymorphism.  While I wouldn't consider either explcitly necessary to create a game, you'll probably realize how they could come in handy very quickly as you start to make a game.

Also as VMan already noted, I'd highly recommend using SDL or Allegro rather than DirectX for the type of game you're making.  I'm a big fan of the SDL, it allows you handle graphics, window creation, input, and audio rather easily.  It's also cross-platform, which means its possible to compile your game for Mac and Linux.  There's plenty of tutorials available, and if you'd want I could even send you some of my own code for sprites or sound effects.  

Avatar image for armouredpriest
armouredpriest

471

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#20 armouredpriest
Member since 2004 • 471 Posts
[QUOTE="m0zart"]

Yeah Java is not that slow these days. In some tests with native types, it is right up there with programs compiled in C. Most Java VMs actually surpass C programs compiled into native exes in benchmark tests such as the prime number generator test. This is because Java VMs for the Java2 platform use a very effective just-in-time compilation system. When they encounter a section of bytecode that has to be interpreted into machine language for a given platform, instead of directly translating each instruction byte-per-byte like the older Java VMs do, they compile that code as a whole subroutine and store it into a memory location. Anytime that section of code is reached, that stored code is run directly from that already-compiled native executable code. The VMs can also detect when the code is being iterated through a loop or repeated many times, allowing it to even skip the subsequent logical steps that have to be taken to keep going back to the same piece of executable code, which can be significant.

Teufelhuhn

Regardless of how slow or quick Java is with native types, it's still never going to be useful for most games since by definition you're completely removed and abstracted from the hardware. Granted on the PC these days you're still going through API's for sound and video hardware, but its still a much better position than having no knowledge of the hardware at all. And even though the OS is still managing memory, you still have explicit control over when costly memory allocations and thats important for most games. But of course Java wasn't made for games, so it's probably irrelevent.

I actually just whipped up a neural-network-based handwriting recognizer for my AI course, and for some terrible reason our professor insisted that we code it in Java (probably since all the CS majors at my school aren't trained to use anything else :P ). After growing tired of waiting 30 minutes for the training session, I decided to code it in Win32 C++. Even with just copying and pasting most of the code, I was easily getting 10-20x the performance without compiler optimizations. Probably because of the large memory and fp usage, I'd bet. Or of course it could be that I just don't know how to make Java apps "sing" :P.

 

As a completly shameless plug, my friend has been programming games in JAVA for 10+ years now.  Follow the games link in my sig, and now that there is some new stuff on the horizon that is bigger (He's always trying to get JAVA to do things it "wasn't meant to do")

Avatar image for Hulabaloza
Hulabaloza

1322

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#21 Hulabaloza
Member since 2005 • 1322 Posts

Get a compiler....Microsoft gives away stripped down free versions of every major language they have. Google 'Visual Studio Express C++' or C# or Visual Basic or whatever.

http://msdn.microsoft.com/vstudio/express/visualc/default.aspx

That and a book or a good internet tutorial (I'm sure they are out there) can teach you the language. That should be the easy part.

To actually learn gaming I'd recommend looking at a game that has had its source code released. There are alot out there. Find some smaller stuff - a tetris clone or something. The code will be incomprehensible - study it till it makes sense.

Once you understand a few little games up and down look at some commercial stuff that was released. You can get mod stuff, like Half Life 2's SDK but it'd probably be better to go retro - Mechwarrior, Freespace or something like those. Get the game to compile, tweak some stuff to see what happens, etc.

From there you should at least have an idea what code looks like and have a good idea the work involved to make it. Then pick an API or invest in a real compiler,and expect any code you write from scratch to suck for a long time.

The truth is....you probably won't be a game programmer. It requires a hyper focus that not everyone gets. If staring at 50,000 lines of logic doesn't appeal to you (and if you are normal, it shouldn't), then become a janitor or project manager or something. Even if you like programming....consider yourself lucky if you aren't born for making games. You can make just as much or more writing Visual Basic or C# for a corporation, and you'll work alot less.

Avatar image for morph_basic
morph_basic

1672

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#22 morph_basic
Member since 2002 • 1672 Posts
Ogre3D is a fairly user-friendly (open-source) graphics engine you might want to look into as well. Plenty of documentation and the like.
Avatar image for Headbanger88
Headbanger88

5023

Forum Posts

0

Wiki Points

0

Followers

Reviews: 6

User Lists: 0

#23 Headbanger88
Member since 2004 • 5023 Posts
I don't think C++ in itself is very difficult, it's the application and execution of it. There's alot of logic and problem solving that goes into programming. It takes alot of patience and alot of creative thinking; this goes with all computer languages. I think the hardest thing about programming is fixing bugs and errors, especially if you're working on a game it could take hours for it to compile when all you need to do is see one little thing.