Using C# For a Game Engine?

2e419a3aa27c8e4f8630fec32d5d85e0
0
Jermaine 101 Jun 29, 2006 at 17:24

Well my first language was vb.net I am serious considering using C# for a major game project. But i have noticed that alot of engine in the dtabase dont really used C# For a language. My question is it possible to make a Major Game Engine with C#? Can C# be s powerful as C++ as far as making games and what are the advantages and disadvantages of using C#.? Can C# use Physics ?Effectively?

28 Replies

Please log in or register to post a reply.

6b7e1a4b42e4b47d92fdef8bf2bd8e2c
0
Jare 101 Jun 29, 2006 at 18:18

It depends on what you consider “Major”, but in general, yes it can. The advantages and disadvantages have been discussed here multiple times, so a quick search will answer your question rather than force someone to repeat it again here.

1f6c52955546a0f5e26baa54c636bc5b
0
Morgan360 101 Jun 30, 2006 at 20:57

FWIW, Unity lets you use C# (among other languages). It sounds like you plan to start from scratch, though, not use an existing engine?

2e419a3aa27c8e4f8630fec32d5d85e0
0
Jermaine 101 Jul 03, 2006 at 02:27

well i have been using alot of engines but i iwill like to move on to C# programming. And i havent really seen any rave reviews from existing C#engines.

2e419a3aa27c8e4f8630fec32d5d85e0
0
Jermaine 101 Jul 03, 2006 at 02:29

also Unity costs 250 dollars.

1f6c52955546a0f5e26baa54c636bc5b
0
Morgan360 101 Jul 03, 2006 at 02:45

Unity certainly gets rave reviews:

http://www.devmaster.net/engines/engine_details.php?id=256

And having just spent that money myself, I can say that $249 (or $1499 for that matter) is dirt cheap for what Unity delivers–especially since you’re working on a major game project. No free tools (or any tools I’ve found for that matter) could come anywhere close to doing what Unity has done to move my game towards a shipping finished product. And when you ship, the money comes to YOU :)

But starting from scratch does cost less for sure! Good luck with your project.

2e419a3aa27c8e4f8630fec32d5d85e0
0
Jermaine 101 Jul 10, 2006 at 17:55

yeah well i decided on torque it doesnt spport C# but i can deal with it.

Thanks for your help though

71e89bd365ed0c28ca95239a2b8b71cc
0
pwned_ 101 Jul 10, 2006 at 18:45

C# seems to be quite adequate for writing an engine. I’m using it and Managed DirectX right now for a game. It might not be the tool to use for the next Quake engine or something of that caliber, but for small games, it should be just fine.

4c85bbf0fe52dd82315ff56c8797ef91
0
Blaxill 101 Jul 10, 2006 at 22:00

@pwned!

It might not be the tool to use for the next Quake engine or something of that caliber, but for small games, it should be just fine.

Why not :ninja:
Next Gen using C#

Offtopic: and i don’t think much of ‘Enemy Territory: Quake Wars’, tbh it doesnt look that good - models look even more plasticy after being removed from dark tunnels in doom or the dark setting of Quake 4. And we all know that ‘MegaTexture’ is just clip mapping, with another name, for publicity.

406ad7b52f4ed7443e3971e6b2adf430
0
kariem2k 101 Jul 11, 2006 at 14:38

Hi
Of course C# can be used in major games,But the speed is not like c++ of course (But it does not matter for the current high machines specifications).
Take a look at Haddd it looks promesing,And its source code will be available at the end of the month and it is completely written in C#,But the animation system and scene managment are not completed but after going in the open source path it will evolve fast.

1f6c52955546a0f5e26baa54c636bc5b
0
Morgan360 101 Jul 11, 2006 at 15:04

The nice thing about Unity is that you can use C#, JavaScript and/or Boo/Python for your game logic (which is compiled from there to fast native code), but that doesn’t mean the animation engine is written the same way–the engine itself is separate–and is also very fast, even on low-end hardware.

