• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
jagguy

c++ or c#

40 posts in this topic

Quote:
Original post by Anonymous Poster
Quote:
Original post by K_I_L_E_R
How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


But the C# implementation of Microsoft doesn't follow its own ISO standard. There are extra things no covered by the ISO.

The small "incompatibilities" that would make competitor's tools to look bad. That's why C# will always be a Microsoft owned language.


AFAIK the language C# do follow the standard. It's true that MS has extension to that standard in the form of some parts of the API etc., but MS don't break the standard they only enhance it. Correct me if I'm wrong.
0

Share this post


Link to post
Share on other sites
Quote:

There are extra things no[t] covered by the ISO.


Which does not change the fact that it is still an ISO standard, and does not imply in any way the it is a "MS owned" language. Granted, Microsoft may have the best compiler and best support around for it, currently, but nothing is preventing that from changing.

Both MS and the guys working on GCC and just about every other compiler add compiler-specific extensions to the languages they can compile. That doesn't mean they "own" the language.

If you write code in any language that is not standard compliant because you've utilized a compiler-specific extension, that's really your fault, not the fault of the compiler writer.

To contribute to the discussion at hand:
C# and the .NET framework are amazing tools for rapid, robust tool development. Studios who don't adopt them for their tools departments in favor of continuing to maintain legacy C++ tools code will eventually suffer slower tool development turnaround and slower development processes in general due to the tool development turnaround time. Tools are very important to the development process and its critical that they don't go underestimated.

C++ will remain the language of choice (for better or for worse) for the majority of actual game development, especially on consoles, for a while longer.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by K_I_L_E_R
How does Microsoft own an ISO standard?
Both C# and C++ are ISO standards.


But the C# implementation of Microsoft doesn't follow its own ISO standard.

Apart from small, relatively irrelevant, inconsistencies, the C# compiler is compliant.
Quote:

There are extra things no covered by the ISO.

Ah yes, so linux distributions shouldn't offer things like GTK, QT etc since they are not covered by an ISO standard?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by rohde
AFAIK the language C# do follow the standard. It's true that MS has extension to that standard in the form of some parts of the API etc., but MS don't break the standard they only enhance it. Correct me if I'm wrong.


Which makes it incompatible with any alternative that might exist and destroys any chance for example of porting applications to other platforms easily.

This ISO standard talk is bulls***, Microsoft has unlimited resources if compared to any other company. BTW, this game is an old one, it's called "embrace, extend and extinguish", but instead of "enhancing" someone else's technology for killing them, they "enhance" their own for keeping any competitor away.

Playing "catch up" with Microsoft? Good luck! :)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Which does not change the fact that it is still an ISO standard, and does not imply in any way the it is a "MS owned" language. Granted, Microsoft may have the best compiler and best support around for it, currently, but nothing is preventing that from changing.


See the answer above.

Quote:
Original post by jpetrie
If you write code in any language that is not standard compliant because you've utilized a compiler-specific extension, that's really your fault, not the fault of the compiler writer.


It's not about the compiler, it's about the API! Probably you are a C++ developer, you just don't get the value behind a standard (and big) API.

Quote:
Original post by jpetrie
To contribute to the discussion at hand:
C# and the .NET framework are amazing tools for rapid, robust tool development. Studios who don't adopt them for their tools departments in favor of continuing to maintain legacy C++ tools code will eventually suffer slower tool development turnaround and slower development processes in general due to the tool development turnaround time. Tools are very important to the development process and its critical that they don't go underestimated.


And what does it have to do with what I said? And as far as I know there are many better alternatives than Visual Studio, that wouldn't keep you locked with Microsoft (rebuy your software every 2 years, forget any backward compatibility, etc).

0

Share this post


Link to post
Share on other sites
Quote:
Original post by Arild Fines
Apart from small, relatively irrelevant, inconsistencies, the C# compiler is compliant.


Do you develop softwares from scratch, with zero API? Just a reality check.

Quote:
Original post by Arild Fines
Ah yes, so linux distributions shouldn't offer things like GTK, QT etc since they are not covered by an ISO standard?


No, there should be a standard API for the platform. Extra stuff is extra stuff, i.e., something else you use if you want to.

