Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

normalme

why is c# better for game development than c++(you can be vague)

This topic is 5284 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

quote:
Original post by joelmartinez
You'd have to write a memory manager if you were using C++ :-P

and as far as programming to what micro$oft wants ... I'll have to concede to the fact that if you want to mass market your game, .NET shouldn't be your platform of choice for now. Eventually you'll be able to target both Windows (Longhorn) and XBox.

If however, you know your game probably won't be picked up by EA, I think .NET is a perfectly viable target for your development efforts. Despite what you may have heard (because you obviously haven't experienced it for yourself), C# isn't that slow. I use it every day.

Oh, and you'd be a fool to try and write game tools/editors in C++, .NET or Java (if you're so inclined) is the way to go IMHO.


Yeah, but that way, it does want you want it to do. More that just garbage collecting.

If I want to mass maket my game, then I would have to write it in C/C++ because everything (including micro$oft) runs it. Writting it in C# would just make it micro$oft only.

And I do use .NET. I actually think .NET C++ compiler very good. And half of my projects are indeed C#. That is why I said it is slow (because you obviously haven't got a clue what you're saying). Or are you implying that something running on a virtual machine runs actually faster than code running on the machine itself?!

C++ -> machine
C## -> virtual machine -> machine

Well, I really can't see how the virtual machine doesn't make everything slower...
Try writting fast recursion functions, fast BSPs, etc in C#.... And good luck with that...



[edited by - SigmaGL on January 7, 2004 10:53:02 PM]

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by SigmaGL
Yeah, but that way, it does want you want it to do. More that just garbage collecting.


true, but the GC already does everything I need it to do
quote:

If I want to mass maket my game, then I would have to write it in C/C++ because everything (including micro$oft) runs it. Writting it in C# would just make it micro$oft only.
And this is a point that I''d like to stress, for those who do not wish to mass market their game, C++ is (potentially) overkill. Again, I already conceded to the fact that you won''t find any cross platform development with .NET so you don''t have to preach to me there. You''re assuming that everyone has the same requirements ... cross platform availability.

It''s about your target audience. If I''m learning how to make games, and all my friends have windows, .NET is a great choice. If I''m trying to get some tech demos ready for my portfolio, .NET is a great choice. If all I want to write is a small indie title and I know will only be bought by grandma and grandpa AOL, .NET is a great choice.

If I want to write a game and try to sell the concept to EA, .NET is not such a great choice because said game will have to run on PC, Linux, Gamecube, XBox, PS2, etc..



Joel Martinez
http://www.codecube.net/

Share this post


Link to post
Share on other sites
quote:
Original post by SigmaGL
What?! C# is like Java, so it runs on a virtual machine. So, for Windows calls, it may be (perhaps) faster. But not for everything else.



Why do people continue to post on topics they have NO KNOWLEDGE ABOUT!

C# DOES NOT run on a virtual machine. It is compiled at runtime and executes normally, maybe you need to read up some? Please note that on Windows Longhorn and all future Microsoft operating systems, managed code and .NET are "native" to the platform, and your native code that you claim to be so fast right now will be sitting on top of that being slowed down due to .NET and security regs.

quote:

You can''t write a driver, memory manager, etc in C# because the language is not made to run exacly on the computer, but on a virtual machine on top of that. That is the reason for the garbage collector, etc.



Wrong again. Sure you won''t run drivers and memory managers in C#, that is what C++ is made for... lower level code that can be used in most situations on any platform. Also please note again that C# does not run on a virtual machine, wherever you got this information from is wrong. Also the reason for the garbage collector is for security reasons, you should notice that over 90% of security problems today are from memory leaks and bad memory programming.


quote:

Of course that, for windows stuff, C# is more productive because it encapsulates lot''s of stuff. But that comes with a price. There are some things (more obscure ones) that aren''t available to C# even in programming to windows.



encapsulates lot''s of stuff? umm maybe you should tell us what because that makes no sense at all.

Also what is this price you are speaking of? The only one I know of is a 3-5% performance loss in SOME cases.

Also what are these "obscure things that aren''t available to C# even in programming windows"? I would REALLY LOVE TO KNOW considering C# is the forefront language for programming on the Longhorn OS and I believe 80% of the common is even written in C#.


quote:

And if speed is important, then you have to write it in asm. But of course that, in a huge game like know, only 0.5% of it (the important functions) is written in asm. But in C# it would be the asm of the virtual machine, that then would run on the machine itself...



You really have no idea what you are talking about do you? You can use NATIVE ASM, NATIVE C++, OR IL ASM with C#. You can also use your own memory management and pointers with C#, you just have to denote that you are in unsafe mode.


Now I don''t mean to make you look stupid.. but you really have no idea what you are talking about when mentioning C#. You haven''t talked about ANY of the languages features, pros, or cons. All you have said are a bunch of made up ideas that I have no idea what you are talking about.

Also FYI the .NET framework is a beta test on 2000/XP and you should note that. It is the CORE SYSTEM that Windows Longhorn and future OS''s use, native code is now the one that has to pass through security channels, etc on top of the OS. The only thing native code will be good for on Longhorn are memory managers, drivers, etc like you said. Otherwise boxes pop up for the user telling them "THIS APPLICATION IS DEEMED UNSAFE CLICK HERE TO SHUT THE APPLICATION DOWN OR CLICK HERE TO ACCEPT".. and right there over 80% of users are going to shut it down =]



Share this post


Link to post
Share on other sites
quote:
I already conceded to the fact that you won't find any cross platform development with .NET so you don't have to preach to me there. You're assuming that everyone has the same requirements ... cross platform availability.



