• 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.
Sign in to follow this  
Followers 0
stein102

Switching from Java to C#

13 posts in this topic

I'm planning to switch from Java to C#, does anyone have any tips for any differences I need to watch out for? Naming conventions, things I need to implement differently, ect?

 

Thanks.

0

Share this post


Link to post
Share on other sites
On top of what Sam said, exception handling is much more relaxed in C#, the design of the library is a lot more logical, generics aren't a hack job and pInvoke is about 100x times better than JNI. You also have a bit more low level control in unsafe code.

Plus no Maven! &$$;$$ Maven!

Generally I find c# to simply be a better thought out Java, which makes sense as it came later.
0

Share this post


Link to post
Share on other sites
Oh yeah, forgot a big difference. ref and out. Java is pass by value, c# allows pass by reference. Also struct is a value type in C#.
0

Share this post


Link to post
Share on other sites

stein102,

 

I am just curious about why you are switching from Java to C#.   An expert Java programmer and two expert C# programmers that I know all like C# better but all admit that Java is very capable and still widely used. When is comes to OS and hardware cross-platform implementations, it is a strong point that many believe Java is better in this way.  In the business world, preference of the coder is sometimes not even a consideration in established development firms.

 

So, what are your reasons for switching?  Perhaps we can clarify some things that you need to know by this insight given to us.

Edited by 3Ddreamer
0

Share this post


Link to post
Share on other sites

stein102,

 

I am just curious about why you are switching from Java to C#.   An expert Java programmer and two expert C# programmers that I know all like C# better but all admit that Java is very capable and still widely used. When is comes to OS and hardware cross-platform implementations, it is a strong point that many believe Java is better in this way.  In the business world, preference of the coder is sometimes not even a consideration in established development firms.

 

So, what are your reasons for switching?  Perhaps we can clarify some things that you need to know by this insight given to us.

 

Well, been programming in java for a while and recently been using Slick2D for programming games. I've been doing some reading really like the looks of XNA.

 

Another reason being that I'm a pre-college student and want to have a couple languages down before I hit the workforce. I was considering going from Java to C# or C++, I'm still kind of torn between the two languages, that's one of the reasons I made this thread. I wanted to see the differences between Java and C# so it could help me make my decision making a little easier.

0

Share this post


Link to post
Share on other sites

Since you are doing this for the learning, obviously to prepare for a career, then I say more power to you!

 

Take a look at MonoGame implementation of XNA.  There is a ton of things to get with it, including terrain editors and level editors.

 

Also look at Unity 3D, which would give you the opportunity to use any of several languages, including C#.

 

This is a good strategy for getting broad experience which you are taking.  Long term you need to complete good projects for your portfolio

Edited by 3Ddreamer
0

Share this post


Link to post
Share on other sites

Since you are doing this for the learning, obviously to prepare for a career, then I say more power to you!

 

Take a look at MonoGame implementation of XNA.  There is a ton of things to get with it, including terrain editors and level editors.

 

Also look at Unity 3D, which would give you the opportunity to use any of several languages, including C#.

 

This is a good strategy for getting broad experience which you are taking.

 

I still haven't fully decided between C# and C++ yet(I plan to learn them both eventually), but I'm slightly leaning towards C++ with either SDL or SFML. I have a few books for C++ that I picked up a while ago on sale also.

0

Share this post


Link to post
Share on other sites

Either language would be fine, C# or C++, but you really need to look at how low you want to go.  Are you serious and dedicated to learn lower level programming under the graphics, threading, sound, input, and so forth?  If that is the case, then I would say C++.  An intention to stay middle and high level coding for a while might give you C# as the best interim choice and you can sit on an engine like XNA/MonoGame for a while to sharpen your coding skills in preparation for that advanced lower level coding.  Please don't misunderstand because any of these - Java, C#, or C++ - can be used to target a runtime and hence manipulate lower level CPU/GPU functions, but I feel that you should wait 1-2 years before you dive that deep.

Edited by 3Ddreamer
0

Share this post


Link to post
Share on other sites
Going from Java or C# to C++ you will find yourself saying "I can't do what?!?!" A lot. The c++ standard libraries are shockingly limited. Hell, even a standard string class or dynamic array class are fairly new to the standard. Things like graphics, ui, sound, database, directory manipulation, networking, etc... Zip, zilch nada. Thankfully there are frameworks like Qt, but that's almost like learning a whole other language.
1

Share this post


Link to post
Share on other sites

Well, that's a good point.   Frameworks might weigh more heavy in deciding between C# or C++ than anything else, which really is a matter of preference.

0

Share this post


Link to post
Share on other sites

Going from Java or C# to C++ you will find yourself saying "I can't do what?!?!" A lot. The c++ standard libraries are shockingly limited. Hell, even a standard string class or dynamic array class are fairly new to the standard. Things like graphics, ui, sound, database, directory manipulation, networking, etc... Zip, zilch nada. Thankfully there are frameworks like Qt, but that's almost like learning a whole other language.

 

So I'll need to download additional libraries even for simple stuff? I mean, I'm open to learning, I just want to know what I'm getting into. (Referring to C++)

0

Share this post


Link to post
Share on other sites

Going from Java or C# to C++ you will find yourself saying "I can't do what?!?!" A lot. The c++ standard libraries are shockingly limited. Hell, even a standard string class or dynamic array class are fairly new to the standard. Things like graphics, ui, sound, database, directory manipulation, networking, etc... Zip, zilch nada. Thankfully there are frameworks like Qt, but that's almost like learning a whole other language.

 

So I'll need to download additional libraries even for simple stuff? I mean, I'm open to learning, I just want to know what I'm getting into. (Referring to C++)

 

Yes, you will be using 3rd party libraries in C++ in ANY program beyond a 2 week school lab.  In the other 2 platforms, you will be using 1 of many libraries as well, but the differences are:  

 

1.  The C++ Standard Library has about 20% as much core functionality in it (no DB access, no XML processing, no graphics, no sound, no threads, no web technogy, URI, no control libraries of any kind, no UI building, etc, etc.) - because the C++ standard library makes almost NO assumptions about platform.  It works for writing programs with a graphical UI, a console interface, an embedded factory robot control board, etc.  It is primarily intended to be only the set of things widely needed and NOT readily build-able with itself (in other words, if you could easily add the library piece by writing it using the existing library piece and nothing else, then it doesn't have to be in the standard, you can download it elsewhere - unless it is so common and needed that leaving it out would cause nearly everyone to need to add / download it).

 

2.  The Java and .Net libraries gave a LOT of thought to trying to be complete platforms, such that many programs could be built without needing third party software.  However, third party libraries are still better at many things (such as Log4J, Hibernate, etc).  Its just that in Java and .NET they are trying to be better than something, rather than provide it in the first place.

 

3.  Java and .Net were built from the ground up to provide a clean example and guideline for class and library writers to follow.  They include not just specifications, but naming convention recommendations and examples of library organization and packaging.  C++ was built in a world where C professionals already had multiple entrenched competing styles, and often big monolithic projects and C++ didn't try to force people to change - it is just a tool.  So C++ libraries have been completely inconsistently named and organized from the beginning.  Some of the best and cleanest code in the world is C or C++ - but a lot of it is completely unreadable by anyone at all.

 

4.  The biggest issue with C++ libraries, is that, since the core is so spartan, almost every vendor there own copy of "basic" helpful classes, which means that when you have 3 3rd party libraries you have 3 different sets ... 1 inside each vendors code ... and each one is going to be different and not compatible across libraries.  So for instance, logging of memory management or dependency injection are just going to be completely tied to each library.

2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0