Live data from Hacker News

Ask HN: If C++ is so bad, what should game developers use?

news.ycombinator.com

11–20 of 127 posts

Re: Ask HN: If C++ is so bad, what should game developers use?

#11
post #2

What kind of game are you writing? If you're just a hobbyist, you might want to try a popular choice like python. (Pygame is insanely well known.)

I edited the original post. I'm interested in commercial game projects. Real games, the kinds that you see in shops for PS and XBox etc.

If you are interested in making games for consoles you are pretty much restricted to what the console maker's software development kit supports, which is usually C/C++. It's usually impractical to reverse engineer the hardware and supply your own system libraries in another language.

Computer games are another story, but the same facts are generally true, that you should use the language which provides the libraries where most of the work is already done for you. There are the most number of game development kits for C++, so that's why C++ is popular for game development.

For what it's worth, I have done a few games using the ORGE rendering engine and plugged the game elements (physics, AI) with separate libraries and it has worked fairly well.

http://en.wikipedia.org/wiki/OGRE

http://en.wikipedia.org/wiki/Havok_(software)

http://en.wikipedia.org/wiki/Box_2D

Re: Ask HN: If C++ is so bad, what should game developers use?

#12
post #9

I'm with you. Whatever you use, don't choose C++. Sure, everyone on your programming team knows C++ already. Yeah, your libraries are all written in it. And successful games have used it again and again. But if it's not one of the "cool" languages, you shouldn't be using it. Modern game developers should code in Ruby/Lisp. By the time you've finished coding all of your graphics libraries from scratch, Moore's law wil…

Wait, so why can't you use the C++ libraries from Ruby/Lisp?

Re: Ask HN: If C++ is so bad, what should game developers use?

#13
post #5

Earlier quoted context omitted.

Use what most developers are using for the gaming platform of interest.

Isn't that C++? (I'm not very learned, here, I'm really asking about this for a friend).

As far as I know, yes.

Re: Ask HN: If C++ is so bad, what should game developers use?

#14
post #4

XNA is great, but your games will only be compatible with windows(and xBox). Haskell is definetely not a good idea.

Why is Haskell a bad idea?

Well, for once, it's not particulary fast, but that's not a concern for all games(it's not slow either, but it's quite hard to optimize). The real deal is that it's a completely functional language with not much support, as far as games go. You won't find any graphics libraries, so you'll have to make them from scratch. Unless you have been programing in funcitonal languages for a long time, this will take an absurd ammount of time, and you probably won't be able to do it at all. Haskell is great for math-oriented programs, but I wouldn't recommended for much else, in my opinion. http://hackage.haskell.org/ is suppossed to be a good source for libraries, if you are intersted, but I can't get it to load.

Re: Ask HN: If C++ is so bad, what should game developers use?

#15
post #10

Don't let them scare you away... C++ is fine if you use what you need and take the time to actually understand the tools you're using.

Why is C++ suddenly "fine" when you have no other options? There could easily be a language with all the close-to-the-metal advantages and none of the baroque, redundant complexity of C++; why must we be content to use the same language as everyone else in the industry, rather that scratching this itch and building a newer, more productive one?

"Newer" isn't necessarily better or more productive. Especially given the monumental task of having to write a game without the benefit of any of the libraries developed over the past few decades.

Perhaps the reason there are no other viable options is because C++ is pretty well suited to the task?

Re: Ask HN: If C++ is so bad, what should game developers use?

#17
post #5

Earlier quoted context omitted.

Use what most developers are using for the gaming platform of interest.

Isn't that C++? (I'm not very learned, here, I'm really asking about this for a friend).

well pc-gaming/xbox is also getting more and more c#

Re: Ask HN: If C++ is so bad, what should game developers use?

#18
post #14

Earlier quoted context omitted.

Why is Haskell a bad idea?

Well, for once, it's not particulary fast, but that's not a concern for all games(it's not slow either, but it's quite hard to optimize). The real deal is that it's a completely functional language with not much support, as far as games go. You won't find any graphics libraries, so you'll have to make them from scratch. Unless you have been programing in funcitonal languages for a long time, this will take an absurd…

And what about Quake in Haskell : http://www.haskell.org/haskellwiki/Frag ?

Re: Ask HN: If C++ is so bad, what should game developers use?

#20
post #14

Earlier quoted context omitted.

Why is Haskell a bad idea?

Well, for once, it's not particulary fast, but that's not a concern for all games(it's not slow either, but it's quite hard to optimize). The real deal is that it's a completely functional language with not much support, as far as games go. You won't find any graphics libraries, so you'll have to make them from scratch. Unless you have been programing in funcitonal languages for a long time, this will take an absurd…

Fraq was made in 2005 and it looks worse than quake 3, wich was made 6 years early (addmitedly by a big studio instead of jut one person, but the point still stands). It is possible to make games in Haskell, but it's closer to a theorical exercise than it is to an aproach to proffesional game-making.
Post reply on HN