Sorry but you are wrong as well. The Mono project (Recently purchased and pushed forward by Novell) is a full .NET suite for Linux. There are also many others working on implementations for Apple and BSD. So currently .NET is available on all Microsoft platforms as well as Linux platforms, and will soon be available for more.

Please note that C# is NOT owned by Microsoft. The standard was sent in by Intel, Microsoft, and HP and is just that.. a standard. Microsoft's version of C# is simply an implementation of that standard.

Also you should look up the licence on the CLR etc, and you will see that, yes, .NET will be fully cross platform with the only exception being that Nintendo and Sony "may" not pick it up as an option to offer developers.

[edited by - Imperil on January 7, 2004 11:19:43 PM]

Share this post


Link to post
Share on other sites
I personally truly doubt that .NET will ever be really cross platform (though I would 100% love love love it). Here's why, C# is a standard, the CLR is a standard, the base class library is not, ASP.NET is not. Everything in the System.* namespace is 100% proprietary to Microsoft.

I really truly hope that I'm wrong, but I see the hammer dropping on mono at some point in the near future. again, let me reinforce my position, I hope that does not happen because I would love to see truly x-platform .net, but I don't think it'll ever come to a point where the development of mono is stable enough for businesses to trust it.

--edit: and if they don't get squished for the system namespace, I know for a fact that they're not happy with mono's asp.net implementation. I run the Orlando .NET User Group and got a chance to chat with Peter Plamondon from Microsoft (I forget his exact title, but it was relatively bigwigish in relation to .NET). He did express some distaste towards mono's asp.net.

Joel Martinez
http://www.codecube.net/

[edited by - joelmartinez on January 7, 2004 11:39:52 PM]

Share this post


Link to post
Share on other sites
I should first start off saying that most people clasify me as a MS zelot. I Love everything Microsoft, i love C#, i love .net. then i noticed a few things that everyone pointed out a long time ago.(void (CALLBACK*RantBegins)(void *data){) right after .net came out i got it and tryed to use c# to do D3D with the VB com interfaces, it was bad, performance flexability all terrible. Then out came the anouncement that we would get Managed DX, i got on the non developer Beta and used the runtime dlls to write apps, you might still be able to find postings and web sites that tell how to do this. But anyway i got the SDK the day it was available i loved it used it non stop for at least 2 weeks(i think it might have been the reason i almost failed US history). I slowed down but kept working on it avidly until mid begining of this year, i had already seen the YANN screenshots but i had dismissed my puny skills as to incompetent to ever hope to achive visual quality like that, now i looked again as a result of some posting on this board, but this time i said to myself, "You can do this". So i tryed desperatly to get something like it, something even resembleing it, but i gave up when i pressed ctrl-alt-del and looked at the memory/processor usage, it was something of a letdown. I was crushed, my mem use was stageringly high, i spent a lot of time trying to cut wherever i could but .net just insited on adding 20-30 megs of extra mem requirements. Again for some unexplainable reason I looked up Win32 ASM programming with COM/Direct3D it took hold and i cursed my self for ever trying to do serious programming with c#. then i cursed myself for trying to use ASM it was really slow going after all. (LIGHTBULB TURNS ON) Gamedev has an article on a compiler called VectorC only trouble is, is it only likes Pure C not c++ so i started using it, this is about the time i stoped curseing myself and started programming again, HAHAAHHa i love VectorC so much faster than anything else i have ever seen, so much smaller to. Anyway the point im trying to make here is that THIS THREAD SHOULD HAVE BEEN CLOSED THE SECOND IT WAS STARTED, TAKE A LOOK AROUND THERE ARE PLENTY OF THESE THREADS EVERYWHERE THIS BELONGS IN THE LOUNGE IT IS A FLAME WAR I HAVE PERSONALY POSTED IN MOST OF SAID FLAME WARS SO I AM NOT INOCENT, BUT REALLY PEOPLE ARE WE JSUT TALKING TO TALK, NONE OF US ARE EVER GOING TO CHANGE OUR OPINIONS BECOUSE OF WHAT IS SAID HERE, MY OPINION CHANGED BECOUSE OF SCREEN SHOTS NOT WORDS, TAKE A LESSON FROM YANN MAKE SCREEN SHOTS NOT FLAME WARS.(}) ok im done now.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
''\r'' ''\n''

Share this post


Link to post
Share on other sites
quote:
Original post by Imperil

Why do people continue to post on topics they have NO KNOWLEDGE ABOUT!




Welcome to the Internet!

Share this post


Link to post
Share on other sites

The whole point of wich is better/faster for game development is pointless if you only compare C++, C# and Java. For speed and a language that's simple to code in, C is best, for raw speed alone optimized C code with selected time critical innner loops in hand optimized ASM will always be the best option. Writing everything in ASM is what people used to do. we stopped that years ago, not because cpu speeds increased, but because C compilers can produce equally good ASM in most normal cases now, so there is no need. Unfortnately todays fast CPU's have spoiled us, and turning a lot of people into bad coders, simply because they don't need to be even halfway good any more.
That's why we have 75 Mb pong clones that need 2.4 Ghz machines with GF4 cards to run...


[edited by - Bad Maniac on January 8, 2004 7:06:06 AM]

Share this post


Link to post
Share on other sites
Game Development is about making money, most of the money comes from PS2 sales, try getting a C# compiler for PS2.

Share this post


Link to post
Share on other sites

This topic is 5284 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!