Page 1 of 2

C++ as a Game Language

Posted: January 6th, 2012, 7:07 pm
by WwortelHD
Hey Chili! :D

I had to sign up for the forum, so I did that and I think you will have to make lesson 5 of the tutorial for C++! haha. :mrgreen: So.. Ur from Japan right, is it fun there? It's fun over here in the netherlands ;) and do you know a few newer games that are made in C++? because I don't even know if you can make 3d games or 2d games in it and stuff, So What can you make in C++?? :geek:
And last question is what games did you make in C++? :)



cyaaa

Re: C++ as a Game Language

Posted: January 7th, 2012, 5:16 am
by chili
Hey wortel, welcome aboard the fail train :lol:
Technically, I'm not from Japan, I just live here. ;) It's a pretty good place to live I guess. Cute girls, good food, and lots of stuff to do. I enjoy speaking and being surrounded by the Japanese language, so this is really the only place in the world where I can have that.

If you're worried about what language is the best to learn for game programming, have no fear. C++ is the programming language used to code the vast majority of games. Whereever performance is an issue, C++ will be there. It's also the most versatile of the popular programming languages, and it puts little restriction on what you can or cannot do.

Here are some games whose engines were coded in C++:
  • Assasin's Creed series
  • Fallout 3 series
  • Elder Scrolls V: Skyrim
  • Halo series
  • Call of Duty series
Basically every commercial game and most indy games are written in C++. There are of course exceptions, especially in the indy games sector. Minecraft springs to mind, for example. It was written in Java I believe.

I personally have fooled around with making a 2D jRPG engine and a 3D card table engine for playing TCGs such as M:TG. I've also made a few small one-offs, like a simple one-screen shooter and a platformer. Lately I've been fooling around with an a-life sim and evolved neural network topologies for AI.

I moved your post to a new topic because the information might be useful to others.

Keep it real bro and thanks for joining the board!

Re: C++ as a Game Language

Posted: February 7th, 2012, 7:58 pm
by upgrader
hey i got this error and i don't know what to do now ??

:arrow: First-chance exception at 0x00fc1045 in Chili DirectX Framework.exe: 0xC0000005: Access violation writing location 0x05f95640.
Unhandled exception at 0x00fc1045 in Chili DirectX Framework.exe: 0xC0000005: Access violation writing location 0x05f95640.
The program '[4972] Chili DirectX Framework.exe: Native' has exited with code -1073741819 (0xc0000005).

and i get alot of this stuff.
:arrow: 'Chili DirectX Framework.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file

and i typed this in so maybe i did something wrong.

int dx;
int dy;
dx = 400;
dy = 300;

gfx.PutPixel( dx ,425 + dy,255,255,255 );
gfx.PutPixel( 5 + dx,425 + dy,255,255,255 );
gfx.PutPixel( 4 + dx,425 + dy,255,255,255 );
gfx.PutPixel( 3 + dx,425 + dy,255,255,255 );
gfx.PutPixel( -5 + dx,425 + dy,255,255,255 );
gfx.PutPixel( -4 + dx,425 + dy,255,255,255 );
gfx.PutPixel( -3 + dx,425 + dy,255,255,255 );
gfx.PutPixel( dx,5 + dy,255,255,255 );
gfx.PutPixel( dx,4 + dy,255,255,255 );
gfx.PutPixel( dx,3 + dy,255,255,255 );
gfx.PutPixel( dx,-5 + dy,255,255,255 );
gfx.PutPixel( dx,-4 + dy,255,255,255 );
gfx.PutPixel( dx,-3 + dy,255,255,255 );

Re: C++ as a Game Language

Posted: February 9th, 2012, 3:33 pm
by chili
dy = 300;

gfx.PutPixel( dx ,425 + dy,255,255,255 );

300 + 425 = 725

This is past the bottom of the screen, so trying to put a pixel here will cause the program to crash.

Re: C++ as a Game Language

Posted: December 3rd, 2013, 12:44 am
by LuisR14
chili wrote:Cute girls, good food, and lots of stuff to do. I enjoy speaking and being surrounded by the Japanese language, so this is really the only place in the world where I can have that.
heh, some necroposting, but, that would be my kind of thing too xD

Re: C++ as a Game Language

Posted: December 3rd, 2013, 8:43 am
by chili
Well then you gotta get over here brah! Let me know when you arrive, you can buy me beer. :)

Re: C++ as a Game Language

Posted: December 25th, 2013, 6:01 am
by LoveXNA
The C++ language lost its popularity mainly because of the inability to quickly write quality software with it. In order to write high-quality software in C++, you have to be an incredibly smart and experienced programmer, whereas the same is not strictly required for C# and Java. Learning C++ takes much more time and very few programmers know it really well. The productivity of C++ programmers is many times lower than (for example) C#’s and that is why C++ is losing ground. Because of all these reasons, the C++ language is slowly fading away. If you don’t believe this, look through some job search site and count the percentage of job advertisements with C++.

Re: C++ as a Game Language

Posted: December 25th, 2013, 1:05 pm
by Syncan
LoveXNA wrote:The C++ language lost its popularity mainly because of the inability to quickly write quality software with it. In order to write high-quality software in C++, you have to be an incredibly smart and experienced programmer, whereas the same is not strictly required for C# and Java. Learning C++ takes much more time and very few programmers know it really well. The productivity of C++ programmers is many times lower than (for example) C#’s and that is why C++ is losing ground. Because of all these reasons, the C++ language is slowly fading away. If you don’t believe this, look through some job search site and count the percentage of job advertisements with C++.
But C# is slower. I don't know how much slower but that is the reason why time-critical games are written in C++.
I wonder if you can make DirectX games in C#. Somebody who can answer this?

Re: C++ as a Game Language

Posted: December 25th, 2013, 2:20 pm
by LuX
I'm pretty sure you can do DirectX games with any of the three main languages supported by Microsoft; Visual basic, C sharp and C++. Although many employers are looking for C# programmers, I don't think C++ will be going anywhere when it comes to game programming.

I also don't think that you are right by saying that you need to be super smart to make high quality programs with C++. You might need some logic while you're at it, but that's a virtue any programmer needs. Once you get the hang of C++ it's not really that hard to learn more, or "read" the code like a machine. Plus, once you're good at C++ all other languages will be child's play to learn.

Re: C++ as a Game Language

Posted: December 25th, 2013, 5:14 pm
by nG Inverse
C++ is still the most widely used language for game programming. Pretty much any game created by a AAA studio uses C++. C# is becoming more popular, but mainly for creating tools, not the engine or game code itself. A common flow:

> C++ for the engine, sometimes game code
> C# for tools
> Lua/Python or another scripting language for level/game code

C# is slower than C++ and easily reverse engineered which doesn't make it a go-to choice for major studios. The fact that it is mainly reserved for Windows doesn't help either.