• 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.

Archived

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

Telamon

Who is using C# to write games?

96 posts in this topic

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...
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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]
0

Share this post


Link to post
Share on other sites
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?)
0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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?
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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)
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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]
0

Share this post


Link to post
Share on other sites
> 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/
0

Share this post


Link to post
Share on other sites
quote:
Original post by HenryApe
While C#, the language, is a standard, the libraries are not

Stop saying this. I have told you before that it is untrue. Get your facts straight and stop repeating lies, or you will lose all credibility.

You can find specs for the class library here: http://msdn.microsoft.com/net/ecma/

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

Share this post


Link to post
Share on other sites
"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"

Wow, so dont buy any games either guys.

And while we are at it, dont buy any Sony products, cuz they make games as well. Wouldn''t want to help competitors.

Too funny.

Dan
0

Share this post


Link to post
Share on other sites
I am using C++ right now, but I think I will learn C# as well (Once you know C/C++/Java, C# must be cake to learn). I think some of the features in C# are great. As for using Java in games, I personally wouldn''t use it because I have a lot of C++ code, but I would have no problems building most of, if not all of my tools in Java (What can I say, Swing is just so damn easy to use! I love it).
0

Share this post


Link to post
Share on other sites
does anyone remember when everyone on gamedev was like "F*CK C#, it sucks, its too slow"? my how times change.
0

Share this post


Link to post
Share on other sites
Arild, I know it must be upsetting for you that I don't *gasp* read your every post. However, you are right, I should have remembered the text adventure developers who can in fact write their games in standardized C#, or does the standard contain a GUI library too?

I know you can use third-party libraries for that, but so could you with the rest of the libraries too as long as the language is standardized.

quote:
Wow, so dont buy any games either guys.

Well, if you are developing a MMORPG, you may buy a copy of the competitors products to check them out, but you would probably try to avoid buying the whole development system or server setup from the company.

Interesting that you bring up Sony since they went with Java, rather than some Microsoft product, for its scripting in Star Wars Galaxies. You are also not likely to see C# nor Windows anywhere near its PlayStation consoles, and the main reason for that is that Microsoft chose to enter the gaming market too.

[edited by - HenryAPe on September 9, 2003 11:32:30 AM]
0

Share this post


Link to post
Share on other sites