C++ as a Game Language

The Partridge Family were neither partridges nor a family. Discuss.
WwortelHD
Posts: 34
Joined: January 6th, 2012, 7:01 pm
Location: Lochem
Contact:

C++ as a Game Language

Post by WwortelHD » January 6th, 2012, 7:07 pm

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

User avatar
chili
Site Admin
Posts: 3929
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: C++ as a Game Language

Post by chili » January 7th, 2012, 5:16 am

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!
Chili

upgrader
Posts: 1
Joined: February 7th, 2012, 6:38 pm

Re: C++ as a Game Language

Post by upgrader » February 7th, 2012, 7:58 pm

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 );

User avatar
chili
Site Admin
Posts: 3929
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: C++ as a Game Language

Post by chili » February 9th, 2012, 3:33 pm

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.
Chili

User avatar
LuisR14
Posts: 1247
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: C++ as a Game Language

Post by LuisR14 » December 3rd, 2013, 12:44 am

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
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
chili
Site Admin
Posts: 3929
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: C++ as a Game Language

Post by chili » December 3rd, 2013, 8:43 am

Well then you gotta get over here brah! Let me know when you arrive, you can buy me beer. :)
Chili

LoveXNA
Posts: 35
Joined: July 17th, 2013, 9:00 pm

Re: C++ as a Game Language

Post by LoveXNA » December 25th, 2013, 6:01 am

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++.

Syncan
Posts: 58
Joined: May 13th, 2013, 2:09 pm
Location: Holland

Re: C++ as a Game Language

Post by Syncan » December 25th, 2013, 1:05 pm

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?

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: C++ as a Game Language

Post by LuX » December 25th, 2013, 2:20 pm

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.
ʕ •ᴥ•ʔ

nG Inverse
Posts: 115
Joined: April 27th, 2012, 11:49 pm

Re: C++ as a Game Language

Post by nG Inverse » December 25th, 2013, 5:14 pm

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.

Post Reply