Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411643 Posts in 69394 Topics- by 58450 Members - Latest Member: pp_mech

May 14, 2024, 08:13:02 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What are the differences between C++ and C#
Pages: 1 2 [3] 4
Print
Author Topic: What are the differences between C++ and C#  (Read 23967 times)
Eclipse
Level 10
*****


0xDEADC0DE


View Profile WWW
« Reply #40 on: November 18, 2008, 11:36:52 AM »

Well, the list of differences could go on for pages, but I think that you might be able to make the decision based solely on your target platforms. Microsoft's XNA uses C# exclusively. If you're targeting your game to the 360, you'll need to use C#. However, XNA is pretty much only for Windows and the 360. If you want your game on Linux, Mac, Wii, PS3, PS2, DS, or PSP you'll need to go with C++.

EDIT: Obviously C++ works for Windows as well. The only platform C++ won't work on is X Box 360.

currently ALL the games made for xbox and xbox 360 were made using C++, even the xbox live ones.

the only ones using c# and xna are the ones of this new creators club shit.

Anyway C++ is far better and faster than C#, with a lot more libraries supports as well and not platform dependent, there's no reason to learn C# to make games if you don't want to use xna, learn C++ instead
Logged

<Powergloved_Andy> I once fapped to Dora the Explorer
policedanceclub
Level 10
*****


POLICEDANCECLUB


View Profile
« Reply #41 on: November 18, 2008, 11:45:00 AM »

http://en.wikipedia.org/wiki/Schizoid_(video_game)
wikipedia says that used xna.
Logged
Blake
Level 0
**


wharrgarbl


View Profile WWW
« Reply #42 on: November 18, 2008, 11:56:57 AM »

Sure C++ is used for commercial games for the Xbox 360 (boxed games and most XBLA games), but if you're a small developer who doesn't have an expensive dev kit, and you'd like to target the Xbox 360 then C# and XNA is the way to go.

C++ and C# are both capable languages for programming games with. C# is probably easier on the programmer to write and debug (due to the OO stuff being natively designed with the language instead of tacked on to C), though with that simplicity comes the tradeoff of less control (and platform independence) and slower speed (though that probably won't become an issue for most smaller indie games) than C++. Think about the target platform for your game and which programming features the languages contain. If you're comfortable with object oriented programming, then neither of the languages should be too difficult to start writing games with.
Logged
Michael Buckley
Level 0
***



View Profile
« Reply #43 on: November 18, 2008, 12:20:58 PM »

currently ALL the games made for xbox and xbox 360 were made using C++, even the xbox live ones.

the only ones using c# and xna are the ones of this new creators club shit.

Anyway C++ is far better and faster than C#, with a lot more libraries supports as well and not platform dependent, there's no reason to learn C# to make games if you don't want to use xna, learn C++ instead

As Blake said, and you mentioned, you can use C++ if you can afford a development kit and get licensed by Microsoft. If you can't, you're stuck with XNA and C#. Considering that this is an Indie board, I figured that most people here interested in developing for the X Box would only be able to go through the creator's club.
Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #44 on: November 21, 2008, 01:15:18 PM »

The other way is to get your game running in C++ on PC with DirectX and make it work fine enough to A) be verry known (like N -> N+ ) and/or B) show that the game sell (like Darwinia -> Darwinia+ ).

One of the two conditions can let you enter the console industry with the help of console constructors seeing money in a deal to port your game on their consoles. The easiest port would then be on XBox360...

Logged

raigan
Level 5
*****


View Profile
« Reply #45 on: November 23, 2008, 05:11:04 AM »

B) show that the game sell (like Darwinia -> Darwinia+ ).

AFAIK Darwinia was written in C/C++ to start with..
Logged
increpare
Guest
« Reply #46 on: November 23, 2008, 09:49:55 AM »

B) show that the game sell (like Darwinia -> Darwinia+ ).

AFAIK Darwinia was written in C/C++ to start with..
I think that was the point?
Logged
Zaratustra
Level 7
**



View Profile WWW
« Reply #47 on: December 04, 2008, 03:40:57 AM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
Logged

Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #48 on: December 04, 2008, 03:49:08 AM »

good bump
Logged

Cymon
Level 9
****


Computer Kid


View Profile WWW
« Reply #49 on: December 06, 2008, 11:50:02 AM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
Logged

Cymon's Games, free source code, tutorials, and a new game every week!
Follow me on twitter
Zaknafein
Level 4
****



View Profile WWW
« Reply #50 on: December 06, 2008, 01:42:29 PM »

Some of us enjoy silly hats. Gentleman
Logged

Scolo
Level 0
**


Justin Dempsey


View Profile WWW
« Reply #51 on: December 06, 2008, 05:58:18 PM »

c++ has balls
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #52 on: December 07, 2008, 11:46:39 PM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
hehe you agree with this? figures
Logged

nihilocrat
Level 10
*****


Full of stars.


View Profile WWW
« Reply #53 on: December 13, 2008, 12:31:31 PM »

c++ has balls

Yes, that's true, but it means it's not particularly uncommon to get kicked in the balls with that language.
Logged

Cymon
Level 9
****


Computer Kid


View Profile WWW
« Reply #54 on: December 13, 2008, 12:42:50 PM »

C++ is a development of C which implements object-oriented programming and exception handling.

C# is Java with a silly hat on.
hehe you agree with this? figures
Actually I think C# is vb with a silly hat, but that statement was close enough.

c++ has balls