3063896c06829a58387478e663317a3a
0
Alex007152 101 Jul 11, 2006 at 18:16

@Jermaine

Well my first language was vb.net I am serious considering using C# for a major game project. But i have noticed that alot of engine in the dtabase dont really used C# For a language. My question is it possible to make a Major Game Engine with C#? Can C# be s powerful as C++ as far as making games and what are the advantages and disadvantages of using C#.? Can C# use Physics ?Effectively?

Well our 3D game engine is written in C#. What i have learned from our programmers is that java is basicaly a bettered version of C++ but allot slower and C# is a bettered version of Java but then faster. I cannot confirm this as i have minimum knowledge of the above 3 i mentioned. So… yes, it is possible to write a ‘major’ game engine in C#.

71e89bd365ed0c28ca95239a2b8b71cc
0
pwned_ 101 Jul 11, 2006 at 20:35

Yes, I would agree with you on that language progression. For those who are not familiar with Java, C# is kind of like C++ without all the “icky” stuff that makes you want to pull your hair out on those late nights debugging. It’s a powerful language that’s fun to use(when coupled with .Net) and gives you more time to code meaningful things (read as “cool sh!t”) rather than have to obsess over the details of memory management. I drink 50% less Jolt now and have normal blood pressure since I switched from C++.
:happy: This could be you!

pwned!

4c85bbf0fe52dd82315ff56c8797ef91
0
Blaxill 101 Jul 11, 2006 at 22:01

@Jermaine

Well my first language was vb.net I am serious considering using C# for a major game project. But i have noticed that alot of engine in the dtabase dont really used C# For a language. My question is it possible to make a Major Game Engine with C#? Can C# be s powerful as C++ as far as making games and what are the advantages and disadvantages of using C#.? Can C# use Physics ?Effectively?

C# is a a relatively new programming language compared to c++, thats the main reason you see hardly any c# engines. Of course c# can use physics, if your not writing your own physics library you will probably be linking to a c/c++ physics library anyway.

860fe478a2545d6c07b88c759292499e
0
SmokingRope 101 Jul 13, 2006 at 05:47

I only don’t like C# because of it’s binding to the .Net Framework. Of course in any form of substantial release you can package the .net Installer with the rest of the Programs Data but this makes freeware and small parlor games cumbersome to install. Although i personally take the time to install the .Net framework on most computers i work on; there are those who are still unaware of the need to do such a thing… Having to package a 14…20…bigger? installer with a 100k game of tetris is truly disconcerting.

In addition you should note that the minimum size of a .net Executable at runtime takes up around 14mb of memory, in my experience. Although we have exponentially increased both the capabilities of computers and the power of our frameworks, doing so with ram usage of ‘hello world’ is not the best of ideas.

Granted C# can link up with any C++ library with a little work. As soon as Windows Vista comes out the .Net framework will be part of the OS distribution. Despite this, I think of C# as a parlor game itself, providing a mechanism for rapid/inefficient development of anything utilizing the Windows UI. It’s programming constructs aren’t tailored any better than C++ for the Game Developer.

410bd5094b568dbf6e3f39d19d69d519
0
MickePicke 101 Jul 13, 2006 at 11:28

@SmokingRope

In addition you should note that the minimum size of a .net Executable at runtime takes up around 14mb of memory, in my experience.

That’s because .NET reserves more memory than it first needs. If more memory is needed, it’s already there and gets allocated faster.

If another app needs the memory instead .NET will happily give up it’s reserved memory. So the Mem usage tab in the Task Manager won’t give you the actual amount of memory used, only the reserved amount (which can drop fast if needed).

71e89bd365ed0c28ca95239a2b8b71cc
0
pwned_ 101 Jul 13, 2006 at 13:17

@SmokingRope

…Having to package a 14…20…bigger? installer with a 100k game of tetris is truly disconcerting.