The point is you can't get a Visual Studio project, open it on Linux and simply run it. For doing that you need to be "extra-careful" because there're no guarantees about the APIs (the ISO doesn't cover that).
0

Share this post


Link to post
Share on other sites
Quote:

The point is you can't get a Visual Studio project, open it on Linux and simply run it. For doing that you need to be "extra-careful" because there're no guarantees about the APIs (the ISO doesn't cover that).


Well...yeah. You can't create a project in Ajuta, open it on Windos and simply run it. Nor can you take a project from xCode, open it on Windows or Linux and simply run it (xCode is a Mac OS X IDE, just in case). I fail to see what point you are trying to make. It's seems you've shifted from arguing that the language is not platform agnostic (it is), to a specific toolset is not platform agnostic (in which case you are correct but the converse is also true, as I just mentioned).

Quote:

It's not about the compiler, it's about the API! Probably you are a C++ developer, you just don't get the value behind a standard (and big) API.

C++ has a big, standard library, so yes, I understand its value. And while I do develop with C++, I also use C# and other languages. I also understand that it is not the job of the ISO standard committee or, neccessarily, a specific company (viz., Microsoft) to define a standard API along with the language that covers all possible aspects of development you could do with the language (such as interface with windowing systems for a particular OS).

Quote:

And as far as I know there are many better alternatives than Visual Studio, that wouldn't keep you locked with Microsoft (rebuy your software every 2 years, forget any backward compatibility, etc).

For C#, I don't know of any for Windows, so in this case you almost have a valid point. But as far as C++ goes, I've had VS2003 for more than two years, now, and before that owned VC++6 for quite a while. I have not yet purchased VS2005 and I currently see no pressing need to. Back when VC++6 was around there were better alternatives in IDEs, but now I prefer the VS IDE to anything else. This is just personal preference, of course. But I have not had any problems with backwards compatibility with my project files, or the code itself.

I'm curious what problems you have had that make you say that? Or are you just jumping on the "Microsoft is evil" bandwagon without any actual relevant experience? Microsoft makes some bad decisions and turns out some poor products, but Visual Studio is not one of them.

Quote:

And what does it have to do with what I said?

It has nothing to do with what you said, I was trying to contribute to the OP's original question before this got too off-topic.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Well...yeah. You can't create a project in Ajuta, open it on Windos and simply run it. Nor can you take a project from xCode, open it on Windows or Linux and simply run it (xCode is a Mac OS X IDE, just in case). I fail to see what point you are trying to make. It's seems you've shifted from arguing that the language is not platform agnostic (it is), to a specific toolset is not platform agnostic (in which case you are correct but the converse is also true, as I just mentioned).


Developers need a set of tools to work. These tools include MORE than just the compiler. If the API is not compatible the whole thing won't be portable!! It doesn't matter if you have a version produced by some other company if anything I develop using Microsoft's implementation won't work in any of the competitor's tools.

I'm not talking about extensions to compilers, I'm talking about the APIs. If they aren't there then:

a) you are dead;
b) or you'll have to work around it (extra $$ in development hours, higher maintanability costs because of different code bases, etc.);

I believe this ISO thing it's just another plan to lock people in Windows platform. It's not really for creating an ecology for it, it exists more for marketing people to say "but it's an ISO standard!... it has implementations in other platforms!" when someone says Microsoft owns it.

Other languages and platforms do have standard APIs and tools that run on several platforms. And yes, it's possible to write something on Windows open it on Linux and just run it.

Quote:
Original post by jpetrie
C++ has a big, standard library, so yes, I understand its value. And while I do develop with C++, I also use C# and other languages. I also understand that it is not the job of the ISO standard committee or, neccessarily, a specific company (viz., Microsoft) to define a standard API along with the language that covers all possible aspects of development you could do with the language (such as interface with windowing systems for a particular OS).


I think the problem with C++ developers is that they use the OS as the "platform", so they can't imagine having a common platform above the OS. The API is a vital part of modern software development, you just don't expect people to write everything from scratch.

If I am unable to write a program in Microsoft's C# and run it on Linux the whole portability talk is gone. And for that you would need to have a set of core APIs, at least, found everywhere for the common tasks including db access, window management, etc.

Now, what's the point of an "ISO standard" if you are going to be locked in Windows and with Microsoft forever and ever? That's why Microsoft owns it.
0

