473,654 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is C# too slow for real game programming?

jm
I know one can make games in C#, but are any software companies really
using C# to produce anything? What do you think? I use a lot of C#
at work, but would like to use it for play/work on my own. I don't
want to use regular c++ if I don't have to. I just not that good. Is
c# just to slow with current technology? Thanks for opinions.
Nov 16 '05 #1
5 6878
jm,
I'm sure that C# is just fine for developing games. I have some
friends/excoworkers that have developed a driving simulator application
purely in c# and directx. The physics engine I'm pretty sure wasn't managed
code, but the application worked just fine.

HTH

--
Lateralus [MCAD]
"jm" <jo************ *@yahoo.com> wrote in message
news:c6******** *************** ***@posting.goo gle.com...
I know one can make games in C#, but are any software companies really
using C# to produce anything? What do you think? I use a lot of C#
at work, but would like to use it for play/work on my own. I don't
want to use regular c++ if I don't have to. I just not that good. Is
c# just to slow with current technology? Thanks for opinions.

Nov 16 '05 #2
On 3 Sep 2004 19:31:22 -0700, jo************* @yahoo.com (jm) wrote:
I know one can make games in C#, but are any software companies really
using C# to produce anything? What do you think? I use a lot of C#
at work, but would like to use it for play/work on my own. I don't
want to use regular c++ if I don't have to. I just not that good. Is
c# just to slow with current technology? Thanks for opinions.


It would be easy if microsoft had a decent managed version of direct x
and actually documented it.
Nov 16 '05 #3
jm wrote:
I know one can make games in C#, but are any software companies really
using C# to produce anything? What do you think? I use a lot of C#
at work, but would like to use it for play/work on my own. I don't
want to use regular c++ if I don't have to. I just not that good. Is
c# just to slow with current technology? Thanks for opinions.


Have you heard of Arena Wars? It's supposedly written entirely in C#. See
http://arenawars.krawall.de/com/

Cheers,

--
Joerg Jooss
jo*********@gmx .net
Nov 16 '05 #4
Hi JM,

Here's an .NET Show episode talking about directX:

http://msdn.microsoft.com/theshow/Ep...37/default.asp

Here's another .NET Show where Nick Hodapp demos a version of Quake II that
was written with C#:

http://msdn.microsoft.com/theshow/Ep...35/default.asp

This particular episode is good to watch anyway because it talks about the
benefits of managed code.

Joe
--
Joe Mayo, Author/Instructor
Need C#/.NET training?
visit www.mayosoftware.com
C# Tutorial - www.csharp-station.com

"jm" <jo************ *@yahoo.com> wrote in message
news:c6******** *************** ***@posting.goo gle.com...
I know one can make games in C#, but are any software companies really
using C# to produce anything? What do you think? I use a lot of C#
at work, but would like to use it for play/work on my own. I don't
want to use regular c++ if I don't have to. I just not that good. Is
c# just to slow with current technology? Thanks for opinions.

