Jump to content

  • Log In with Google      Sign In   
  • Create Account

Who is using C# to write games?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
96 replies to this topic

#1 Telamon   Members   -  Reputation: 157

Like
Likes
Like

Posted 08 September 2003 - 09:29 AM

I took a class in C# last Spring and it is rapidly becoming my language of choice for all my projects. Previously, I''ve been using C++ for writing real code, or Visual Basic when I needed to do fancy user interfaces (MFC is garbage). And while I know Java, I''ve never considered it to be a real development tool - though I know lots and lots of serious developers use it. I used it this summer working on IBM''s grid services toolkit. The idea of using Java for realtime games is laughable. And while there are lots of Java-to-machine code compilers the idea seems to have fizzled out years ago (Jikes is the last serious attempt I''ve seen that''s been made freely available). With respect to execution strategy, I like to think of C# as Java done right. Say what you want about Microsoft''s Consumate Evil, their dev tools are top notch. At the moment I''m using C# to clone the game Tetris Attack (http://www.tetrisattack.net) from the SNES. I''ve never had a project come together so fast. I had a working prototype up in a couple of hours. I''ve never had a bug in C# that took longer than two minutes to fix. It''s perhaps a more RAD language than VB. I will complain about the quality of the Managed DirectX9 Docs - they are absolute crap. But, all in all, my project is coming together nicely. I was wondering whether anyone else out there had discovered it''s possible to throw games together really fast with C#, I don''t really see many posts about it. I was also wondering if anyone knew of any websites devoted to C# game programming issues. Maybe the language is too new to have much of a following online - it''s difficult to find information on it. I''d also be interested in finding any game-related benchmarks between C# vs. C/C++. The DirectX people at Microsoft are claiming that Managed DirectX is 98% as fast in C# as regular DirectX is from C++. This is a small price to pay to cut COM, reference counts, and other DX nastiness out of the picture. I''ll get off my C# soapbox now...

Sponsor:

#2 jonnii   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 09:37 AM

I''ve recently got into doing C# game programming after doing a few apps in it. The language i work with most is java as i do a lot of server side programming, for which Java is ideal.

C# was easy to pick up, and all my dx knowledge from C++ has been easily translated to it.

d3d9 docs suck tho.

-jonnii
=========
jon@voodooextreme.com
www.voodooextreme.com

#3 jonnii   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 09:39 AM

I''ve recently got into doing C# game programming after doing a few apps in it. The language i work with most is java as i do a lot of server side programming, for which Java is ideal.

C# was easy to pick up, and all my dx knowledge from C++ has been easily translated to it.

d3d9 docs suck tho.

-jonnii
=========
jon@voodooextreme.com
www.voodooextreme.com

#4 dead_roses   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 10:14 AM

I have been exploring C# for tools, not the acutal game engine though. I just don''t like state machines(which I think C# has feel free to correct me if im wrong). Some people say it runs very fast, but I still preffer my unmanaged C/C++ code. However I also want to spend more time on learning skills that will allow me to develope for more platforms than just windows, without the .net framwork.

#5 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 08 September 2003 - 10:49 AM

quote:
Original post by dead_roses
I just don''t like state machines(which I think C# has feel free to correct me if im wrong).

That made no sense at all. Please elaborate on why you think C# "has a state machine".

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

#6 Tylon   Members   -  Reputation: 181

Like
Likes
Like

Posted 08 September 2003 - 12:03 PM

quote:
Original post by Arild Fines
quote:
Original post by dead_roses
I just don''t like state machines(which I think C# has feel free to correct me if im wrong).

That made no sense at all. Please elaborate on why you think C# "has a state machine".

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]


Indeed that made no sense, but I think what he means is the virtual machine.

Ive been using C# for games dev, since the time I save in development more then makes up for performance drop.
If your not aiming to write a huge revolutionary game, you do not really need the extra performance of unmanaged code. (although i guess this is subjective, maybe it isnt true for everyone?)


#7 jonnii   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 12:29 PM

There''s an old addage in object orientated programming design which is: "code to an interface, not an implementation". Being heavily object orientated with simple syntax C# is ideal for this.

Writing a framework in C# is simple and rewarding and it doesnt stop you from creating managed C++ classes to write a fast, optimised implementation.



#8 Pseudo   Members   -  Reputation: 100

Like
Likes
Like

Posted 08 September 2003 - 02:29 PM

I''ve been using C# for at least a year now and I suggest everyone gives it a try. I have several small mostly graphics related C# projects online at http://www.msu.edu/~furtwan1/

A couple things worth note:
Telamon mentioned how easy it is to track bugs. I think this is true with all of .NET as an example I found a bug in the managed version of Quake 2 (sorry lost my link, try google) and it only took about 2 minutes. This was managed C++ but the exceptions were the key to finding it. (the unmanaged version mearly crashes and closes)

Also, performance wise, I haven''t noticed much impact at all. The only exception has been when using DX9 because it must do interop. Even then 15% or so is livable with all that C# adds.

Finally, I''ve recently written a C like compiler so I know first hand how hard optimization can be. That being said, I DO in fact believe that C# performance will one day beat C++ hands down. JIT compiling is relatively young compared to pre-compiling so it may take some time before new algorithims to do agressive machine specific optimizations are developed and tested. The ability to obtain statistical information that may aid in future JIT''s is key here.

#9 Penance   Members   -  Reputation: 190

Like
Likes
Like

Posted 08 September 2003 - 02:35 PM

I am about to embark on a tetris clone in C#.

I find C# is very user-friendly. I''m adept with C++ and Java, and in some cases prefer them, but if someone said "write a program, use whatever you want" I''d choose C# most of the time just because of the great library, clean syntax, intellisense, documentation, fast compile times, and all it''s other goodies.

Dropping down to unsafe mode if i really need pointers is always an option and if i ever really need a feature from another language, I can always just export an assembly or DLL written in said language.

#10 Optikal   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 03:08 PM

I think JIT has lots of future potential, because Intel/AMD can develop plug-in JIT compilers specific to each CPU. Then a user can install the JIT compiler for their specific CPU for the CLR to use. I''m no compiler programmer (well a little, but nothing advanced) but I would expect this to allow much more aggressive optimizations than your typical non-JIT compilers allow. Add to this the option of "JIT" compiling for the specific CPU at install-time rather than run-time and I think managed code will be able to surpass unmanaged code performance before long.

#11 Telamon   Members   -  Reputation: 157

Like
Likes
Like

Posted 08 September 2003 - 03:34 PM

Wow. I was expecting a lot more responses like: "You''re writing a game in C#?! You %#^$&$^# idiot!" :-)