This is a very good point, and oft overlooked. Most home users have no problem installing this, despite the moderately chunky download. In a corporate environment where most people do not have admin rights on their boxes, however, it can be a different story. It’s much more inconvenient when you have to go run down a Linux-loving bitch boy from the IT department to install (God forbid!) something from Microsoft.
There is a way to statically link to assemblies in the framework, but it’s more of a hack, and doubtlessly a bad idea- especially if you have a bunch of managed games to download.
I would be very interested in finding out who (in statistical terms) has the framework installed. I would suspect that a larger percentage of younger folks (those that install everything off Microsoft Update or update their ATI drivers) already have the 1.1 framework installed than baby boomers. This is something to consider when thinking about who your game(s) are targeting.
If any of you are interested, I have a bit of code you can place on your web site to check whether or not visitors have the framework installed. Keeping track of this info in a database could give you some insight on what your audience has installed. It might be worthwhile for developers considering moving over into the managed world.

Josh Usovsky

F7c2a28b987d5be050e371270bdc785f
0
NeARAZ 101 Jul 17, 2006 at 17:07

@SmokingRope

I only don’t like C# because of it’s binding to the .Net Framework.

In Unity, we use Mono for the scripting. In the web player installer, Mono stuff takes around 1.5MB (compressed). Of course, it has only the essential libraries (mscorlib) and the runtime inside; no C# compilers or other libraries (databases, gui, asp.net etc.).

So it can be made smaller than 20MB (or how much these days?) the official .NET installer takes. Of course, for a 100k game it’s still quite much :)

F01e94b48da4265da48fa2b2383985f9
0
xanados 101 Jul 18, 2006 at 14:15

i have been trying to find tutorials on the following programming languages:
Java
C#
C++
Visual Studio
.NET
SQL
Max Script
DirectX 9
DirectX 10
Direct3D
Shader Technologies
Ashli
Technical Design Documents (TDD)
AAA
MMOG
Multi-core architectures
Real-time Physics
3D Studio Max
3D Studio Max SDK
Softimage
Maya
Linux
Networking
3jane
Renderware
API
OpenGL
D3D
STL
Vista
Perl
Havok
AI
UI
FX
OOD
OOP
SQL
ya i know it is alot…but if yo can help jsut email me at mysticosmospresident@yahoo.com
luckily i found anough on C programming to know the language…but i cant incorporate it into a game…just a DOS program

D31ee247fed4c3bad76bf30282d897a0
0
dega512 101 Jul 18, 2006 at 15:57

It’s called Google :lol: .
(and just so you know not all of those are programming langauges)

found anough on C programming to know the language…but i cant incorporate it into a game

Good, now that you know C learn C++ then come back to game programming.

  • dega
4c85bbf0fe52dd82315ff56c8797ef91
0
Blaxill 101 Jul 18, 2006 at 16:10

@dega512

Good, now that you know C learn C++ then come back to game programming.

You don’t need to learn c++ to program games, granted most are programmed in c++ though…

@xanados - only a select few of those are programming languages, others are API’s and programs, there are thousands of tutorials on the internet for each one of these.

D31ee247fed4c3bad76bf30282d897a0
0
dega512 101 Jul 19, 2006 at 15:58

You don’t need to learn c++ to program games

True but if they already knows C it would probably be the easier route.

406ad7b52f4ed7443e3971e6b2adf430
0
kariem2k 101 Jul 20, 2006 at 00:57

LEARN FIRST, Game programming is one of the most advanced topics in software world so you will not make a game from just knowing the basics and reading books only,The experiance is what matters it gives you the programmer’s mind and the way of thinking,You must experiance programming in general first and then you can enter game programming world.

IMHO in general the programming language is not important in programming :) as long you don’t know how to think in the design,The language is just a tool used to implement your design.

But C++ is the way to go not just for game programming it wil introduce you the both old effecient programming world and the modern RAD programming world it will harden you because not every thing in it comes easy :) specially for starters,And then you can go to modern language like c#, java.
thanks
bye

