Sign in to follow this  
Chris81

VS .NET 2005 impact on game programming?

Recommended Posts

Hello, I just received my VS .NET 2005 Beta 2 and have been playing around with it. I have been reading and trying out all the new C++ language features, and it's almost like a totally new language!! Things like: gcnew, ^ pointer, % tracking references, generic classes, generic functions in generic classes, interface keyword, abstract and sealed keywords, properties, delegate's, and events, finally keyword to go with try/catch, for each, reflection, the .net framework with all kinds of string, date, etc. api's on and on...wow Do you think all this will have an impact on game programming? The features would make everything so much simpler, but would it be too costly in speed? Thanks.

Share this post


Link to post
Share on other sites
Many of them are C++ .NET features not available in unmanaged code. Some of them are Microsoft-specific. Some of them are mis-features and shouldn't be used anyway.

Personally I can't see any real reason to use C++ .NET (Maybe there is one, but I don't know what it is) - you may as well just use C#

And as far as games are concerned - no, these are not ground-breaking things, they don't make the process of making a game ANY different. Adding a few new minor features to the language doesn't change anything about how things are done.

Mark

Share this post


Link to post
Share on other sites
I've used C++ .NET for various tools in my office instead of C# (which I would prefer to use) because that way I can directly include game side .H files for enums, etc. Duplicating those enums or defines in C# apps can be a nasty headache keeping them in sync.

Share this post


Link to post
Share on other sites
Most of that is only applicable in "Managed C++", and that basically _is_ a new language. =)

I don't think it will have an impact on game programming. It is possible that some windows-only-games will use those features, but that's hardly an impact.

Share this post


Link to post
Share on other sites
Quote:
I don't think it will have an impact on game programming. It is possible that some windows-only-games will use those features, but that's hardly an impact.


Well, Windows and XBOX. I could see a lot of games being released for those two platforms only, and still have a huge market. How many mac only gamers are there? Relatively very few..., not too many cross-platform games either, at least that I know of.

Quote:
And as far as games are concerned - no, these are not ground-breaking things, they don't make the process of making a game ANY different. Adding a few new minor features to the language doesn't change anything about how things are done.


And it wouldn't change the PROCESS of making games, it would just make it easier. Especially the managed memory part. And utility stuff like String::Format so you dont have to rewrite all the redundant functions yourself.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
For heaven's sake, when will people realize that "managed memory" is not an improvement but rather a step back?!

Share this post


Link to post
Share on other sites
Quote:
Original post by Chris81
Quote:
I don't think it will have an impact on game programming. It is possible that some windows-only-games will use those features, but that's hardly an impact.


Well, Windows and XBOX. I could see a lot of games being released for those two platforms only, and still have a huge market. How many mac only gamers are there? Relatively very few..., not too many cross-platform games either, at least that I know of.

There's no .NET runtime for the Xbox and nor is there ever likely to be now. Perhaps the Xbox 360 will get the .NET runtime at some point but it doesn't have it at the moment. There are a lot of cross platform games if you include the consoles - plenty of titles ship on at least Xbox and PS2, with many also shipping on GC and PC as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
For heaven's sake, when will people realize that "managed memory" is not an improvement but rather a step back?!


Worst post ever!!

Cheers
Chris

Share this post


Link to post
Share on other sites
He has a point though, however obliquely made. If you are very concerned about memory management then you probably shouldn't be using C++ anyway, as there are plenty of other great languages that offer such features but without tacking them crudely on as an afterthought.

Share this post


Link to post
Share on other sites
Well, the memory needs to be managed for .NET compatability.

The reason for C++, is afterall, simply a compatability thing to give developers a head start in using .NET. I don't think anyone in their right mind would intentionally go out and use managed C++ when they could use C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
Well, the memory needs to be managed for .NET compatability.

The reason for C++, is afterall, simply a compatability thing to give developers a head start in using .NET. I don't think anyone in their right mind would intentionally go out and use managed C++ when they could use C#.


From what I've read, MS views .net programmers in 3 groups:
Mortimer: the business guy who knows a bit vb.net 'cos it's sometimes useful in his excel sheets. He can access about 80-90% of .Net functionality.
Elvis: a mid-level developer who uses C# 'cos he just wants to get the job done as quickly as possible. He can access about 95% of .Net functionality.
Einstein: the serious systems C++ guy who wants total control. He can access the whole of .net even obscure things.

