Hello C#. Bye Bye Java.

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
Script47
Posts: 147
Joined: Thu Nov 21, 2013 6:11 pm

Hello C#. Bye Bye Java.

Post by Script47 »

So after an insightful talk with Alain where he explained to me why I should be using C# and not Java I still wasn't convinced whether I should change, I mean everything he said made sense. Yet my human instincts stopped me from moving on to C#. Reason being well I was used to Java's code style and I had used it a lot more and to be honest I wasn't sure if I was ready to tackle a new programming language. While debating all this in my head I came to a simple conclusion. I should try working with C# and see how that pans out. I must say I was blown away. The Form Builder for C# in Visual Studios is awesome, allowing me to drag and drop things from the toolbox and wherever on to the window. The editor made things a lot easier too. As I can't understand placement of GUI in Java I decided to delve into C# more. By doing so I uncovered a lot of new things which made me change my mind i.e XNA/Mono/Unity.

Previously, in all honesty out of naivety and the lack of knowledge, I thought C# was redundant when it came to game development but as I researched (I did a lot today) I found quite a few games which are written in C# or had a lot of references to C#:

Schizoid - http://en.wikipedia.org/wiki/Schizoid_%28video_game%29
Terriara (Uses XNA) - http://www.terraria.org/
FEZ - http://fezgame.com/
Magicka - http://en.wikipedia.org/wiki/Magicka

I come from a background of Procedural/OOP PHP along with JavaScript and Java. However, personally I feel web development is slowing down in terms of Text Based Games, the market is shrinking and demand is growing for what users would like to see, and developers aren't able to provide it because of X, Y or Z reason. Also with console gaming predominantly ruling the market with next generation graphics and game play, I think it is time to move on. I am still a beginner when it comes to C#, I mean I have done simple console work but that's about it. However syntax's are similar and it will be easier to grasp *hopefully*. I have a few questions with the above in mind.
  • Can someone give me a list of projects with my experience in mind to get me used to C#?
  • How should I go about C# programming whilst having game development in mind? So what main things should I learn?
  • What do I read up on before I write code?
  • Which frameworks to use to make development easier? As I have read XNA is discontinued yet Mono is a part of it (open source).
  • Why are there not many AAA games written in C#? There must be some issue with it because it doesn't seem to be catering that many developers/companies.
User avatar
Xaos
Posts: 940
Joined: Wed Jan 11, 2012 4:01 am

Re: Hello C#. Bye Bye Java.

Post by Xaos »

Projects -- Do stuff like Hangman, Rock-Paper-Scissors, Battleship. Those three are really simple things (Battleship probably the most complicated) to do that teach you very important things (I/O, if/else if, switch, etc) and then once you do that make a simple combat system where hte user can enter attributes and two CPUs combat.

As far as games, just learn C#, and then go through and make sample stuff with Unity.

Frameworks, just use Visual Studio. You'll be doing Game Dev and prob in Unity so learn C# with VS. don't worry about XNA or Mono (if you're wanting to do C# on Linux or Mac you'll need mono, however)

Not many AAA games are written in C# because they're pushing the limits of their hardware so they need a lower-level language where they can get more control. But really, even moreso than that, is that C++ is the industry norm. That's just what people have used and what engines are compatible with. So until more engines come out that you can use C# in and more people start to use C# to make games, it will remain C++.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Hello C#. Bye Bye Java.

Post by a_bertrand »

First of all, it can be difficult (but not always impossible) to see if a game does or does not have parts written in C#. I would say for big studios as anyhow they DO have multiple dev teams (engine, game script, rules etc), it's very well possible that one or more teams uses C# while the others do use C++. C# and C++ can be mixed without much troubles, and that can be done either on the .NET plateform or even with Mono.

I would say, for the moment the low 3D engine part remains mainly a C++ story while the upper level logic with the game script, logic, AI and more can very well (and maybe better) written in C#.

Yet to be totally honest, I'm not sure C# or even Java are the right choice if you are in the game market. C++ could make more sense if you are pointing at AAA games. C# however offers a development speed unmatched by C++, which makes it a better choice if you don't need to talk to low level hardware (in which case you need at least some mixed approach).
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Hello C#. Bye Bye Java.

Post by Jackolantern »

To me, C# and Java both have their place. The biggest reason in my mind for Java's existence is its multi-platform nature. If a company is invested in Linux or Mac, changing to Windows just isn't always a possibility, and Java can do a lot of the same things .NET can. For the things businesses use these platforms for (and client GUI programming isn't really one of them), they are pretty close in power.

As for game development, if you are looking to do this just as a hobby, then C# or Java would be fine. But like others said, if you want to work towards getting a job in the industry, C++ is where you should be since it still pretty much rules the industry. Although admittedly, a lot of next-gen type projects are likely licensing a ton of middleware to cut down on development costs and are probably pushing a lot of the in-house work to a higher level in scripting languages such as Lua or Python.
The indelible lord of tl;dr
User avatar
Script47
Posts: 147
Joined: Thu Nov 21, 2013 6:11 pm

Re: Hello C#. Bye Bye Java.

Post by Script47 »

I don't plan of making 3D AAA games more like 2D indie games. So should I use C# or C++. I have tried C++ previously found it very difficult (probably because it was the first language I tried learning).
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Hello C#. Bye Bye Java.

Post by a_bertrand »

2D then C# is more than enough. You can either WPF (which handles very well 2D and let you do loads of things), or going the old road with winforms and GDI+ can work too, specially if you are after pixels.
Creator of Dot World Maker
Mad programmer and annoying composer
Echo
Posts: 16
Joined: Wed Sep 28, 2011 5:01 pm

Re: Hello C#. Bye Bye Java.

Post by Echo »

JavaScript is capable of 2D and 3D games, I see no reason to learn C# when most devices support HTML5 (android, ios, game consoles).

You can also use node-webkit to play your games as a desktop application.

I have used XNA with C# in the past but now I am just a JavaScript programmer, nothing more.

There are some frameworks you may be interested in:

http://phaser.io/
http://threejs.org/
http://www.pixijs.com/

There are some alternatives such as Unity3D which is what most use right now, there are many popular games on steam using this engine.
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Hello C#. Bye Bye Java.

Post by Chris »

You should learn C# and JavaScript and Java and PHP and Python and in fact every language there is. A programmer should never limit themselves to one language in my opinion.

You can do absolutely everything in any language, at the end of the day your processor can only add, subtract, multiply and divide. Where there's a will there's a way.

PS. C# is in my opinion way more advanced than most languages, you should have a go at Windows 8 Development with XAML, you'll question yourself why we still use HTML.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Hello C#. Bye Bye Java.

Post by hallsofvallhalla »

There are three things that make a man happy. C#,Javascript, and Liquor....Nuff said.
Echo
Posts: 16
Joined: Wed Sep 28, 2011 5:01 pm

Re: Hello C#. Bye Bye Java.

Post by Echo »

Yeah... you can program in any language, I only use JavaScript to develop games. I do program in C# but only applications.

But you can do what ever you want. ;)
Post Reply

Return to “General Development”