Yes, that's true, but it means it's not particularly uncommon to get kicked in the balls with that language.
That's why when you program in C++ you should always wear a cup.
Logged

Cymon's Games, free source code, tutorials, and a new game every week!
Follow me on twitter
Craig Stern
Level 10
*****


I'm not actually all that stern.


View Profile WWW
« Reply #55 on: December 14, 2008, 12:43:39 PM »

How is Python for OOC? I want to learn a real programming language one of these days (i.e. something besides Actionscript), and Python seems to be the one everyone agrees is good to start with.
Logged

Gold Cray
Level 10
*****


Gold Cray


View Profile WWW
« Reply #56 on: December 14, 2008, 01:26:32 PM »

I haven't done much with it, but I have done enough to know that Python is pretty cool to code in. I think it's probably just as good for OOC as C++ is.
Logged
David Pittman
Level 2
**


MAEK GAEM


View Profile WWW
« Reply #57 on: December 14, 2008, 01:30:57 PM »

Python's probably not the best language for learning good object-oriented practices because all class members are public with limited support for hiding anything. In fact, much of Python's OO support appears to be a bit of a hack, such as explicitly passing the self parameter to member functions. That said, it is a fun little language with some great libraries (pygame, pyglet, etc.) for game development.

C#, Java, and even C++ seem to have more "pure" implementations of the OOP paradigm, with better support for information hiding than Python and with inheritance-based polymorphism (because they are all strongly-typed languages compared to Python's dynamic typing that effectively makes everything polymorphic). That doesn't mean they're better or more powerful languages--you can do anything in one that you can do in the others. What's really important is how expressive you can be and how much the language keeps you from shooting yourself in the foot while doing it.
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #58 on: December 14, 2008, 03:01:54 PM »

Feh, the self thing is apparently by design, python does have an intrinsic understanding of classes (e.g. "bound" functions). And it is a super fun language. But yeah, it's not pure OO, much like it's not pure anything. Python consistently takes the middle route on that sort of thing. However, that doesn't mean it's bad for OO coding, quite the contrary. Duck typing means not having to waste time with expansive inheritance hierarchies, and more or less instant polymorphism. Creating classes and objects is cheap, and, I think rarely for a dynamic language, it supports multiple inheritance.

Private variables are hacky, but that's because they are more a mechanism to avoid namespace clashing, not ecapsulation. The point is that dynamic languages do not have such a strict design contract on what objects can and can't have, so this naturally blurs the distinction between public and private.
Logged
Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #59 on: December 19, 2008, 06:44:23 AM »

Normally I know better than to jump into silly arguments almost a week late, but what the hell. I've got 40 minutes before a meeting before I can get on with meaningful work.

Actually I think C# is vb with a silly hat

And I think C++ is assembly in a cheap suit.

Fundamentally, back in the dark ages, people wrote code directly in the instruction set the hardware understood, and it was fine because that's all that we had.

Then some bright spark invented the high-level language, and all the people who'd spent days of their lives understanding how to program in assembly stood around tutting scornfully and saying how it would never catch on, because everyone knows that if you want your program to perform well you need to write directly in assembly. Except, you know, within a decade or so compiler design had advanced to the point that the average compiler really could optimise your code better than the average programmer could, and the conveniences of HLLs far outweighed the drawbacks and everyone recognised the people who still programmed in assembly for what they were - grognards who didn't want to let go of what they'd learned or liked to feel superior understanding the computer at a lower level than everyone else.

Then, a little while later, some clever guy invented memory-safe garbage-collecting runtime environments and JIT bytecode compilers and all those things C# and Java rely on, and a lot of the C++ programmers are standing around tutting scornfully and saying how it'll never catch on, because everyone knows that if you want your program to perform well you have to write code with pointers and manual memory allocation and all that guff. They've learned C++ and because it's easier to code in C#, they're presuming that it's not so good... or like the feeling of superiority they get from knowing things C# developers don't, or maybe even genuinely feel they can't get the job done if they don't get to create access violations at will. The amount of bollocks spouted about it in this thread alone demonstrates that a good number of them don't even bother to learn how it works before deriding it.


Now, there was a bit missed off the beginning of the story - right at the beginning, people didn't even have assembly - they had to make hardware to do what they wanted. And people still do that, for a vanishingly small set of applications, like the kind of hardware you get in GPUs. And people still write assembly for some small, specialised set of circumstances, because it genuinely is the best answer sometimes. And I have no doubt that people will continue to use direct-memory-manipulation high-level languages like C++ for an increasingly small set of applications as we go forward. C# apps run on top of a layer of C++ code which quite possibly runs on top of some hand-crafted assembler which runs on purpose-built hardware.

But I also quite seriously expect that - while it may take another ten years - serious development going forward will increasingly use languages and runtimes like C# over languages like C++, because the performance loss genuinely is negligible a lot of the time (in fact, due to things like the way the GC allocates large chunks of memory in advance, in some situations it outperforms natively-compiled C++) and because the advantages to the programmer truly are great and useful. When those advantages outweigh the disadvantages in a field, that field will transition over to the new thing. It's already happening in business software, I see it as only a matter of time for games. Maybe it won't be C#, maybe it'll be some other language/runtime that comes along later, but I'm pretty sure it'll happen.


And ten/fifteen years after that, some smart-arse will come up with an even better way of coding, and I'll be writing derisive posts to Internet forums telling kids that it'll never catch on, because everyone knows that the GC/bytecode-JIT model is best for performance.
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
Pages: 1 2 [3] 4
Print
Jump to:  

Theme orange-lt created by panic