Those aren't my names, BTW. I can't find it now, but some serious MS guy (might've been Herb Sutter) claimed that C++ is here to stay for serious developers.

Quote:
Original post by Anonymous muppet
For heaven's sake, when will people realize that "managed memory" is not an improvement but rather a step back?!


Care to back that up with something resembling a reasonable arguement? Managed memory may not be suitable for many things (games, real-time stuff, etc) but only an idiot would describe it as a "step back". It's just a step forward in a particular direction.

Share this post


Link to post
Share on other sites
Quote:
Original post by ChaosEngine
From what I've read, MS views .net programmers in 3 groups:
Mortimer: the business guy who knows a bit vb.net 'cos it's sometimes useful in his excel sheets. He can access about 80-90% of .Net functionality.
Elvis: a mid-level developer who uses C# 'cos he just wants to get the job done as quickly as possible. He can access about 95% of .Net functionality.
Einstein: the serious systems C++ guy who wants total control. He can access the whole of .net even obscure things.

Managed C++ can access more functionality than C#?

I don't know, but I find that hard to believe.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
Quote:
Original post by ChaosEngine
From what I've read, MS views .net programmers in 3 groups:
Mortimer: the business guy who knows a bit vb.net 'cos it's sometimes useful in his excel sheets. He can access about 80-90% of .Net functionality.
Elvis: a mid-level developer who uses C# 'cos he just wants to get the job done as quickly as possible. He can access about 95% of .Net functionality.
Einstein: the serious systems C++ guy who wants total control. He can access the whole of .net even obscure things.

Managed C++ can access more functionality than C#?

I don't know, but I find that hard to believe.


Agreed, but that's what I read. I'm sorry I can't find the article again.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
Quote:
Original post by ChaosEngine
From what I've read, MS views .net programmers in 3 groups:
Mortimer: the business guy who knows a bit vb.net 'cos it's sometimes useful in his excel sheets. He can access about 80-90% of .Net functionality.
Elvis: a mid-level developer who uses C# 'cos he just wants to get the job done as quickly as possible. He can access about 95% of .Net functionality.
Einstein: the serious systems C++ guy who wants total control. He can access the whole of .net even obscure things.

Managed C++ can access more functionality than C#?

I don't know, but I find that hard to believe.

Managed C++ in VS 2005 is a very different beast from what is in 2003. MS recognised that the 2003 managed C++ was a mess and pretty much threw it all out and redesigned it from scratch for 2005. The 2005 version is actually quite well designed from what I've seen and a huge improvement over 2003. I've seen the quote saying it allows access to more functionality than C# as well and they've been saying that whereas 2003 was not a great choice for .NET programming, 2005 is a very good choice, particularly for experienced C++ programmers.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
He has a point though, however obliquely made. If you are very concerned about memory management then you probably shouldn't be using C++ anyway, as there are plenty of other great languages that offer such features but without tacking them crudely on as an afterthought.

I don't mean any offence at all so please don't take it that way. But go tell that to the fact over 90% of bugs and security problems in applications today are memory related errors. I do agree with your point that if you can't control memory you shouldn't be using C++, but unfortunately a lot of bad programmers do. It's unfortunate that the majority of programmers need managed memory even if they hate it, especially when you look at the stats.

Also the language usually isn't even referred to as managed C++ anymore because it was such a horrid beast in 1.0/1.1. Usually it is called CLI / C++ and it is a much better implementation than the managed c++ of the 1.0 series. CLI / C++ does in fact have more functionality than the C# language and also is better performing and is set to be the top performing .NET language.

Quote:

I don't think anyone in their right mind would intentionally go out and use managed C++ when they could use C#.

I have actually used it a lot, although for different purposes than I am guessing you were implying. I have unmanaged C++ libraries that I wrap with managed C++ and use with C# and it has only gotten better with the new 2.0 versions.

As for the original poster's question I really don't think it will have that large of an impact on the majority of game development. It is great for rapid development on the PC, even just having you existing unmanaged C++ engine, wrapping it in managed C++ and writing your game/scripting in C#. This only applies to the PC at the current time though, and right now game development leans heavily towards consoles and will start doing so even more now that the new consoles have even more power than the top PCs and have a gaurenteed architecture to work with. If the 360 supports the CLR I can see the managed languages being used more in gaming simply because of quickly writing games (that you can do with an existing engine) for both PC / XBox 360. But the majority will still be done in unmanaged C++ for compatibility across platforms.

I do see the indie game development community moving closer to .NET though, as it allows them to compete more with the big studios due to cut down development time and that fact that indies target PC due to not being able to secure console licensing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Saruman
Quote:
Original post by Kylotan
He has a point though, however obliquely made. If you are very concerned about memory management then you probably shouldn't be using C++ anyway, as there are plenty of other great languages that offer such features but without tacking them crudely on as an afterthought.

I don't mean any offence at all so please don't take it that way. But go tell that to the fact over 90% of bugs and security problems in applications today are memory related errors. I do agree with your point that if you can't control memory you shouldn't be using C++, but unfortunately a lot of bad programmers do. It's unfortunate that the majority of programmers need managed memory even if they hate it, especially when you look at the stats.


Yeah, but my point there is that really they should use a different language. Adding managed memory to C++ applications doesn't fix these bugs that poor programming causes, it just changes their nature.

In my opinion the only reason for C++'s existence is because it's about as high level as you can go without losing control of the low level detail. If you're using it, it's because you need that low level control, and taking it away only serves to give people a false sense of security.

Obviously a specific exception exists if, for some reason, you need .NET code with uncompromised performance. I doubt that will be a common requirement however.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
In my opinion the only reason for C++'s existence is because it's about as high level as you can go without losing control of the low level detail. If you're using it, it's because you need that low level control, and taking it away only serves to give people a false sense of security.


Not sure I'd agree with that. 90% of the time in C++, I don't want to go that low-level. However the fact that it's possible to do the other 10% without hassles makes it my language of choice. But I'll be thankful for being spared some work most of the time.

For the record, I think C++/CLI looks pretty damn cool.

Share this post


Link to post
Share on other sites
I totally agree with the 90%/10% thing as well. This is the reason I have an engine in unmanaged C++, wrapped in managed C++, and write the actual game in C#. Because for 90% of the codebase the speed of C# is even more than I need.

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