71e89bd365ed0c28ca95239a2b8b71cc
0
pwned_ 101 Jul 21, 2006 at 19:55

@kariem2k

But C++ is the way to go not just for game programming it wil introduce to you both the old efficient programming world, and the modern RAD programming world. It will harden you, because not every thing in it comes easy.

I agree. In much the same way that living as a poor college student makes one grow as a person and appreciate times when the money does come in, using a more “hands-on” dangerous language will make one appreciate the niceties offered by newer languages. I’d be a real pussy today if I hadn’t had to endure the joys of pointer hell a few years ago.
Of course if you’re not a programmer to begin with, and you only expect to code little games only as a hobby, you’ll probably lose interest before you get to anything fun. I would think it would be very difficult to code any kind of game without having a decent background (maybe a year or more) in programming. I would guess that most people who try to learn programming by coding video games probably get discouraged quickly and move on to other hobbies.

-pwned

1f6c52955546a0f5e26baa54c636bc5b
0
Morgan360 101 Jul 21, 2006 at 21:00

I speak from experience when I say you can get quite sophisticated results from Unity (C#, JavaScript, Boo/Python) without a hardcore programming background. I don’t mean just tweaking all the included FPS and racing examples or using the built-in behaviors–I mean making custom functionality that goes off in your own direction.

That said, I didn’t walk into Unity as a total programming beginner (which could be done, but you’ll have to learn your language–no free lunch). I entered with years of “lightweight” programming/scripting experience: ActionScript and Lingo. But I’d never done any significant JavaScript work, and I opted for JS to do my Unity scripting–it wasn’t a big problem, just a little syntax to learn.

I learned most of my programming with BASIC and Lingo. I could have done it with JavaScript and Unity and done OK. My first game would certainly take longer and hit more pitfalls if I had started THAT cold :) But I still would have gotten somewhere and learned a lot.

That’s not denying that the programming fundamentals are important. They ARE! But I think making a game WOULD be a practical way to learn programming. Maybe even more fun than some ways :) And if doing that game programming is easier than it used to be… so be it :)

F01e94b48da4265da48fa2b2383985f9
0
xanados 101 Jul 25, 2006 at 13:01

thx for the reply…btw is java based on C/C++?
sory im such a noob :blush:

1f6c52955546a0f5e26baa54c636bc5b
0
Morgan360 101 Jul 25, 2006 at 15:59

To oversimplify, yes, Java syntax is largely based on C and C++ syntax (but can be simpler to work with). JavaScript (aka ECMAScript), C# and C++ also have some C ancestry. But they’ve all gone in different directions.

Aa0828df324ff5ffaaa00eb103029663
0
BUnzaga 101 Aug 09, 2006 at 03:56

Hey Im currently learning to program in C#. My plan was to learn something ‘simple’ then move to c++. I realize that in todays commercial market, c++ is arguably the ‘only’ real choice for development. Is there any downfall to doing this? Should I forget about C# for now and just jump to c++, or should I stay on my course and learn c# and then convert to c++ ?

Im mainly interested in game programming, but I also need to make money, so I figure I could learn to program and do it as a career and then make my games on the side as a hobby.

So… start with c++ then learn java/c# or else start with c# then move to c++/java/sql, etc ???

A2b88b0df0ec92f2a587208b4e2a5c6b
0
Sturm 101 Aug 09, 2006 at 05:08

There are prob about a gazillion threads on what is the better language, but I do think that most agree on that c/c++ is better suited for low level core development and c++/c# is better for high level (c++ can be used for both) I find c# a lot easier to use when I don’t have to watch for clock cycles. But with regards to your question, I think the best answer is: learn a language first. If you chose c++ you have a excelent starting point, but it is also harder to learn.

If you are only interested in learning a language to write games, then you might be a lot better of learning something like UnrealScript or TorqueScript as these languages hides a lot of abstraction. Also these engines allow you to develop a game (fps or similar) much faster than doing it in c++/c#.