Is C++ useful for hobbyists?

Started by
23 comments, last by Unnoobish N00b 19 years, 10 months ago
I think what I meant was that if you already know C++, use it. Unless you want to learn another language =) Really I don''t see why there''s a debate.

quote:Original post by Red Drake
Wow!
Som people are so full of crap
"Use whatever language you want. It really doesn''t matter on a 1+ Ghz computer"
I hawe not read more funy post than that one

quote:I know you can use DirectX with it but what else and is it slower than Java or as slow?

Java screams on my 440Mhz UltraSPARC IIi.
Free Mac Mini (I know, I'm a tool)
Advertisement
"Speed" is relevant to the program you''re using.

For games, you need top speed. That means C/C++, with a splattering of ASM thrown in at critical times.

No programming language is really "slow" these days (even JIT / partially compiled stuff like .net / Java is pretty damned quick), and therefore, yes, you could use *ANYTHING* you want for, say a desktop app. That doesn''t apply to games, though. Speed is critical.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

What parts of a game require speed, I have programmed some games before without an API and with SDL but speed wasn''t a problem. Is it the game logic or the graphics? Is 2D or 3D a factor if it''s the graphics.

I''m looking at C# right now and if it''s fast enough I will use it for the time being. I might just look for games written in it.
I think the parts that would require the most speed would be the program logic and how fast it can calculate your vertices to send them to your OGL/DX calls. Things like animation calculations etc. of your scene handled by your app.

Would I be correct in saying that a call to OpenGL or DirectX is a call direct to the api in any language???
quote:Original post by Micko
the program logic and how fast it can calculate your vertices to send them to your OGL/DX calls. Things like animation calculations etc. of your scene handled by your app.

In this day and age, no speed-critical game will calculate any significant amount of vertex data in software. That's what your video card is for.

Furthermore, most game logic in pretty much any professional game I can think of is usually handled by interpreted scripts, which run much slower than C++. I believe that Carmack was at some point considering using Java as a scripting language for Doom 3, but he abandoned the idea for some reason (good going, I strongly dislike Java ).

The moral of the story is that while you will generally want to program most of your engine in C for the speed benefits (although Axiom, a very nice and very fast 3D engine, is written in C#), it's probably a good idea to code the actual game in a more suitable language.

[edited by - twix on May 30, 2004 6:37:53 PM]

This topic is closed to new replies.

Advertisement