Actually, to set the record straight, .Net is not Windows only. The .Net framework can also run on Linux and it is possible to write C# programs for Linux. I forget the name of the group that did the port, but if you Google for it, you''ll find it easily. It''s a common misconception that .Net is completely controlled by Microsoft - it''s actually an open standard and I believe at least some parts of the package are open source. In any case, my professor for my #C class claimed that it was more free than Java is in a lot of ways, since Sun owns Java. Since he''s been on top of this .Net thing since it started, I''ll take that as fact.

#12 tortoise   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 04:32 PM

quote:
Original post by Telamon
Wow. I was expecting a lot more responses like: "You''re writing a game in C#?! You %#^$&$^# idiot!" :-)



It''s a common belief nowadays that not native equals not fast. It''s of course, a false belief, but a common one nonetheless.

quote:

It''s a common misconception that .Net is completely controlled by Microsoft - it''s actually an open standard and I believe at least some parts of the package are open source. In any case, my professor for my #C class claimed that it was more free than Java is in a lot of ways, since Sun owns Java.


Sounds like FUD to me, your professor does not know much about Java. It''s a misconception that Sun owns Java. The Java Community Process, with representatives from many major companies (not just Sun) as well as many individuals, are the true driving force behind Java and its standards. It was specially designed to make sure Sun can not hijack Java technology nor the language itself.

With that said, where do you get this idea that .NET is not owned by MS, and is meant as a standard? I''ve never heard that, not anything even remotely of the sort. Do you have any information/sources to back it up?

#13 MichaelBartman   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 04:42 PM

As per the comment related to C# and .NET being windows only, that is 100% wrong. Have you ever heard of Mono for Linux? It''s being developed as a port for C# to the Linux OS. It''s a project that is coming along nicely. I just wish I could figure out why I can''t compile it :0

The more that I learn about C#, the more that I fall in love with it. I have a few friends who are working on a game engine in C#, and I will be switching all of my projects to C#. Including my space-themed mud, and my game engine in progress.

woot for C#

Michael Bartman
CEO, Lead Programmer
Dark Omen Studios


#14 alexmoura   GDNet+   -  Reputation: 450

Like
Likes
Like

Posted 08 September 2003 - 04:55 PM

C# is an ECMA standard, and in the process of becoming an ISO one (meaning anyone can write a C# compiler without asking permission to MS) - I think (not sure though) I heard parts of the framework were also standardised although not all - I am sure the windows forms part isn''t standardized.

"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade

Alexandre Moura

#15 thona   Banned   -  Reputation: 100

Like
Likes
Like

Posted 08 September 2003 - 06:33 PM

quote:
Sounds like FUD to me, your professor does not know much about Java. It''s a misconception that Sun owns Java. The Java Community Process, with representatives from many major companies (not just Sun) as well as many individuals, are the true driving force behind Java and its standards. It was specially designed to make sure Sun can not hijack Java technology nor the language itself.



Hm. Sounds as his professor knows more about Javca than you do.

There is NO guarantee that the JCP is not changed or revioked any day by SUN. The JCP is a process, not a legal entitya, and SUN holds all copyrights and has - as the only langauge deisgner ever - enforced them to stop a competing company providing a modified version of their language (MS, to be exact).