Share this post


Link to post
Share on other sites
Quote:

Developers need a set of tools to work. These tools include MORE than just the compiler. If the API is not compatible the whole thing won't be portable!! It doesn't matter if you have a version produced by some other company if anything I develop using Microsoft's implementation won't work in any of the competitor's tools.


Well this is why you need to make intelligent decisions at the start of a project; if you know cross-platform capability will, or might eventually, be a requirement don't select D3D for your rendering API; things along those lines.

Maybe we're just having a discussion with the same words but we're both thinking about different actual things, but it really seems to me your advocating that *everything* should cross-platform and compatible with everything else, which is really just an unreasonable expectation.

If you are going to use C#, find a different windowing API than Windows Forms, which is obviously a Windows specific API. Find a different API than the .NET framework, which is SUPPOSED to be cross-platform (but Mono is kinda, well... not quite there yet). For C#, maybe there are not so many choices yet, but C#'s is a relatively young language yet, especially compared to C++. I don't think C# (and the available C# APIs) are in quite dire straits as Objective-C (and its available APIs). Objective-C is older than C# (around since '86 or so) and its still basically limited to OpenStep and Cocoa on OS X. I don't think its really fair to accuse Microsoft of anything malicious with regard to C#, given that.

Quote:

I think the problem with C++ developers is that they use the OS as the "platform", so they can't imagine having a common platform above the OS. The API is a vital part of modern software development, you just don't expect people to write everything from scratch.


Of course not, but I don't expect every API to meet my exacting needs, either. If I needed to access graphics hardware in a cross-platform manner I'd make use of OpenGL, not D3D.

Quote:

Now, what's the point of an "ISO standard" if you are going to be locked in Windows and with Microsoft forever and ever? That's why Microsoft owns it.

Once again, it's not Microsoft's fault. I don't fault Sony for not making their PS3 API's work on xBox 360 hardware.

Quote:

I'm not talking about extensions to compilers, I'm talking about the APIs. If they aren't there then:

a) you are dead;
b) or you'll have to work around it (extra $$ in development hours, higher maintanability costs because of different code bases, etc.);


Again, this all boils down to thinking ahead and picking the right tool for the job. C#'s lack of strong cross-platform windowing API support, for example, is classified as a risk. While Mono may or may not end up not sucking, and somebody else may come along and provide a cross-platform API with the same power and ease of use as Windows Forms, its possible that it won't happen and may be effectively stuck, as you've said. But if that risk is critical enough, you need to select a different tool (in this case a different language) that provides what you want.

If you buy a hammer from a toolsmith, you can't fault him for not selling you the shovel that you actually wanted, unless he had no shovels in stock. In which case you should have gone to a different toolsmith.
0

Share this post


Link to post
Share on other sites
C++ is currently used more today, but it *is* changing.

I personally don't think C++ will stay ahead for long. The main reason for that is the complete lack of language support for concurrency and the robustness problems that comes with writing languages in unsafe languages. I wouldn't say C# is necessarily the best candidate for "the next games programming language" but it seems quite clear to me that all signs point towards getting rid of C++ and starting fresh without all that messy legacy.

So, I would say that you should use C#, but be very aware that the language you use isn't something which isn't going to change. You should try to learn many new languages to broaden your horizon. But I wouldn't recommend C++, you'll just spend far too much time chasing down bugs and writing test cases -- it's just not worth the hassle if you don't have a really good reason for doing it.

Regarding the discussion on the supposed non-compliance of MS C# compiler and any portabilyt concerns that comes with that. I won't get into it, but if anyone is using *that* as an argument to use C++ instead, they really need to try porting a major C++ project sometime. As far as I know there doesn't even exist a single fully-working C++ compiler yet (they all just do subsets because the language is so cluttered and big that nobody has managed to implement a compiler for it yet - the most common omission is probably "export typename"), and the half-finished implementations that exist rarely agree on the finer points of the language.
0

Share this post


Link to post
Share on other sites
is it possible to use c# on the ps3, if not then u would see the big commericial companies using c# in their games for 5 years (at least)
0

Share this post


Link to post
Share on other sites
I was pretty hot on Java for a while, but then had to do a few class projects in C++ and started to appreciate it and its power more, not to mention the substantial amount of code resources avaliable.

I considered C# for a while, but then decided that the features I liked the most were also in Java, and it shared some of the same issues that turned me off. The fact that Mono isn't quite "there" yet on other platforms the same way Sun Java is, didn't help convince me to switch yet.

However, now that I'm back to using "unmanaged" C++, I'm considering trying C++/CLR. If I had time, I might look more into it.
0

Share this post


Link to post
Share on other sites
I like C++ becuase its more powerfull and better supported. Its preety annoying when people say things like C++ isn't safe and it is hard and evil. Sure you can make memmory leaks, if you don't know what you are doing, but a simple garbage collection system isn't hard to make, and it can be customized more. To the OP, C++ is at the top, but C# is being used a lot more, mostly by hobbyists from what I can see(I use both, they feel the same to me... all languages do)
0

Share this post


Link to post
Share on other sites
this is why i think c# is better for most programing projects:

- much faster to write. c++ syntax is so extremely redundant. in every header you have to write #ifndef HEADER #define HEADER... then you also have to write every function declaration twice. one for the header, and one for the implementation. this sucks.

- c# might be even more cross-platform than c++. at least for a hobby game developer. from what i have heard, you cant develop for consoles like ps3 with c++ either, as you need some sdk for it and maybe some special hardware.
when writing a non-gui c# program, you write it on windows, and its quite sure that it will run on linux without any modification. you wont even have to recompile.

- on linux its quite nice, that you can distribute .net programs without having to care about which distribution the user has. you dont have to care which version libc is. i think its possible to do this with c++, too, but i have seen many programs that cause problems with it.

i currently see some disadvantages, too:
- mono's performance seams to be bad on some code.(but most time it is ok)
- lack of a standard gui. you can use gtk# though and winforms support gets better on mono, so it will be quite usable soon i guess. but if you just want a cross-platform gui app, java might be better.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Marius
Nomatter how will be... allways "C is faster than C++ and C++ is faster than C#/Java".

I think this will not always be true. Vista will used a managed code base and so C# and C++(managed) will run faster than C and C++. (Although I am unable to find it, I am sure I have read this in a thread on this board.)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Surg
Sure you can make memmory leaks, if you don't know what you are doing, but a simple garbage collection system isn't hard to make, and it can be customized more.


I find this comment to be offensive on so many levels. First of all it's quite arrogant. You're basically saying "yeah it's easier to make misstakes in C++, but I'm smart enough to never make misstakes". Here's a hint for you: No you're not. Nobody's smart enough to never make misstakes. You may make fewer of them in a given time-frame, but that doesn't mean you wouldn't benefit just as much as a complete moron (relatively speaking) from features which help reduce errors.

Managed memory is The Right Thing for the future. Whether it's by garbage collection, region inference or any technique not invented yet. Manual memory managed is inefficient, unproductive and unsafe, it should be phased out as soon as possible. Period.

The second part of your comment is just inaccurate. No, you can not write a garbage collection system in C++. Consider the following code


MyObj* pObj = new MyObj();
int p = reinterpret_cast<int>(pObj);
// .. much later ..
MyObj* newpObj = reinterpret_cast<MyObj*>(p);




What happens if a GC occurs in between theses two code snippets? The run-time system has no way of knowing that you are actually holding a "pointer" (by means of an int) to the MyObj object and may delete it, or it may simply relocate it, only updating the adress in pObj but not p (since p is an int, not a pointer).

You can implement crude and inefficient reference counting schemes (which can't handle cyclic structures) and non-relocatng mark-and-sweep garbage collection (which fragments the memory and is really slow), but you can not do anything which rivals the sophistication and speed of the garbage collection in .Net or Java.

Oh, and just to let you know, heap allocation/deallocation is usually about 20x faster in C#/Java compared to C++. Just in case you were thinking about bringing up a ficticious performance argument (you can easily create a quick-n-dirty benchmark to test this yourself). C++ is often faster, but mostly due to managed languages having more runtime checks (which can be turned off for select parts of the program in C#) and the fact that C++ programs typically allocate on the stack more often, but not because managed memory is somehow inherently inefficient (it isn't, it's actually faster in most cases).

[Edited by - sebastiansylvan on May 6, 2006 3:01:31 PM]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0