Jump to content
  • Advertisement
Sign in to follow this  
Quil

Unity Using .NET framework in games?

This topic is 3402 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Heya all. Im Quil and I want to be a Game coder. Im currently learning C++, started from the basic, and I know pretty much (I think :P) now. I know Pointers, References, OOP, and ofcourse all basic things. My dream Goal is to make a MMORPG. I know its still a long way to get there, so I joined this community for some help. At school im doing the "HAVO/VWO" but im going for "VWO" (my marks are mainly 9s and 10s. 10's for math and English). It is the highest level of school we have here in Holland. (High school, as im 13). I have MUCH time to learn (10-14 hours a day) because im in the hospital for Leukemia. With all those extra Medicin's today feeling bad is not happening anymore.. So its alot of computering! =D Anyway, last night I was wondering. Is it wise to use the .NET framework (I already did C# and Visual Basic and PHP before I started learning C++) in the client or server? It has really nice functions, and they are all pretty easy to access. It is just Random rand = new random; (in C#) and then you have access to all random functions. Im learning from a Win32 command-line with the Visual C++ Compiler. That means there are no .NET features in. I want to use the same software the proffesionals do, as I have a photograpic memory (if its bad english: I can remember every detail without problems, I pwn the game Memory). So, what do you think? Is using the .NET framework in a server/client for a game nice?

Share this post


Link to post
Share on other sites
Advertisement
I already did. It was around the time I used to program in C#. Was pretty newb back then. Wanted to make MMORPG without even knowing anything about XNA. Thats bad. I know better now. xD

Nah, I prefer DirectX more. Because it is more proffesionel, and I want to do real coding. I want a job in the Game Coding later. So im already learning today. ^^
Anyone has an other answer..?

[Edited by - Quil on April 19, 2009 2:44:58 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Quil
I already did. It was around the time I used to program in C#. Was pretty newb back then. Wanted to make MMORPG without even knowing anything about XNA. Thats bad. I know better now. xD

Nah, I prefer DirectX more. Because it is more proffesionel, and I want to do real coding. I want a job in the Game Coding later. So im already learning today. ^^
Anyone has an other answer..?

First of all, when you're a beginner, you should use beginner tools, so that you learn the basics and proper techniques. DirectX isn't better than XNA on your level - with XNA you can focus on making a game and having fun, while with DirectX you will most likely be working on a low-level code, barely touching the game at all.

Also - even a MMORPG is doable on XNA, proof here

Share this post


Link to post
Share on other sites
Quote:
Original post by i_luv_cplusplus
First of all, when you're a beginner, you should use beginner tools, so that you learn the basics and proper techniques. DirectX isn't better than XNA on your level - with XNA you can focus on making a game and having fun, while with DirectX you will most likely be working on a low-level code, barely touching the game at all.

Also - even a MMORPG is doable on XNA, proof here


I would say.. Everyone here started out with low-level codes. I want to learn C++, not C#. I already know C#. And I want to learn DirectX. Not XNA. I already read some tutorials about DirectX, spitted though the code, trying to understand. I know you cant do DirectX well without knowing C++ well. But I have no idea what to know in C++ before I can do DirectX. Im not looking at XNA.

Maybe you can tell me some C++ points where I need to have knowledge about to be "ready for directx" in your eyes? (or someone else..?)
Add: I didnt say XNA could make a MMORPG. I said that when I tryed to, it was like install XNA and think you can make the MMORPG with your basic C# knowledge.

[Edited by - Quil on April 19, 2009 2:37:02 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Quil
I already did. It was around the time I used to program in C#. Was pretty newb back then. Wanted to make MMORPG without even knowing anything about XNA. Thats bad. I know better now. xD

Nah, I prefer DirectX more. Because it is more proffesionel, and I want to do real coding. I want a job in the Game Coding later. So im already learning today. ^^
Anyone has an other answer..?


The basics of game programming are the same, whether you're using XNA, or DirectX, or OpenGL. The APIs may be slightly different, but the actual work that has to be done is the same - it's a function of the math needed to do the transforms, etc. It's like reading a file. The API may change in different languages, and you may have to do some low level stuff in some languages that others take care of for you, but the main tasks that you do are the same in any language.

If you really want to program in DirectX, use C++. If you want to use C#, use XNA.

If you're a beginner (and I don't mean that in an offensive way at all), I'd recommend C#/XNA, as it'll remove a ton of problems that you'd have to deal with in C++/DirectX.

Once you've got some basic stuff in C#, you can make a decision if you want to move to C++ or not. The knowledge you've gained will carry over, even if you have to relearn some specifics.

Share this post


Link to post
Share on other sites
DirectX more professional? XNA is a .NET wrapper for Direct3D 9.0, plus its optional content pipeline some helper classes that make it easier for beginners to get something on the screen. Whether you use those helper classes is up to you.

The first thing you should do if you want to be professional is to not disregard technologies because of some gut feeling or because they're marketed as being "easy" - but to make an informed decision after knowing the facts.

If you want DirectX 10 and 64 bit, there's also SlimDX, a .NET wrapper for Direct3D that supports DirectX 10. Or Tao.OpenGL if you want to use OpenGL - as an added bonus, the Tao libraries work on linux as well.

.NET is a valid choice for an MMORPG, it has very good networking support, database integration, linux portability and its memory management will automatically prevent memory fragmentation and other issues you'll have to solve by hand in C++. The simple decompilation of .NET code might allow even novice programmers to attempt cheating <insert usual notice by random gamedev.net member that obscurity isn't security, that seasoned programmers can read assembly just as well>

C++ on the other side gives you more control over your memory management, eg. object pooling or memory mapping of files, which - in the hands of someone with several years of programming experience - can be effective getting certain demanding algorithms into the real-time range. But this is mainly a concern in cutting-edge graphics or AI.

Share this post


Link to post
Share on other sites
Quote:
Original post by kyoryu
Quote:
Original post by Quil
I already did. It was around the time I used to program in C#. Was pretty newb back then. Wanted to make MMORPG without even knowing anything about XNA. Thats bad. I know better now. xD

Nah, I prefer DirectX more. Because it is more proffesionel, and I want to do real coding. I want a job in the Game Coding later. So im already learning today. ^^
Anyone has an other answer..?


The basics of game programming are the same, whether you're using XNA, or DirectX, or OpenGL. The APIs may be slightly different, but the actual work that has to be done is the same - it's a function of the math needed to do the transforms, etc. It's like reading a file. The API may change in different languages, and you may have to do some low level stuff in some languages that others take care of for you, but the main tasks that you do are the same in any language.

If you really want to program in DirectX, use C++. If you want to use C#, use XNA.

If you're a beginner (and I don't mean that in an offensive way at all), I'd recommend C#/XNA, as it'll remove a ton of problems that you'd have to deal with in C++/DirectX.

Once you've got some basic stuff in C#, you can make a decision if you want to move to C++ or not. The knowledge you've gained will carry over, even if you have to relearn some specifics.


Yes. I really want to program in DirectX. I think it is an challenge to do something more hard, and that will keep me satisfied. And, when I do C#/XNA, I wont be learning anything about some subjects that only are in C++, like pointers. (Yes I already know them, but the best is to also put them in practice right? Not only in a learning program..)

Quote:
Orginal post by Cygon
DirectX more professional? XNA is a .NET wrapper for Direct3D 9.0, plus its optional content pipeline some helper classes that make it easier for beginners to get something on the screen. Whether you use those helper classes is up to you.

The first thing you should do if you want to be professional is to not disregard technologies because of some gut feeling or because they're marketed as being "easy" - but to make an informed decision after knowing the facts.

If you want DirectX 10 and 64 bit, there's also SlimDX, a .NET wrapper for Direct3D that supports DirectX 10. Or Tao.OpenGL if you want to use OpenGL - as an added bonus, the Tao libraries work on linux as well.

.NET is a valid choice for an MMORPG, it has very good networking support, database integration, linux portability and its memory management will automatically prevent memory fragmentation and other issues you'll have to solve by hand in C++. The simple decompilation of .NET code might allow even novice programmers to attempt cheating <insert usual notice by random gamedev.net member that obscurity isn't security, that seasoned programmers can read assembly just as well>

C++ on the other side gives you more control over your memory management, eg. object pooling or memory mapping of files, which - in the hands of someone with several years of programming experience - can be effective getting certain demanding algorithms into the real-time range. But this is mainly a concern in cutting-edge graphics or AI.


Yes, I think DirectX is more proffesional. Firstly because you use DirectX with C++, and C++ is, as you said, a more advanced language as C#. Secondly, because it is more harder to do. Like initializing the whole thing. XNA doesnt have to do that, I know.

But okay, I promise I dont disregard anything anymore because it is 'easy' or 'the proffesionals dont use it'. Im here to learn after all, right? Well learning shouldnt be a problem. :P

As I said before in this post, I rather do C++ with DirectX. And besides 'the proffesionals do it' I will tell you why.

Firstly, because I want to do something that is harder. It will get myself the feeling its a challenge, which will get me satisfied, which will make me learn faster. If I can learn faster as im doing already. If im doing C# and XNA, I probaly (Altough it isnt true, but I have autism, and a feeling can mean alot to me..) get the feeling im wasting time because it isnt that hard. (I said it will be pretty false! xD).
So: I will get a feeling im wasting time because it isnt hard. Feeling means alot for me, so I get bored quickly. But I know it isnt true. But im still bored. I know it sounds really strange, but Autism ís really strange.

Secondly, because I know it is more rewarding on Longtime. As you said a programmer with a few years of experience can do alot more with C++ and directX then with C# and XNA. So if I learn C++ and DirectX, and I wont quit it, it will give me an advance in a few years. When those Cutting-edge graphics and very advanced AI come in :P

Share this post


Link to post
Share on other sites
I think it's best to work with the same language for both the client and server. You can share types and structures and some code, and it's easier to maintain.

You can certainly write in C#. You'll likely be more productive, and learn a lot--the core concepts (of eg a 3d renderer, or network synchronization) are the same. When you get down to it, APIs like D3D or Sockets aren't that much "higher level" in C#. Just safer and easier to manage.

But like you said, if you're trying to learn C++, learn C++. The Direct3D API is good. There'll be a lot of win32 cruft to work through, and you'll have at least 1 segfault that you can't track down, but it'll be fun. Read this http://www.parashift.com/c++-faq-lite/. Once a week.

Share this post


Link to post
Share on other sites
if you don't mind being limited to the windows/xbox platform then go with c#/net.
for hobbyists and fast prototyping c#/net is really awesome.

if you're more serious about gamedev (and maybe want to port your games to other platforms) you should learn c++ :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!