Nov 16 '05 #5
Joe Mayo [C# MVP] wrote:
Here's another .NET Show where Nick Hodapp demos a version of Quake
II that was written with C#:

http://msdn.microsoft.com/theshow/Ep...35/default.asp


Not quite <g>

The Quake demo was written in C++ ported from C and then compiled as Managed
C++ using the /clr switch.

"NICK HODDAP [sic]: So what I have here, we're going to run the native
version
first, the native version of Quake. So this is really just the source code
that you could download off of idSoftware, and Vertigo is hosting this out
on their website so you can download this and build it yourself. The one
thing that they did in addition to just rebuilding it for .NET and the CLR
is they ported it from strictly a C-based application to C++. And the reason
they did that - it didn't involve a whole lot of work - was because in order
to enable that feature of the compiler that allows you to recompile for
Managed, it has to be in C++ syntax. And so there are only a few minor
differences: C++ is really a superset of C, but you can do things in C that
break that transition. So they fixed that up. So what we're looking at here
is the native version, and we can drop into a mode that allows us to see the
frame rate that we're getting. "

However, there is a bigger story here. The language is just the input to the
compiler, its largely irrelevant (largely, but not completely). What's
important is that the output of the compiler is IL. Now bear in mind that
guys from the VC team wrote the JIT compiler so all the experience from
years of writing C++ optimization code has gone into the JIT compiler. So
once the IL has been JITted (that's the caveat) the native code created by
the JIT compiler will run as fast as native code produced by the native C++
compiler. (Actually, my tests have shown that for some optimization
switches, managed C++ can run faster than native C++).

The demo shows that the managed Quake (ie compiled with /clr) runs at 50
frames/sec and the native version (same code without /clr) runs at 60
frames/sec. I haven't looked the code so I cannot conclusively identify why
this is the case, but I suspect there's some marshalling betweem managed and
unmanaged types for calls to the Win32 API, and I suspect the optimization
swiches used are not the most optimal for managed C++ <g>. Note that the
graphics don't use WinForms.

BTW Nick Hodapp mentions that with some tweaking of the Quake code you can
get to 100% the performance of the native version, and I believe him.

Richard
--
..NET training, development, consulting and mentoring
my email ev******@zicf.b et is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3875
by: the_philospher | last post by:
I am a beginner programmer learning c++. i have read some useful information about programming games (which is my goal) on gamedev.net, particularly "how do i program games" http://www.gamedev.net/reference/design/features/makegames/. the article suggests first programming a tetris clone, then moving on to "breakout", "pacman", and a super mario style game.. My question is, how long should it realistically take me to be able to...
2
2585
by: Hans Kamp | last post by:
As a programming exercise I try to program a game. In my case it is called BugEater. The purpose is that you are a snake. It moves automatically but you can control it with the keys on your keyboard. In the field where your snake is, there are candies that you must eat. The more candies you eat, the longer you get. You win if you eat all 10 candies without dying more than 3 times in one level. In that case a time bonus is added to your...
50
5697
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
0
1832
by: Jeff Rush | last post by:
At PyCon this year we're going to have a multi-day game programming clinic and challenge. This is a first-time event and an experiment to find those in the Python community who enjoy playing and creating games. Python has several powerful modules for the creation of games among which are PyGame and PyOpenGL. On Friday evening, Phil Hassey will give an introduction to his game Galcon, an awesome high-paced multi-player galactic...
2
1868
by: hg | last post by:
Hi, I have started to work on a python-based robot, and am interested in your feedback: http://realtimebattle.sourceforge.net/ www.snakecard.com/rtb hg
4
4430
by: COHENMARVIN | last post by:
Are there any good sources on video game programming in vb.net? Is "DirectX" a set of libraries for video game programmers? The reason I ask is that I'd like to convert a board game into a computer game. Its a game with up to 4 players, so it seems like it would be hard to do. After all, a computer doesn't have up to 4 mouses. And its a board game where pieces move on the board, so I'd have to keep redrawing the board but with squares...
39
2851
by: cm_gui | last post by:
Python is slow. Almost all of the web applications written in Python are slow. Zope/Plone is slow, sloow, so very slooow. Even Google Apps is not faster. Neither is Youtube. Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster than Python. Okay, they probably use caching or some code compilation -- but Google Apps and those Zope sites probably also use caching. I've yet to see a web application written in...
10
2001
by: Michael Lubker | last post by:
Any people that use Python as the predominant language for their game development here? ~Michael
0
1017
by: smartx | last post by:
Hi, I would like to share my knowledge as a game programmer, really game programming is hard, I don't want to disappoint you, the important point to become a game programmer is to love game programming, this way you will reach your target, also you need to be patient, don't stop on the half of the road, like you are building a great building and when you leave it like you destroy what you built, sure because what you learn needs a practice...
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.