I would NOT call this "open standard". SUN has repeatedly refused to leave the language to a standards commitee.

quote:
With that said, where do you get this idea that .NET is not owned by MS, and is meant as a standard?


Maybe he got the idea from the fact that C# as a language and part of the .NET runtime (the CLR part, actually) are an ECMA standard (which is an international standards body) and non fast track to become an ISO standard? Doing this, MS has actually released control over the language part to a much larger degree than SUN. Surely, they dont let anyone with some thousand USD play in their design process, but then - this is something they can NOT revoke (ECMA standardisation) and are bound to.

quote:
I''ve never heard that, not anything even remotely of the sort. Do you have any information/sources to back it up?


Try reading news from time to time. C# got ECMA about a year ago, if my memory serves me right. I remember a special deal that MS still has control ovrer the language design for a limited time (for them to get C# 2.0 into the standard, with generics etc., outside of the 5 year cycle), but the deal is fixed and in place and irrevocable.
Google can provide more information for you on this, LIKE:

http://www.google.de/search?q=C%23+ecma&ie=UTF-8&oe=UTF-8&hl=de&meta=

Which retuens a nice amount of results.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

#16 sysmark   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 08:35 PM

What we all need is a Java.net so you can use managed C++ code in your java apps :-)

Man that would be nice since I love both languages. But this post convinced me, I''m going to take a more indepth look at C# now. I allready read a book on it and it looked to much like Java to me to concider working with it. But the possibility to use managed C++ really appeals to me.

#17 kobingo   Members   -  Reputation: 174

Like
Likes
Like

Posted 08 September 2003 - 09:29 PM

quote:

What we all need is a Java.net so you can use managed C++ code in your java apps :-)


Well, there is J#...

#18 Mike737   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 September 2003 - 09:54 PM

quote:
Original post by thona
There is NO guarantee that the JCP is not changed or revioked any day by SUN. The JCP is a process, not a legal entitya, and SUN holds all copyrights and has - as the only langauge deisgner ever - enforced them to stop a competing company providing a modified version of their language (MS, to be exact).



Thomas knows his stuff here. Thats why MS cannot release another version of Visual J++ till 2006 as SUN took MS to court as MS added extra features to JAVA.

Supposedly this Microsofts motivation to creating C# some say.

Personally I have never dealt with C# yet, but am very keen to as I keep on hearing better and better things about the language. Especially since it is so easy to convert your JAVA code over to C#.


Extracting Patch....
Initializing Windows XP Update Path 2543663B....
Core Dumped, Now Installing Linux.....

----
Mike
Team AI: Http://members.iinet.net.au/~slyons/teamai

#19 HenryApe   Members   -  Reputation: 120

Like
Likes
Like

Posted 08 September 2003 - 10:52 PM

quote:
The idea of using Java for realtime games is laughable.

Yeah, go eat your assembly, because anything higher-level than that can't be used for realtime games (for people interested in real information on the subject, visit javagaming.org). There are actually a number of commercial games out that use Java, yet I have not seen any written in C#.

quote:
There is NO guarantee that the JCP is not changed or revioked any day by SUN.

Pure FUD from a Microsoft MVP. Does anyone actually think companies like IBM, BEA, or Oracle (who all effectively use Java today to compete with Sun!) would agree to a license completely controlled by Sun?

Come again when you see the same players use Mono to actively compete with MS in the enterprise space. While C#, the language, is a standard, the libraries are not and Microsoft could easily shoot Mono into non-existance using its patents at any time it desires (it's just waiting for one of the big players to take the bait, but unfortunately for MS, they all seem to know better than that).

quote:
Thomas knows his stuff here. Thats why MS cannot release another version of Visual J++ till 2006 as SUN took MS to court as MS added extra features to JAVA.


No, Sun took Microsoft to court because Microsoft removed features from Java (the JNI and RMI APIs) and still tried to call it Java (they're distributing a Java-copy under the name J# nowdays). Microsoft tried to sabotage Java by removing those APIs and replacing them with Microsoft's own alternatives that only worked with Windows.

Had Java been an ISO or ECMA standard, Microsoft may have once again succeeded to use its illegal desktop monopoly to lock developers and users to its proprietary solutions. The JCP has proven to be an acceptable alternative (it has also been warming up to open source implementations thanks to members such as the Apache foundation).

As game developers, you should also consider that Microsoft is your competitor. Every dollar you spend on Microsoft's products goes into the warchest that Microsoft's game studios will be able to use for their marketing against your game.

[edited by - HenryAPe on September 9, 2003 8:11:14 AM]

#20 Lidgren   Members   -  Reputation: 187

Like
Likes
Like

Posted 09 September 2003 - 12:26 AM

> Who is using C# to write games?

I am and its working wonderfully. So was java, altho i think c# has a definitive edge when it comes to game programming.


---
http://www.lidgren.net/code/game/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS