Jump to content

  • Log In with Google      Sign In   
  • Create Account


Need help choosing language


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 dimescion   Members   -  Reputation: 171

Like
0Likes
Like

Posted 29 January 2014 - 11:54 AM

I want to create basic games with simple 2d graphics for distributing as freeware over the net as a hobby. I've learned some C++ but I think what little I've learned is out-of-date anyway, since the book was published in 2007. Unless I get some good objections I'll probably drop C++ since it seems overly complicated for what I want to do.

If I were to choose a higher level language should I pick Java, Python, or some .net language, what would some advantages and disadvantages be?



Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 12337

Like
4Likes
Like

Posted 29 January 2014 - 12:00 PM

Your 2007 C++ knowledge might need some updating to the C++11 standard, but it's not like you have to start from scratch. If you were comfortable with the C++ you learned, you can use a library called SFML to create 2D games. If you find C++ too complicated (a fair criticism), you can generally restrict yourself to a subset of C++ that is not very complicated.

 

I think you should probably spend one day learning each of Java, Python and C# and see what works best for you. You can make games in either one of them, so it mostly comes down to personal preference.



#3 Scourage   Members   -  Reputation: 714

Like
3Likes
Like

Posted 29 January 2014 - 12:00 PM

If you're looking at 2d games and want to distribute on the net, have you considered using Javascript and HTML5?  Some of the nice things about developing games in javascript is that browsers have lots of great debugging tools, it's easy to distribute your games (just a URL) and the browser is a fairly capable platform now.

 

I would also recommend C# since it's performance is pretty good, it's significantly more productive than C++.  If you go the .net route, definitely look into OpenTK.

 

Cheers, 

 

Bob



Halfway down the trail to Hell...

#4 warnexus   Prime Members   -  Reputation: 1394

Like
3Likes
Like

Posted 29 January 2014 - 08:48 PM

I would say try learning Java and see if its suits you. Every programming language even Java has its quirks(mainly because you need to understand terminology of the language and how to apply it to something practical like a game) 

 

Advantages of Java:

1) You will have a deep understanding of object oriented programming concepts if you start with Java instead of C++. It worked for me. My knowledge in Java is intermediate(enough to make a small scale rpg). 

2) If you have a good understanding of Java, the standard Java Graphics library is your go to tool to make your first simple game.

 

Disadvantages:

1) Like any programming language, the terminology can be abstract when you first learn it. Don't be discouraged. Learn it everyday and press on. There is really no way around this but just put in hours to understand it. It will take time to sink in and it won't happen overnight. Give it a few days for each concepts.

 

The fun part is programming is a puzzle. The big picture is that once you mastered what the syntax means, you have full control of what you can do with the language. It is really powerful and also beautiful and elegant when deep understanding has been achieved. 

 

At the end of day, it really boils down to serious time commitment to achieve deep understanding of the general programming concepts. Gamedev is an awesome forum so if you get stuck with a concept after a long time, ask us and pick our brains. biggrin.png



#5 dimescion   Members   -  Reputation: 171

Like
0Likes
Like

Posted 03 February 2014 - 02:33 PM

First of all, thanks, everyone, for responding. I think a few of you have assumed that I'm more into C++ than I am. I should've made clear I'm barely getting into boolean values, and switch statements. I should clarify my "complicated" comment on C++ Mostly I'm afraid coding fairly basic things in C++ will take significantly longer than with another language, that the games I'm likely to code will be too small to really slow most processors much, and to  a lesser extent, that the C++ framework is overly complicated. I've entertained notions of perhaps starting an Indie Game company but that's a LOOONG way down the road, I suppose if I were to choose something other than C++ I would like it to have a lot of similarities to C++.

 

Alvaro, I'm not entirely sure what you mean by subset. There are lots of definitions of subset, and I'm not sure which fits. I'll think about learning several at once, but I don't think I'll like any of them until have some basic understanding, and that could take awhile. I definitely appreciate your advice though. I looked at the SFML webpage and it's very interesting. Seems like just what I was looking for! Thanks! 

 

Scourage, no, I haven't considered Javascript or HTML5, I don't understand the phrase, "browsers have lots of great debugging tools," at all. Wouldn't a compiler tell you if you had any errors? What do you mean C# is more "productive?" Do you mean you can type less to do some of the same things, or that it runs faster? I'll look into Javascript, HTML5 and OpenTK as well, first glances seem promising, but I think I'd like a larger toolkit than just HTML. Thanks for providing me some interesting options though.

 

Warnexus, I knew your name sounded familiar. I replied to your other post on another of my threads. Thanks for the advice, and encouragement. I'll definitely look at Java.



#6 Álvaro   Crossbones+   -  Reputation: 12337

Like
1Likes
Like

Posted 03 February 2014 - 03:41 PM

Alvaro, I'm not entirely sure what you mean by subset. There are lots of definitions of subset, and I'm not sure which fits. I'll think about learning several at once, but I don't think I'll like any of them until have some basic understanding, and that could take awhile. I definitely appreciate your advice though. I looked at the SFML webpage and it's very interesting. Seems like just what I was looking for! Thanks!

 
I am using "subset" informally, meaning that just because C++ is full of fancy features, it doesn't mean you should use them all. You can write very complicated C++ code, or you can write very simple and elegant C++ code. If you learn how to use SFML, you'll have a pretty good example of a library that makes things simple and elegant in C++.
 
When I asked you to spend one day learning each of several languages, I assumed you were very comfortable programming in some language, whether it's C++ or something else. If that's not the case, you won't benefit much from the exercise of spending one day in one language, because besides the syntax and what makes the language special, you'll also be learning the programming concepts at the same time, and that's too much.
 
So pick a language and learn programming first. Python is a popular choice for this. I would stay away from Java (some of the reasons are explained by someone else here). If you are serious about programming, at some point you should learn C and try your hand at C++. But they are probably not good choices as a first language.
 
Once you know how to program, you can worry about making a game. This doesn't mean you have to spend 3 years doing command-line only programs before you do any graphics; I am thinking more like a couple of months. Different people learn in different ways, so this advice is not universal, but I don't think it's completely wrong.

Edited by Álvaro, 03 February 2014 - 03:42 PM.


#7 warnexus   Prime Members   -  Reputation: 1394

Like
1Likes
Like

Posted 03 February 2014 - 06:04 PM


Warnexus, I knew your name sounded familiar. I replied to your other post on another of my threads. Thanks for the advice, and encouragement. I'll definitely look at Java.

 

Saw the post you made on Dec 10 2013 and compared it to this post you made on Jan 29 2014. All I can really say is:

 

1) Don't worry too much about how long or how complicated something takes you. If you are doing a "new feature" you never done before no matter how simple it sounds to you,  it will take more time than you think to come up with the algorithm or at least some idea of how to implement it.

 

Worrying just creates being discouraged and being discouraged later leads to putting it off and until some months later, that person realized had I not worried everything would have work out in the end. So just start. I guarantee you would have made more progress.

 

Alvaro does have a good point. Try Python. Once you have learned a reasonable amount of Python, you can use Python built in game programming library called Pygame and start writing a simple game.



#8 dimescion   Members   -  Reputation: 171

Like
0Likes
Like

Posted 04 February 2014 - 01:03 PM

Thanks Alvaro, I'll take a look at python. I'll take your advice and learn programming first. I've worried that I might want to choose a basic design before choosing a Language, but most languages seem to have tools to do most things whether they're from external libraries or not, so thank you for that lesson, I was worried I may have chosen wrong. I didn't understand a lot of what he was talking about in the link you gave. 

 

Thanks Warnexus, I've already decided to worry less, and do more. Part of the problem is I tried to come back after taking a week off for Christmas and it was all Greek again. I'll take a look at some python books in the library here and see what it's all about.



#9 Scourage   Members   -  Reputation: 714

Like
1Likes
Like

Posted 04 February 2014 - 01:17 PM

 

Scourage, no, I haven't considered Javascript or HTML5, I don't understand the phrase, "browsers have lots of great debugging tools," at all. Wouldn't a compiler tell you if you had any errors? What do you mean C# is more "productive?" Do you mean you can type less to do some of the same things, or that it runs faster? I'll look into Javascript, HTML5 and OpenTK as well, first glances seem promising, but I think I'd like a larger toolkit than just HTML. Thanks for providing me some interesting options though.

 

 

Javascript isn't "compiled" like C++ is, it's interpreted at run-time like Python.  All modern browsers (Chrome, Firefox, Safari, IE) have built in debug tools.  They have the ability to edit code while it's running and continue.  You can also profile your code, setup breakpoints, inspect variables. It's a rather nice environment to build a game.

 

When I say C# is more productive than C++ I mean it takes less work to get a similar result.  I had the pleasure (read: somebody forced me to) of rewriting my game engine from C++ to C#.  I found that it took about 40% less lines of code for the exact same functionality.  I know lines of code is typically a really bad metric, but since it's an apples to apples comparison (same features, same developer implementing them) it works here.  40% less code is a lot less opportunity for bugs.  I really think that when working on solo projects, staying productive is important to keep from getting bored with a project and not finishing. 

 

Cheers, 

 

Bob



Halfway down the trail to Hell...

#10 warnexus   Prime Members   -  Reputation: 1394

Like
1Likes
Like

Posted 04 February 2014 - 05:29 PM

Thanks Alvaro, I'll take a look at python. I'll take your advice and learn programming first. I've worried that I might want to choose a basic design before choosing a Language, but most languages seem to have tools to do most things whether they're from external libraries or not, so thank you for that lesson, I was worried I may have chosen wrong. I didn't understand a lot of what he was talking about in the link you gave. 

 

Thanks Warnexus, I've already decided to worry less, and do more. Part of the problem is I tried to come back after taking a week off for Christmas and it was all Greek again. I'll take a look at some python books in the library here and see what it's all about.

Rule of thumb: Don't memorize, just understand it. Make a lot of mistakes early on and learn from them. Question what is the point of all this. Connect the dots. Homework is all about making the mistakes. That is how you learn. No pain no gain. Homework is the equivalent of doing exercises. Also, don't skip any chapter, programming is cumulative. Also, do not brute force your way through and expect to learn and understand many concepts in one day. There is really no rush. I rather you understand one concepts well than understand a little of everything otherwise it will come and haunt you later.

 

Code and do problem sets or better yet, create a much better exciting problem from the concepts you learn and apply it. Don't just read it. There is a big difference between passive thinking and active thinking.


Edited by warnexus, 04 February 2014 - 05:33 PM.


#11 dimescion   Members   -  Reputation: 171

Like
0Likes
Like

Posted 06 February 2014 - 02:55 PM

You both, (Warnexus and Scourage) have some great points. Thanks for explaining what you meant Scourage. Warnexus, thanks for the tips. I've chosen python, and so far it looks like a simplistic version of C++, which is something I like. I don't know if someday maybe I'll get into game making professionally, and knowing a similar language to C++ is very useful. 



#12 8up tuotlo   Members   -  Reputation: 120

Like
0Likes
Like

Posted 10 February 2014 - 03:18 PM

C++






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS